Package org.nuxeo.elasticsearch.core
Class ElasticSearchServiceImpl
java.lang.Object
org.nuxeo.elasticsearch.core.ElasticSearchServiceImpl
- All Implemented Interfaces:
ElasticSearchService
- Since:
- 6.0
-
Field Summary
Modifier and TypeFieldDescriptionprotected final io.dropwizard.metrics5.Timer
protected final io.dropwizard.metrics5.MetricRegistry
protected final io.dropwizard.metrics5.Timer
protected final io.dropwizard.metrics5.Timer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected org.opensearch.action.search.SearchScrollRequest
buildEsScrollRequest
(String scrollId, long keepAlive) protected org.opensearch.action.search.SearchRequest
buildEsSearchRequest
(NxQueryBuilder query, org.opensearch.action.search.SearchType searchType) protected org.opensearch.action.search.SearchRequest
buildEsSearchScrollRequest
(NxQueryBuilder query, org.opensearch.action.search.SearchType searchType, long keepAlive) protected void
clearScroll
(String scrollId) void
clearScroll
(EsScrollResult scrollResult) Clear scroll on ElasticSearch cluster for the givenEsScrollResult
.getAggregates
(NxQueryBuilder queryBuilder, org.opensearch.action.search.SearchResponse response) protected DocumentModelListImpl
getDocumentModels
(NxQueryBuilder queryBuilder, org.opensearch.action.search.SearchResponse response) protected EsScrollResult
getScrollResults
(NxQueryBuilder queryBuilder, org.opensearch.action.search.SearchResponse response, String scrollId, long keepAlive) protected String
protected void
logScrollRequest
(String scrollId, long keepAlive) protected void
logSearchRequest
(org.opensearch.action.search.SearchRequest request, NxQueryBuilder query, org.opensearch.action.search.SearchType searchType) protected org.opensearch.action.search.SearchResponse
nextScroll
(String scrollId, long keepAlive) query
(NxQueryBuilder queryBuilder) Returns a document list using anNxQueryBuilder
.queryAndAggregate
(NxQueryBuilder queryBuilder) Returns documents and aggregates.scroll
(EsScrollResult scrollResult) Retrieves the next batch of results of a scrollable search request for the givenEsScrollResult
.scroll
(NxQueryBuilder queryBuilder, long keepAlive) Performs the initial search of a scrollable search request using anNxQueryBuilder
.protected EsScrollResult
scroll
(NxQueryBuilder queryBuilder, org.opensearch.action.search.SearchType searchType, long keepAlive) protected org.opensearch.action.search.SearchResponse
search
(NxQueryBuilder query) protected org.opensearch.action.search.SearchResponse
searchScroll
(NxQueryBuilder query, org.opensearch.action.search.SearchType searchType, long keepAlive)
-
Field Details
-
registry
protected final io.dropwizard.metrics5.MetricRegistry registry -
searchTimer
protected final io.dropwizard.metrics5.Timer searchTimer -
scrollTimer
protected final io.dropwizard.metrics5.Timer scrollTimer -
fetchTimer
protected final io.dropwizard.metrics5.Timer fetchTimer
-
-
Constructor Details
-
ElasticSearchServiceImpl
-
-
Method Details
-
query
Description copied from interface:ElasticSearchService
Returns a document list using anNxQueryBuilder
.- Specified by:
query
in interfaceElasticSearchService
-
queryAndAggregate
Description copied from interface:ElasticSearchService
Returns documents and aggregates.- Specified by:
queryAndAggregate
in interfaceElasticSearchService
-
scroll
Description copied from interface:ElasticSearchService
Performs the initial search of a scrollable search request using anNxQueryBuilder
.- Specified by:
scroll
in interfaceElasticSearchService
keepAlive
- the search context lifetime- Returns:
- an
EsScrollResult
including the search results and a scroll id, to be passed to the subsequent calls toElasticSearchService.scroll(EsScrollResult)
-
scroll
protected EsScrollResult scroll(NxQueryBuilder queryBuilder, org.opensearch.action.search.SearchType searchType, long keepAlive) -
scroll
Description copied from interface:ElasticSearchService
Retrieves the next batch of results of a scrollable search request for the givenEsScrollResult
.- Specified by:
scroll
in interfaceElasticSearchService
- Returns:
- an
EsScrollResult
including the search results and a scroll id, to be passed to the subsequent calls to {code scroll}.
-
clearScroll
Description copied from interface:ElasticSearchService
Clear scroll on ElasticSearch cluster for the givenEsScrollResult
.- Specified by:
clearScroll
in interfaceElasticSearchService
-
clearScroll
-
getScrollResults
protected EsScrollResult getScrollResults(NxQueryBuilder queryBuilder, org.opensearch.action.search.SearchResponse response, String scrollId, long keepAlive) -
getDocumentModels
protected DocumentModelListImpl getDocumentModels(NxQueryBuilder queryBuilder, org.opensearch.action.search.SearchResponse response) -
getAggregates
protected List<Aggregate<Bucket>> getAggregates(NxQueryBuilder queryBuilder, org.opensearch.action.search.SearchResponse response) -
search
-
searchScroll
protected org.opensearch.action.search.SearchResponse searchScroll(NxQueryBuilder query, org.opensearch.action.search.SearchType searchType, long keepAlive) -
nextScroll
-
buildEsSearchRequest
protected org.opensearch.action.search.SearchRequest buildEsSearchRequest(NxQueryBuilder query, org.opensearch.action.search.SearchType searchType) -
buildEsSearchScrollRequest
protected org.opensearch.action.search.SearchRequest buildEsSearchScrollRequest(NxQueryBuilder query, org.opensearch.action.search.SearchType searchType, long keepAlive) -
buildEsScrollRequest
protected org.opensearch.action.search.SearchScrollRequest buildEsScrollRequest(String scrollId, long keepAlive) -
logSearchRequest
protected void logSearchRequest(org.opensearch.action.search.SearchRequest request, NxQueryBuilder query, org.opensearch.action.search.SearchType searchType) -
logScrollRequest
-
getSearchIndexesAsString
-