Java Code Examples for org.elasticsearch.index.IndexService#fieldData()

The following examples show how to use org.elasticsearch.index.IndexService#fieldData() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PercolateContext.java    From Elasticsearch with Apache License 2.0 6 votes vote down vote up
public PercolateContext(PercolateShardRequest request, SearchShardTarget searchShardTarget, IndexShard indexShard,
                        IndexService indexService, PageCacheRecycler pageCacheRecycler,
                        BigArrays bigArrays, ScriptService scriptService, Query aliasFilter, ParseFieldMatcher parseFieldMatcher) {
    super(parseFieldMatcher, request);
    this.indexShard = indexShard;
    this.indexService = indexService;
    this.fieldDataService = indexService.fieldData();
    this.searchShardTarget = searchShardTarget;
    this.percolateQueries = indexShard.percolateRegistry().percolateQueries();
    this.types = new String[]{request.documentType()};
    this.pageCacheRecycler = pageCacheRecycler;
    this.bigArrays = bigArrays.withCircuitBreaking();
    this.querySearchResult = new QuerySearchResult(0, searchShardTarget);
    this.engineSearcher = indexShard.acquireSearcher("percolate");
    this.searcher = new ContextIndexSearcher(engineSearcher, indexService.cache().query(), indexShard.getQueryCachingPolicy());
    this.scriptService = scriptService;
    this.numberOfShards = request.getNumberOfShards();
    this.aliasFilter = aliasFilter;
    this.startTime = request.getStartTime();
}
 
Example 2
Source File: NodeFetchOperation.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
public FetchCollector createCollector(int readerId) {
    IndexService indexService = fetchContext.indexService(readerId);
    LuceneReferenceResolver resolver = new LuceneReferenceResolver(indexService.mapperService());
    ArrayList<LuceneCollectorExpression<?>> exprs = new ArrayList<>(refs.size());
    for (Reference reference : refs) {
        exprs.add(resolver.getImplementation(reference.info()));
    }
    return new FetchCollector(exprs,
            indexService.mapperService(),
            fetchContext.searcher(readerId),
            indexService.fieldData(),
            readerId
    );
}