浏览代码

add the index field for elasticsearch (#10592)

Jyong 5 月之前
父节点
当前提交
0b2d51d859
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      api/core/rag/datasource/vdb/elasticsearch/elasticsearch_vector.py

+ 1 - 0
api/core/rag/datasource/vdb/elasticsearch/elasticsearch_vector.py

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