Interface ElasticsearchConfiguration

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

public interface ElasticsearchConfiguration
  • 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

      @Deprecated(forRemoval=true) 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
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use fullTextSearch(ElasticsearchClient, String, FullTextSearchRequest) instead. It also applies the maxResults, minScore and filter of the request.
      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
    • fullTextSearch

      default co.elastic.clients.elasticsearch.core.SearchResponse<Document> fullTextSearch(co.elastic.clients.elasticsearch.ElasticsearchClient client, String indexName, FullTextSearchRequest request) throws co.elastic.clients.elasticsearch._types.ElasticsearchException, IOException
      Used for full text search.
      Parameters:
      client - The Elasticsearch client
      indexName - The index name
      request - The full text 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
    • 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