Class ElasticsearchConfigurationHybrid.Builder

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

public static class ElasticsearchConfigurationHybrid.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

    • numCandidates

      public ElasticsearchConfigurationHybrid.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
    • 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