Class ElasticsearchConfigurationKnn.Builder
java.lang.Object
dev.langchain4j.store.embedding.elasticsearch.ElasticsearchConfigurationKnn.Builder
- Enclosing class:
ElasticsearchConfigurationKnn
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
numCandidates
(Integer numCandidates) The number of nearest neighbor candidates to consider per shard while doing knn search.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
-
numCandidates
The number of nearest neighbor candidates to consider per shard while doing knn search. Cannot exceed 10,000. Increasing num_candidates tends to improve the accuracy of the final results.- Parameters:
numCandidates
- The number of nearest neighbor candidates to consider per shard- Returns:
- the builder instance
-