Class ElasticsearchConfigurationKnn.Builder

java.lang.Object
dev.langchain4j.store.embedding.elasticsearch.ElasticsearchConfigurationKnn.Builder
Enclosing class:
ElasticsearchConfigurationKnn

public static class ElasticsearchConfigurationKnn.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

    • numCandidates

      public ElasticsearchConfigurationKnn.Builder numCandidates(Integer 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