Interface ElasticsearchConfiguration
- All Known Implementing Classes:
ElasticsearchConfigurationFullText, ElasticsearchConfigurationHybrid, ElasticsearchConfigurationKnn, ElasticsearchConfigurationScript
public interface ElasticsearchConfiguration
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault co.elastic.clients.elasticsearch.core.SearchResponse<Document> fullTextSearch(co.elastic.clients.elasticsearch.ElasticsearchClient client, String indexName, String textQuery) Used for full text searchdefault co.elastic.clients.elasticsearch.core.SearchResponse<Document> hybridSearch(co.elastic.clients.elasticsearch.ElasticsearchClient client, String indexName, EmbeddingSearchRequest embeddingSearchRequest, String textQuery) Used for hybrid searchdefault booleanTemporary method which returns if we should return the Vector in the responsedefault co.elastic.clients.elasticsearch.core.SearchResponse<Document> vectorSearch(co.elastic.clients.elasticsearch.ElasticsearchClient client, String indexName, EmbeddingSearchRequest embeddingSearchRequest) Used for vector search
-
Field Details
-
VECTOR_FIELD
- See Also:
-
TEXT_FIELD
- See Also:
-
-
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 clientindexName- The index nameembeddingSearchRequest- The embedding search request- Returns:
- The search response
- Throws:
co.elastic.clients.elasticsearch._types.ElasticsearchException- if an error occurs during the searchIOException- 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 clientindexName- The index nametextQuery- The text query- Returns:
- The search response
- Throws:
co.elastic.clients.elasticsearch._types.ElasticsearchException- if an error occurs during the searchIOException- 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 clientindexName- The index nameembeddingSearchRequest- The embedding search requesttextQuery- The text query- Returns:
- The search response
- Throws:
co.elastic.clients.elasticsearch._types.ElasticsearchException- if an error occurs during the searchIOException- if an I/O error occurs
-