Why is the query field "embedding" hardcoded in the ElasticsearchVectorStore class?
SearchResponse<Document> res = this.elasticsearchClient.search(sr -> sr.index(this.options.getIndexName())
.knn(knn -> knn.queryVector(EmbeddingUtils.toList(vectors))
.similarity(finalThreshold)
.k((long) searchRequest.getTopK())
.field("embedding")
.numCandidates((long) (1.5 * searchRequest.getTopK()))
.filter(fl -> fl
.queryString(qs -> qs.query(getElasticsearchQueryString(searchRequest.getFilterExpression())))))
.size(searchRequest.getTopK()), Document.class);
Comment From: ilayaperumalg
Hi @gikeihi , This is because the ElasticSearchVectorStore's document object has the embeddings field mapped to "embedding" and by default the index mapping is also configured to use the same field name "embedding" as in here.