add qdrant metadata.doc_id index when create qdrant collection (#4570)
This commit is contained in:
@@ -8,3 +8,4 @@ class Field(Enum):
|
|||||||
VECTOR = "vector"
|
VECTOR = "vector"
|
||||||
TEXT_KEY = "text"
|
TEXT_KEY = "text"
|
||||||
PRIMARY_KEY = "id"
|
PRIMARY_KEY = "id"
|
||||||
|
DOC_ID = "metadata.doc_id"
|
||||||
|
@@ -115,9 +115,12 @@ class QdrantVector(BaseVector):
|
|||||||
timeout=int(self._client_config.timeout),
|
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,
|
self._client.create_payload_index(collection_name, Field.GROUP_KEY.value,
|
||||||
field_schema=PayloadSchemaType.KEYWORD)
|
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
|
# creat full text index
|
||||||
text_index_params = TextIndexParams(
|
text_index_params = TextIndexParams(
|
||||||
type=TextIndexType.TEXT,
|
type=TextIndexType.TEXT,
|
||||||
|
Reference in New Issue
Block a user