mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-13 05:25:07 +00:00
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
This commit is contained in:
@@ -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"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user