Package org.nuxeo.elasticsearch.core
Class ElasticSearchServiceImpl
- java.lang.Object
-
- org.nuxeo.elasticsearch.core.ElasticSearchServiceImpl
-
- All Implemented Interfaces:
ElasticSearchService
public class ElasticSearchServiceImpl extends Object implements ElasticSearchService
- Since:
- 6.0
-
-
Field Summary
Fields Modifier and Type Field Description protected io.dropwizard.metrics5.TimerfetchTimerprotected io.dropwizard.metrics5.MetricRegistryregistryprotected io.dropwizard.metrics5.TimerscrollTimerprotected io.dropwizard.metrics5.TimersearchTimer
-
Constructor Summary
Constructors Constructor Description ElasticSearchServiceImpl(ElasticSearchAdminImpl esa)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected org.elasticsearch.action.search.SearchScrollRequestbuildEsScrollRequest(String scrollId, long keepAlive)protected org.elasticsearch.action.search.SearchRequestbuildEsSearchRequest(NxQueryBuilder query, org.elasticsearch.action.search.SearchType searchType)protected org.elasticsearch.action.search.SearchRequestbuildEsSearchScrollRequest(NxQueryBuilder query, org.elasticsearch.action.search.SearchType searchType, long keepAlive)protected voidclearScroll(String scrollId)voidclearScroll(EsScrollResult scrollResult)Clear scroll on ElasticSearch cluster for the givenEsScrollResult.protected List<Aggregate<Bucket>>getAggregates(NxQueryBuilder queryBuilder, org.elasticsearch.action.search.SearchResponse response)protected DocumentModelListImplgetDocumentModels(NxQueryBuilder queryBuilder, org.elasticsearch.action.search.SearchResponse response)protected EsScrollResultgetScrollResults(NxQueryBuilder queryBuilder, org.elasticsearch.action.search.SearchResponse response, String scrollId, long keepAlive)protected StringgetSearchIndexesAsString(NxQueryBuilder query)protected voidlogScrollRequest(String scrollId, long keepAlive)protected voidlogSearchRequest(org.elasticsearch.action.search.SearchRequest request, NxQueryBuilder query, org.elasticsearch.action.search.SearchType searchType)protected voidlogSearchResponse(org.elasticsearch.action.search.SearchResponse response)protected org.elasticsearch.action.search.SearchResponsenextScroll(String scrollId, long keepAlive)DocumentModelListquery(CoreSession session, String nxql, int limit, int offset, SortInfo... sortInfos)Deprecated.DocumentModelListquery(CoreSession session, org.elasticsearch.index.query.QueryBuilder queryBuilder, int limit, int offset, SortInfo... sortInfos)Deprecated.DocumentModelListquery(NxQueryBuilder queryBuilder)Returns a document list using anNxQueryBuilder.EsResultqueryAndAggregate(NxQueryBuilder queryBuilder)Returns documents and aggregates.EsScrollResultscroll(EsScrollResult scrollResult)Retrieves the next batch of results of a scrollable search request for the givenEsScrollResult.EsScrollResultscroll(NxQueryBuilder queryBuilder, long keepAlive)Performs the initial search of a scrollable search request using anNxQueryBuilder.protected EsScrollResultscroll(NxQueryBuilder queryBuilder, org.elasticsearch.action.search.SearchType searchType, long keepAlive)protected org.elasticsearch.action.search.SearchResponsesearch(NxQueryBuilder query)protected org.elasticsearch.action.search.SearchResponsesearchScroll(NxQueryBuilder query, org.elasticsearch.action.search.SearchType searchType, long keepAlive)
-
-
-
Constructor Detail
-
ElasticSearchServiceImpl
public ElasticSearchServiceImpl(ElasticSearchAdminImpl esa)
-
-
Method Detail
-
query
@Deprecated public DocumentModelList query(CoreSession session, String nxql, int limit, int offset, SortInfo... sortInfos)
Deprecated.Description copied from interface:ElasticSearchServiceReturns a document list using an NXQL query. Fetch documents from the VCS repository.- Specified by:
queryin interfaceElasticSearchService
-
query
@Deprecated public DocumentModelList query(CoreSession session, org.elasticsearch.index.query.QueryBuilder queryBuilder, int limit, int offset, SortInfo... sortInfos)
Deprecated.Description copied from interface:ElasticSearchServiceReturns a document list using an ElasticSearchQueryBuilder. Fetch documents from the VCS repository.- Specified by:
queryin interfaceElasticSearchService
-
query
public DocumentModelList query(NxQueryBuilder queryBuilder)
Description copied from interface:ElasticSearchServiceReturns a document list using anNxQueryBuilder.- Specified by:
queryin interfaceElasticSearchService
-
queryAndAggregate
public EsResult queryAndAggregate(NxQueryBuilder queryBuilder)
Description copied from interface:ElasticSearchServiceReturns documents and aggregates.- Specified by:
queryAndAggregatein interfaceElasticSearchService
-
scroll
public EsScrollResult scroll(NxQueryBuilder queryBuilder, long keepAlive)
Description copied from interface:ElasticSearchServicePerforms the initial search of a scrollable search request using anNxQueryBuilder.- Specified by:
scrollin interfaceElasticSearchServicekeepAlive- the search context lifetime- Returns:
- an
EsScrollResultincluding the search results and a scroll id, to be passed to the subsequent calls toElasticSearchService.scroll(EsScrollResult)
-
scroll
protected EsScrollResult scroll(NxQueryBuilder queryBuilder, org.elasticsearch.action.search.SearchType searchType, long keepAlive)
-
scroll
public EsScrollResult scroll(EsScrollResult scrollResult)
Description copied from interface:ElasticSearchServiceRetrieves the next batch of results of a scrollable search request for the givenEsScrollResult.- Specified by:
scrollin interfaceElasticSearchService- Returns:
- an
EsScrollResultincluding the search results and a scroll id, to be passed to the subsequent calls to {code scroll}.
-
clearScroll
public void clearScroll(EsScrollResult scrollResult)
Description copied from interface:ElasticSearchServiceClear scroll on ElasticSearch cluster for the givenEsScrollResult.- Specified by:
clearScrollin interfaceElasticSearchService
-
clearScroll
protected void clearScroll(String scrollId)
-
getScrollResults
protected EsScrollResult getScrollResults(NxQueryBuilder queryBuilder, org.elasticsearch.action.search.SearchResponse response, String scrollId, long keepAlive)
-
getDocumentModels
protected DocumentModelListImpl getDocumentModels(NxQueryBuilder queryBuilder, org.elasticsearch.action.search.SearchResponse response)
-
getAggregates
protected List<Aggregate<Bucket>> getAggregates(NxQueryBuilder queryBuilder, org.elasticsearch.action.search.SearchResponse response)
-
search
protected org.elasticsearch.action.search.SearchResponse search(NxQueryBuilder query)
-
searchScroll
protected org.elasticsearch.action.search.SearchResponse searchScroll(NxQueryBuilder query, org.elasticsearch.action.search.SearchType searchType, long keepAlive)
-
nextScroll
protected org.elasticsearch.action.search.SearchResponse nextScroll(String scrollId, long keepAlive)
-
buildEsSearchRequest
protected org.elasticsearch.action.search.SearchRequest buildEsSearchRequest(NxQueryBuilder query, org.elasticsearch.action.search.SearchType searchType)
-
buildEsSearchScrollRequest
protected org.elasticsearch.action.search.SearchRequest buildEsSearchScrollRequest(NxQueryBuilder query, org.elasticsearch.action.search.SearchType searchType, long keepAlive)
-
buildEsScrollRequest
protected org.elasticsearch.action.search.SearchScrollRequest buildEsScrollRequest(String scrollId, long keepAlive)
-
logSearchResponse
protected void logSearchResponse(org.elasticsearch.action.search.SearchResponse response)
-
logSearchRequest
protected void logSearchRequest(org.elasticsearch.action.search.SearchRequest request, NxQueryBuilder query, org.elasticsearch.action.search.SearchType searchType)
-
logScrollRequest
protected void logScrollRequest(String scrollId, long keepAlive)
-
getSearchIndexesAsString
protected String getSearchIndexesAsString(NxQueryBuilder query)
-
-