add the index field for elasticsearch (#10592)

This commit is contained in:
Jyong 2024-11-12 21:43:16 +08:00 committed by GitHub
parent ef8022f715
commit 0b2d51d859
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -178,6 +178,7 @@ class ElasticSearchVector(BaseVector):
Field.VECTOR.value: { # Make sure the dimension is correct here Field.VECTOR.value: { # Make sure the dimension is correct here
"type": "dense_vector", "type": "dense_vector",
"dims": dim, "dims": dim,
"index": True,
"similarity": "cosine", "similarity": "cosine",
}, },
Field.METADATA_KEY.value: { Field.METADATA_KEY.value: {