in datastore/providers/qdrant_datastore.py [0:0]
def _recreate_collection(self, distance: rest.Distance, vector_size: int):
self.client.recreate_collection(
self.collection_name,
vectors_config=rest.VectorParams(
size=vector_size,
distance=distance,
),
)
# Create the payload index for the document_id metadata attribute, as it is
# used to delete the document related entries
self.client.create_payload_index(
self.collection_name,
field_name="metadata.document_id",
field_type=PayloadSchemaType.KEYWORD,
)
# Create the payload index for the created_at attribute, to make the lookup
# by range filters faster
self.client.create_payload_index(
self.collection_name,
field_name="created_at",
field_schema=PayloadSchemaType.INTEGER,
)