public class ElasticSearchServiceImpl extends Object implements ElasticSearchService
Modifier and Type | Field and Description |
---|---|
protected com.codahale.metrics.Timer |
fetchTimer |
protected com.codahale.metrics.MetricRegistry |
registry |
protected com.codahale.metrics.Timer |
scrollTimer |
protected com.codahale.metrics.Timer |
searchTimer |
Constructor and Description |
---|
ElasticSearchServiceImpl(ElasticSearchAdminImpl esa) |
Modifier and Type | Method and Description |
---|---|
protected org.elasticsearch.action.search.SearchScrollRequestBuilder |
buildEsScrollRequest(String scrollId,
long keepAlive) |
protected org.elasticsearch.action.search.SearchRequestBuilder |
buildEsSearchRequest(NxQueryBuilder query,
org.elasticsearch.action.search.SearchType searchType) |
protected org.elasticsearch.action.search.SearchRequestBuilder |
buildEsSearchScrollRequest(NxQueryBuilder query,
org.elasticsearch.action.search.SearchType searchType,
long keepAlive) |
void |
clearScroll(EsScrollResult scrollResult)
Clear scroll on ElasticSearch cluster for the given
EsScrollResult . |
protected void |
clearScroll(String scrollId) |
protected List<Aggregate<Bucket>> |
getAggregates(NxQueryBuilder queryBuilder,
org.elasticsearch.action.search.SearchResponse response) |
protected DocumentModelListImpl |
getDocumentModels(NxQueryBuilder queryBuilder,
org.elasticsearch.action.search.SearchResponse response) |
protected EsScrollResult |
getScrollResults(NxQueryBuilder queryBuilder,
org.elasticsearch.action.search.SearchResponse response,
String scrollId,
long keepAlive) |
protected String |
getSearchIndexesAsString(NxQueryBuilder query) |
protected void |
logScrollRequest(String scrollId,
long keepAlive) |
protected void |
logSearchRequest(org.elasticsearch.action.search.SearchRequestBuilder request,
NxQueryBuilder query,
org.elasticsearch.action.search.SearchType searchType) |
protected void |
logSearchRequest(org.elasticsearch.action.search.SearchRequestBuilder request,
NxQueryBuilder query,
org.elasticsearch.action.search.SearchType searchType,
Long keepAlive) |
protected void |
logSearchResponse(org.elasticsearch.action.search.SearchResponse response) |
protected org.elasticsearch.action.search.SearchResponse |
nextScroll(String scrollId,
long keepAlive) |
DocumentModelList |
query(CoreSession session,
org.elasticsearch.index.query.QueryBuilder queryBuilder,
int limit,
int offset,
SortInfo... sortInfos)
Deprecated.
|
DocumentModelList |
query(CoreSession session,
String nxql,
int limit,
int offset,
SortInfo... sortInfos)
Deprecated.
|
DocumentModelList |
query(NxQueryBuilder queryBuilder)
Returns a document list using an
NxQueryBuilder . |
EsResult |
queryAndAggregate(NxQueryBuilder queryBuilder)
Returns documents and aggregates.
|
EsScrollResult |
scroll(EsScrollResult scrollResult)
Retrieves the next batch of results of a scrollable search request for the given
EsScrollResult . |
EsScrollResult |
scroll(NxQueryBuilder queryBuilder,
long keepAlive)
Performs the initial search of a scrollable search request using an
NxQueryBuilder . |
protected EsScrollResult |
scroll(NxQueryBuilder queryBuilder,
org.elasticsearch.action.search.SearchType searchType,
long keepAlive) |
protected org.elasticsearch.action.search.SearchResponse |
search(NxQueryBuilder query) |
protected org.elasticsearch.action.search.SearchResponse |
searchScroll(NxQueryBuilder query,
org.elasticsearch.action.search.SearchType searchType,
long keepAlive) |
protected final com.codahale.metrics.MetricRegistry registry
protected final com.codahale.metrics.Timer searchTimer
protected final com.codahale.metrics.Timer scrollTimer
protected final com.codahale.metrics.Timer fetchTimer
public ElasticSearchServiceImpl(ElasticSearchAdminImpl esa)
@Deprecated public DocumentModelList query(CoreSession session, String nxql, int limit, int offset, SortInfo... sortInfos)
ElasticSearchService
query
in interface ElasticSearchService
@Deprecated public DocumentModelList query(CoreSession session, org.elasticsearch.index.query.QueryBuilder queryBuilder, int limit, int offset, SortInfo... sortInfos)
ElasticSearchService
QueryBuilder
. Fetch documents from the VCS repository.query
in interface ElasticSearchService
public DocumentModelList query(NxQueryBuilder queryBuilder)
ElasticSearchService
NxQueryBuilder
.query
in interface ElasticSearchService
public EsResult queryAndAggregate(NxQueryBuilder queryBuilder)
ElasticSearchService
queryAndAggregate
in interface ElasticSearchService
public EsScrollResult scroll(NxQueryBuilder queryBuilder, long keepAlive)
ElasticSearchService
NxQueryBuilder
.scroll
in interface ElasticSearchService
keepAlive
- the search context lifetimeEsScrollResult
including the search results and a scroll id, to be passed to the subsequent
calls to ElasticSearchService.scroll(EsScrollResult)
protected EsScrollResult scroll(NxQueryBuilder queryBuilder, org.elasticsearch.action.search.SearchType searchType, long keepAlive)
public EsScrollResult scroll(EsScrollResult scrollResult)
ElasticSearchService
EsScrollResult
.scroll
in interface ElasticSearchService
EsScrollResult
including the search results and a scroll id, to be passed to the subsequent
calls to ElasticSearchService.scroll(EsScrollResult)
public void clearScroll(EsScrollResult scrollResult)
ElasticSearchService
EsScrollResult
.clearScroll
in interface ElasticSearchService
protected void clearScroll(String scrollId)
protected EsScrollResult getScrollResults(NxQueryBuilder queryBuilder, org.elasticsearch.action.search.SearchResponse response, String scrollId, long keepAlive)
protected DocumentModelListImpl getDocumentModels(NxQueryBuilder queryBuilder, org.elasticsearch.action.search.SearchResponse response)
protected List<Aggregate<Bucket>> getAggregates(NxQueryBuilder queryBuilder, org.elasticsearch.action.search.SearchResponse response)
protected org.elasticsearch.action.search.SearchResponse search(NxQueryBuilder query)
protected org.elasticsearch.action.search.SearchResponse searchScroll(NxQueryBuilder query, org.elasticsearch.action.search.SearchType searchType, long keepAlive)
protected org.elasticsearch.action.search.SearchResponse nextScroll(String scrollId, long keepAlive)
protected org.elasticsearch.action.search.SearchRequestBuilder buildEsSearchRequest(NxQueryBuilder query, org.elasticsearch.action.search.SearchType searchType)
protected org.elasticsearch.action.search.SearchRequestBuilder buildEsSearchScrollRequest(NxQueryBuilder query, org.elasticsearch.action.search.SearchType searchType, long keepAlive)
protected org.elasticsearch.action.search.SearchScrollRequestBuilder buildEsScrollRequest(String scrollId, long keepAlive)
protected void logSearchResponse(org.elasticsearch.action.search.SearchResponse response)
protected void logSearchRequest(org.elasticsearch.action.search.SearchRequestBuilder request, NxQueryBuilder query, org.elasticsearch.action.search.SearchType searchType)
protected void logSearchRequest(org.elasticsearch.action.search.SearchRequestBuilder request, NxQueryBuilder query, org.elasticsearch.action.search.SearchType searchType, Long keepAlive)
protected void logScrollRequest(String scrollId, long keepAlive)
protected String getSearchIndexesAsString(NxQueryBuilder query)
Copyright © 2016 Nuxeo SA. All rights reserved.