当前位置: 首页>>代码示例>>Java>>正文


Java FetchPhase类代码示例

本文整理汇总了Java中org.elasticsearch.search.fetch.FetchPhase的典型用法代码示例。如果您正苦于以下问题:Java FetchPhase类的具体用法?Java FetchPhase怎么用?Java FetchPhase使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


FetchPhase类属于org.elasticsearch.search.fetch包,在下文中一共展示了FetchPhase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: SearchService

import org.elasticsearch.search.fetch.FetchPhase; //导入依赖的package包/类
public SearchService(ClusterService clusterService, IndicesService indicesService,
                     ThreadPool threadPool, ScriptService scriptService, BigArrays bigArrays, FetchPhase fetchPhase) {
    super(clusterService.getSettings());
    this.threadPool = threadPool;
    this.clusterService = clusterService;
    this.indicesService = indicesService;
    this.scriptService = scriptService;
    this.bigArrays = bigArrays;
    this.queryPhase = new QueryPhase(settings);
    this.fetchPhase = fetchPhase;

    TimeValue keepAliveInterval = KEEPALIVE_INTERVAL_SETTING.get(settings);
    this.defaultKeepAlive = DEFAULT_KEEPALIVE_SETTING.get(settings).millis();

    this.keepAliveReaper = threadPool.scheduleWithFixedDelay(new Reaper(), keepAliveInterval, Names.SAME);

    defaultSearchTimeout = DEFAULT_SEARCH_TIMEOUT_SETTING.get(settings);
    clusterService.getClusterSettings().addSettingsUpdateConsumer(DEFAULT_SEARCH_TIMEOUT_SETTING, this::setDefaultSearchTimeout);

    lowLevelCancellation = LOW_LEVEL_CANCELLATION_SETTING.get(settings);
    clusterService.getClusterSettings().addSettingsUpdateConsumer(LOW_LEVEL_CANCELLATION_SETTING, this::setLowLevelCancellation);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:23,代码来源:SearchService.java

示例2: DefaultSearchContext

import org.elasticsearch.search.fetch.FetchPhase; //导入依赖的package包/类
DefaultSearchContext(long id, ShardSearchRequest request, SearchShardTarget shardTarget, Engine.Searcher engineSearcher,
                     IndexService indexService, IndexShard indexShard,
                     BigArrays bigArrays, Counter timeEstimateCounter, TimeValue timeout, FetchPhase fetchPhase) {
    this.id = id;
    this.request = request;
    this.fetchPhase = fetchPhase;
    this.searchType = request.searchType();
    this.shardTarget = shardTarget;
    this.engineSearcher = engineSearcher;
    // SearchContexts use a BigArrays that can circuit break
    this.bigArrays = bigArrays.withCircuitBreaking();
    this.dfsResult = new DfsSearchResult(id, shardTarget);
    this.queryResult = new QuerySearchResult(id, shardTarget);
    this.fetchResult = new FetchSearchResult(id, shardTarget);
    this.indexShard = indexShard;
    this.indexService = indexService;
    this.searcher = new ContextIndexSearcher(engineSearcher, indexService.cache().query(), indexShard.getQueryCachingPolicy());
    this.timeEstimateCounter = timeEstimateCounter;
    this.timeout = timeout;
    queryShardContext = indexService.newQueryShardContext(request.shardId().id(), searcher.getIndexReader(), request::nowInMillis);
    queryShardContext.setTypes(request.types());
    queryBoost = request.indexBoost();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:24,代码来源:DefaultSearchContext.java

示例3: newSearchService

import org.elasticsearch.search.fetch.FetchPhase; //导入依赖的package包/类
@Override
protected SearchService newSearchService(ClusterService clusterService, IndicesService indicesService,
                                         ThreadPool threadPool, ScriptService scriptService, BigArrays bigArrays,
                                         FetchPhase fetchPhase) {
    if (getPluginsService().filterPlugins(MockSearchService.TestPlugin.class).isEmpty()) {
        return super.newSearchService(clusterService, indicesService, threadPool, scriptService, bigArrays, fetchPhase);
    }
    return new MockSearchService(clusterService, indicesService, threadPool, scriptService, bigArrays, fetchPhase);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:10,代码来源:MockNode.java

示例4: TopHitsAggregator

import org.elasticsearch.search.fetch.FetchPhase; //导入依赖的package包/类
public TopHitsAggregator(FetchPhase fetchPhase, SubSearchContext subSearchContext, String name, SearchContext context,
        Aggregator parent, List<PipelineAggregator> pipelineAggregators, Map<String, Object> metaData) throws IOException {
    super(name, context, parent, pipelineAggregators, metaData);
    this.fetchPhase = fetchPhase;
    topDocsCollectors = new LongObjectPagedHashMap<>(1, context.bigArrays());
    this.subSearchContext = subSearchContext;
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:8,代码来源:TopHitsAggregator.java

示例5: TopHitsParser

import org.elasticsearch.search.fetch.FetchPhase; //导入依赖的package包/类
@Inject
public TopHitsParser(FetchPhase fetchPhase, SortParseElement sortParseElement, FetchSourceParseElement sourceParseElement,
        HighlighterParseElement highlighterParseElement, FieldDataFieldsParseElement fieldDataFieldsParseElement,
        ScriptFieldsParseElement scriptFieldsParseElement, FieldsParseElement fieldsParseElement) {
    this.fetchPhase = fetchPhase;
    this.sortParseElement = sortParseElement;
    this.sourceParseElement = sourceParseElement;
    this.highlighterParseElement = highlighterParseElement;
    this.fieldDataFieldsParseElement = fieldDataFieldsParseElement;
    this.scriptFieldsParseElement = scriptFieldsParseElement;
    this.fieldsParseElement = fieldsParseElement;
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:13,代码来源:TopHitsParser.java

示例6: TopHitsAggregator

import org.elasticsearch.search.fetch.FetchPhase; //导入依赖的package包/类
public TopHitsAggregator(FetchPhase fetchPhase, SubSearchContext subSearchContext, String name, AggregationContext context,
        Aggregator parent, List<PipelineAggregator> pipelineAggregators, Map<String, Object> metaData) throws IOException {
    super(name, context, parent, pipelineAggregators, metaData);
    this.fetchPhase = fetchPhase;
    topDocsCollectors = new LongObjectPagedHashMap<>(1, context.bigArrays());
    this.subSearchContext = subSearchContext;
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:8,代码来源:TopHitsAggregator.java

示例7: configureSearch

import org.elasticsearch.search.fetch.FetchPhase; //导入依赖的package包/类
protected void configureSearch() {
    // configure search private classes...
    bind(DfsPhase.class).asEagerSingleton();
    bind(QueryPhase.class).asEagerSingleton();
    bind(SearchPhaseController.class).asEagerSingleton();
    bind(FetchPhase.class).asEagerSingleton();
    bind(SearchServiceTransportAction.class).asEagerSingleton();
    bind(MoreLikeThisFetchService.class).asEagerSingleton();

    if (searchServiceImpl == SearchService.class) {
        bind(SearchService.class).asEagerSingleton();
    } else {
        bind(SearchService.class).to(searchServiceImpl).asEagerSingleton();
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:16,代码来源:SearchModule.java

示例8: DumpParser

import org.elasticsearch.search.fetch.FetchPhase; //导入依赖的package包/类
@Inject
public DumpParser(QueryPhase queryPhase, FetchPhase fetchPhase) {
    Map<String, SearchParseElement> elementParsers = new HashMap<String, SearchParseElement>();
    elementParsers.putAll(queryPhase.parseElements());
    elementParsers.put("force_overwrite", new ExportForceOverwriteParseElement());
    elementParsers.put("directory", directoryParseElement);
    this.elementParsers = ImmutableMap.copyOf(elementParsers);
}
 
开发者ID:crate,项目名称:elasticsearch-inout-plugin,代码行数:9,代码来源:DumpParser.java

示例9: ReindexParser

import org.elasticsearch.search.fetch.FetchPhase; //导入依赖的package包/类
@Inject
public ReindexParser(QueryPhase queryPhase, FetchPhase fetchPhase) {
    Map<String, SearchParseElement> elementParsers = new HashMap<String,
            SearchParseElement>();
    elementParsers.putAll(queryPhase.parseElements());
    elementParsers.put("explain", new ExplainParseElement());
    this.elementParsers = ImmutableMap.copyOf(elementParsers);
}
 
开发者ID:crate,项目名称:elasticsearch-inout-plugin,代码行数:9,代码来源:ReindexParser.java

示例10: SearchIntoParser

import org.elasticsearch.search.fetch.FetchPhase; //导入依赖的package包/类
@Inject
public SearchIntoParser(QueryPhase queryPhase, FetchPhase fetchPhase) {
    Map<String, SearchParseElement> elementParsers = new HashMap<String,
            SearchParseElement>();
    elementParsers.putAll(queryPhase.parseElements());
    elementParsers.put("fields", new FieldsParseElement());
    elementParsers.put("targetNodes", new TargetNodesParseElement());
    elementParsers.put("explain", new ExplainParseElement());
    this.elementParsers = ImmutableMap.copyOf(elementParsers);
}
 
开发者ID:crate,项目名称:elasticsearch-inout-plugin,代码行数:11,代码来源:SearchIntoParser.java

示例11: ExportParser

import org.elasticsearch.search.fetch.FetchPhase; //导入依赖的package包/类
@Inject
public ExportParser(QueryPhase queryPhase, FetchPhase fetchPhase) {
    Map<String, SearchParseElement> elementParsers = new HashMap<String, SearchParseElement>();
    elementParsers.putAll(queryPhase.parseElements());
    elementParsers.put("fields", new FieldsParseElement());
    elementParsers.put("output_cmd", new ExportOutputCmdParseElement());
    elementParsers.put("output_file", new ExportOutputFileParseElement());
    elementParsers.put("force_overwrite", new ExportForceOverwriteParseElement());
    elementParsers.put("compression", new ExportCompressionParseElement());
    elementParsers.put("explain", new ExplainParseElement());
    elementParsers.put("mappings", new ExportMappingsParseElement());
    elementParsers.put("settings", new ExportSettingsParseElement());
    this.elementParsers = ImmutableMap.copyOf(elementParsers);
}
 
开发者ID:crate,项目名称:elasticsearch-inout-plugin,代码行数:15,代码来源:ExportParser.java

示例12: MockSearchService

import org.elasticsearch.search.fetch.FetchPhase; //导入依赖的package包/类
public MockSearchService(ClusterService clusterService,
        IndicesService indicesService, ThreadPool threadPool, ScriptService scriptService,
        BigArrays bigArrays, FetchPhase fetchPhase) {
    super(clusterService, indicesService, threadPool, scriptService, bigArrays, fetchPhase);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:6,代码来源:MockSearchService.java

示例13: fetchPhase

import org.elasticsearch.search.fetch.FetchPhase; //导入依赖的package包/类
@Override
public FetchPhase fetchPhase() {
    return null;
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:5,代码来源:TestSearchContext.java

示例14: InnerHitsFetchSubPhase

import org.elasticsearch.search.fetch.FetchPhase; //导入依赖的package包/类
public InnerHitsFetchSubPhase(FetchPhase fetchPhase) {
    this.fetchPhase = fetchPhase;
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:4,代码来源:InnerHitsFetchSubPhase.java

示例15: fetchPhase

import org.elasticsearch.search.fetch.FetchPhase; //导入依赖的package包/类
@Override
public FetchPhase fetchPhase() {
    return in.fetchPhase();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:5,代码来源:FilteredSearchContext.java


注:本文中的org.elasticsearch.search.fetch.FetchPhase类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。