mirror of
https://gitee.com/dify_ai/dify.git
synced 2024-12-03 03:38:08 +08:00
add qdrant metadata.doc_id index when create qdrant collection (#4570)
This commit is contained in:
parent
233c4150d1
commit
24624491cd
@ -8,3 +8,4 @@ class Field(Enum):
|
||||
VECTOR = "vector"
|
||||
TEXT_KEY = "text"
|
||||
PRIMARY_KEY = "id"
|
||||
DOC_ID = "metadata.doc_id"
|
||||
|
@ -115,9 +115,12 @@ class QdrantVector(BaseVector):
|
||||
timeout=int(self._client_config.timeout),
|
||||
)
|
||||
|
||||
# create payload index
|
||||
# create group_id payload index
|
||||
self._client.create_payload_index(collection_name, Field.GROUP_KEY.value,
|
||||
field_schema=PayloadSchemaType.KEYWORD)
|
||||
# create doc_id payload index
|
||||
self._client.create_payload_index(collection_name, Field.DOC_ID.value,
|
||||
field_schema=PayloadSchemaType.KEYWORD)
|
||||
# creat full text index
|
||||
text_index_params = TextIndexParams(
|
||||
type=TextIndexType.TEXT,
|
||||
|
Loading…
Reference in New Issue
Block a user