From 2c2bab93fc18bce484abe3ac4a8c4335f86789ee Mon Sep 17 00:00:00 2001 From: may <53140703+soo-toance@users.noreply.github.com> Date: Thu, 11 Sep 2025 11:16:46 +0900 Subject: [PATCH] docs: add example for reusing an existing collection (#32774) Added a short section to the Weaviate integration docs showing how to connect to an existing collection (reuse an index) with `WeaviateVectorStore`. This helps clarify required parameters (`index_name`, `text_key`) when loading a pre-existing store, which was previously missing. Thank you for contributing to LangChain! Follow these steps to mark your pull request as ready for review. **If any of these steps are not completed, your PR will not be considered for review.** ### Description Added a short section to the Weaviate integration docs showing how to connect to an existing collection (reuse an index) with `WeaviateVectorStore`. This helps clarify required parameters (`index_name`, `text_key`) when loading a pre-existing store, which was previously missing. ### Issue Fixes langchain-ai/langchain-weaviate#197 ### Dependencies None --- .../docs/integrations/vectorstores/weaviate.ipynb | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/docs/integrations/vectorstores/weaviate.ipynb b/docs/docs/integrations/vectorstores/weaviate.ipynb index b3ee93ae34e..c1d43e00c8f 100644 --- a/docs/docs/integrations/vectorstores/weaviate.ipynb +++ b/docs/docs/integrations/vectorstores/weaviate.ipynb @@ -47,7 +47,20 @@ "\n", "Some Weaviate instances, such as those running on WCS, have authentication enabled, such as API key and/or username+password authentication.\n", "\n", - "Read the [client authentication guide](https://weaviate.io/developers/weaviate/client-libraries/python#authentication) for more information, as well as the [in-depth authentication configuration page](https://weaviate.io/developers/weaviate/configuration/authentication)." + "Read the [client authentication guide](https://weaviate.io/developers/weaviate/client-libraries/python#authentication) for more information, as well as the [in-depth authentication configuration page](https://weaviate.io/developers/weaviate/configuration/authentication).\n", + "\n", + "### Connect to an existing collection (reuse an index)\n", + "If you already created a collection in your local Weaviate instance, you can connect to it directly:", + "\n", + "```python\n", + "from langchain_weaviate import WeaviateVectorStore\n", + "\n", + "store = WeaviateVectorStore(\n", + " client=weaviate_client,\n", + " index_name=\"Test\",\n", + " text_key=\"text\",\n", + ")\n", + "```\n" ] }, {