Class ElasticsearchConfigurationHybrid.Builder
java.lang.Object
dev.langchain4j.store.embedding.elasticsearch.ElasticsearchConfigurationHybrid.Builder
- Enclosing class:
ElasticsearchConfigurationHybrid
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()includeVectorResponse(boolean includeVectorResponse) Whether to include vector fields in the search response (from Elasticsearch 9.2).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
-
includeVectorResponse
public ElasticsearchConfigurationHybrid.Builder includeVectorResponse(boolean includeVectorResponse) Whether to include vector fields in the search response (from Elasticsearch 9.2).- Parameters:
includeVectorResponse- true to include vector fields, false otherwise- Returns:
- the builder instance
-