Interface ElasticsearchConfiguration

All Known Implementing Classes:
ElasticsearchConfigurationFullText, ElasticsearchConfigurationHybrid, ElasticsearchConfigurationKnn, ElasticsearchConfigurationScript

public interface ElasticsearchConfiguration
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default co.elastic.clients.elasticsearch.core.SearchResponse<Document>
    fullTextSearch(co.elastic.clients.elasticsearch.ElasticsearchClient client, String indexName, String textQuery)
    Used for full text search
    default co.elastic.clients.elasticsearch.core.SearchResponse<Document>
    hybridSearch(co.elastic.clients.elasticsearch.ElasticsearchClient client, String indexName, EmbeddingSearchRequest embeddingSearchRequest, String textQuery)
    Used for hybrid search
    default boolean
    Temporary method which returns if we should return the Vector in the response
    default co.elastic.clients.elasticsearch.core.SearchResponse<Document>
    vectorSearch(co.elastic.clients.elasticsearch.ElasticsearchClient client, String indexName, EmbeddingSearchRequest embeddingSearchRequest)
    Used for vector search
  • Field Details

  • Method Details

    • isIncludeVectorResponse

      default boolean isIncludeVectorResponse()
      Temporary method which returns if we should return the Vector in the response
      Returns:
      true or false
    • vectorSearch

      default co.elastic.clients.elasticsearch.core.SearchResponse<Document> vectorSearch(co.elastic.clients.elasticsearch.ElasticsearchClient client, String indexName, EmbeddingSearchRequest embeddingSearchRequest) throws co.elastic.clients.elasticsearch._types.ElasticsearchException, IOException
      Used for vector search
      Parameters:
      client - The Elasticsearch client
      indexName - The index name
      embeddingSearchRequest - The embedding search request
      Returns:
      The search response
      Throws:
      co.elastic.clients.elasticsearch._types.ElasticsearchException - if an error occurs during the search
      IOException - if an I/O error occurs
    • fullTextSearch

      default co.elastic.clients.elasticsearch.core.SearchResponse<Document> fullTextSearch(co.elastic.clients.elasticsearch.ElasticsearchClient client, String indexName, String textQuery) throws co.elastic.clients.elasticsearch._types.ElasticsearchException, IOException
      Used for full text search
      Parameters:
      client - The Elasticsearch client
      indexName - The index name
      textQuery - The text query
      Returns:
      The search response
      Throws:
      co.elastic.clients.elasticsearch._types.ElasticsearchException - if an error occurs during the search
      IOException - if an I/O error occurs
    • hybridSearch

      default co.elastic.clients.elasticsearch.core.SearchResponse<Document> hybridSearch(co.elastic.clients.elasticsearch.ElasticsearchClient client, String indexName, EmbeddingSearchRequest embeddingSearchRequest, String textQuery) throws co.elastic.clients.elasticsearch._types.ElasticsearchException, IOException
      Used for hybrid search
      Parameters:
      client - The Elasticsearch client
      indexName - The index name
      embeddingSearchRequest - The embedding search request
      textQuery - The text query
      Returns:
      The search response
      Throws:
      co.elastic.clients.elasticsearch._types.ElasticsearchException - if an error occurs during the search
      IOException - if an I/O error occurs