public interface SearchOperations
| Modifier and Type | Method and Description |
|---|---|
long |
count(Query query,
Class<?> clazz)
return number of elements found by given query
|
long |
count(Query query,
Class<?> clazz,
IndexCoordinates index)
return number of elements found by given query
|
default long |
count(Query query,
IndexCoordinates index)
Return number of elements found by given query.
|
<T> List<SearchHits<T>> |
multiSearch(List<? extends Query> queries,
Class<T> clazz)
Execute the multi search query against elasticsearch and return result as
List of SearchHits. |
<T> List<SearchHits<T>> |
multiSearch(List<? extends Query> queries,
Class<T> clazz,
IndexCoordinates index)
Execute the multi search query against elasticsearch and return result as
List of SearchHits. |
List<SearchHits<?>> |
multiSearch(List<? extends Query> queries,
List<Class<?>> classes)
Execute the multi search query against elasticsearch and return result as
List of SearchHits. |
List<SearchHits<?>> |
multiSearch(List<? extends Query> queries,
List<Class<?>> classes,
IndexCoordinates index)
Execute the multi search query against elasticsearch and return result as
List of SearchHits. |
<T> SearchHits<T> |
search(MoreLikeThisQuery query,
Class<T> clazz)
more like this query to search for documents that are "like" a specific document.
|
<T> SearchHits<T> |
search(MoreLikeThisQuery query,
Class<T> clazz,
IndexCoordinates index)
more like this query to search for documents that are "like" a specific document.
|
<T> SearchHits<T> |
search(Query query,
Class<T> clazz)
Execute the criteria query against elasticsearch and return result as
SearchHits |
<T> SearchHits<T> |
search(Query query,
Class<T> clazz,
IndexCoordinates index)
Execute the criteria query against elasticsearch and return result as
SearchHits |
<T> SearchHitsIterator<T> |
searchForStream(Query query,
Class<T> clazz)
Executes the given
Query against elasticsearch and return result as SearchHitsIterator. |
<T> SearchHitsIterator<T> |
searchForStream(Query query,
Class<T> clazz,
IndexCoordinates index)
Executes the given
Query against elasticsearch and return result as SearchHitsIterator. |
default <T> SearchHit<T> |
searchOne(Query query,
Class<T> clazz)
Execute the query against elasticsearch and return the first returned object.
|
default <T> SearchHit<T> |
searchOne(Query query,
Class<T> clazz,
IndexCoordinates index)
Execute the query against elasticsearch and return the first returned object.
|
org.elasticsearch.action.search.SearchResponse |
suggest(org.elasticsearch.search.suggest.SuggestBuilder suggestion,
Class<?> clazz)
Does a suggest query
|
org.elasticsearch.action.search.SearchResponse |
suggest(org.elasticsearch.search.suggest.SuggestBuilder suggestion,
IndexCoordinates index)
Does a suggest query
|
default long count(Query query, IndexCoordinates index)
query - the query to executeindex - the index to run the query againstlong count(Query query, Class<?> clazz)
query - the query to executeclazz - the entity clazz used for property mapping and index name extractionlong count(Query query, @Nullable Class<?> clazz, IndexCoordinates index)
query - the query to executeclazz - the entity clazz used for property mappingindex - the index to run the query againstorg.elasticsearch.action.search.SearchResponse suggest(org.elasticsearch.search.suggest.SuggestBuilder suggestion,
Class<?> clazz)
suggestion - the queryclazz - the entity classorg.elasticsearch.action.search.SearchResponse suggest(org.elasticsearch.search.suggest.SuggestBuilder suggestion,
IndexCoordinates index)
suggestion - the queryindex - the index to run the query against@Nullable default <T> SearchHit<T> searchOne(Query query, Class<T> clazz)
query - the query to executeclazz - the entity clazz used for property mapping and indexname extraction@Nullable default <T> SearchHit<T> searchOne(Query query, Class<T> clazz, IndexCoordinates index)
query - the query to executeclazz - the entity clazz used for property mappingindex - the index to run the query against<T> List<SearchHits<T>> multiSearch(List<? extends Query> queries, Class<T> clazz)
List of SearchHits.T - element return typequeries - the queries to executeclazz - the entity clazz<T> List<SearchHits<T>> multiSearch(List<? extends Query> queries, Class<T> clazz, IndexCoordinates index)
List of SearchHits.T - element return typequeries - the queries to executeclazz - the entity clazz used for property mappingindex - the index to run the query againstList<SearchHits<?>> multiSearch(List<? extends Query> queries, List<Class<?>> classes)
List of SearchHits.queries - the queries to executeclasses - the entity classesList<SearchHits<?>> multiSearch(List<? extends Query> queries, List<Class<?>> classes, IndexCoordinates index)
List of SearchHits.queries - the queries to executeclasses - the entity classes used for property mappingindex - the index to run the query against<T> SearchHits<T> search(Query query, Class<T> clazz)
SearchHitsT - element return typequery - the query to executeclazz - the entity clazz used for property mapping and index name extraction<T> SearchHits<T> search(Query query, Class<T> clazz, IndexCoordinates index)
SearchHitsT - element return typequery - the query to executeclazz - the entity clazz used for property mappingindex - the index to run the query against<T> SearchHits<T> search(MoreLikeThisQuery query, Class<T> clazz)
T - element return typequery - the query to executeclazz - the entity clazz used for property mapping and index name extraction<T> SearchHits<T> search(MoreLikeThisQuery query, Class<T> clazz, IndexCoordinates index)
T - element return typequery - the query to executeclazz - the entity clazz used for property mappingindex - the index to run the query against<T> SearchHitsIterator<T> searchForStream(Query query, Class<T> clazz)
Query against elasticsearch and return result as SearchHitsIterator.
T - element return typequery - the query to executeclazz - the entity clazz used for property mapping and index name extractionSearchHitsIterator that wraps an Elasticsearch scroll context that needs to be closed. The
try-with-resources construct should be used to ensure that the close method is invoked after the operations
are completed.<T> SearchHitsIterator<T> searchForStream(Query query, Class<T> clazz, IndexCoordinates index)
Query against elasticsearch and return result as SearchHitsIterator.
T - element return typequery - the query to executeclazz - the entity clazz used for property mappingindex - the index to run the query againstSearchHitsIterator that wraps an Elasticsearch scroll context that needs to be closed. The
try-with-resources construct should be used to ensure that the close method is invoked after the operations
are completed.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.