mirror of
https://github.com/hwchase17/langchain.git
synced 2026-04-02 18:32:56 +00:00
**Description:**
This PR fixes a bug where if `enable_dynamic_field` and
`partition_key_field` are enabled at the same time, a pymilvus error
occurs.
Milvus requires the partition key field to be a full schema defined
field, and not a dynamic one, so it will throw the error "the specified
partition key field {field} not exist" when creating the collection.
When `enabled_dynamic_field` is set to `True`, all schema field creation
based on `metadatas` is skipped. This code now checks if
`partition_key_field` is set, and creates the field.
Integration test added.
**Twitter handle:** StuartMarshUK
---------
Co-authored-by: Stuart Marsh <stuart.marsh@qumata.com>
Co-authored-by: Erick Friis <erick@langchain.dev>
langchain-milvus
This is a library integration with Milvus and Zilliz Cloud.
Installation
pip install -U langchain-milvus
Milvus vector database
See a usage example
from langchain_milvus import Milvus
Milvus hybrid search
See a usage example.
from langchain_milvus import MilvusCollectionHybridSearchRetriever
Zilliz Cloud vector database
See a usage example.
from langchain_milvus import Zilliz
Zilliz Cloud Pipeline Retriever
See a usage example.
from langchain_milvus import ZillizCloudPipelineRetriever