elasticsearch aggregation 过程(未完)
2017-09-08 13:21
405 查看
在查询过程中,ES是将整个查询分成几个阶段的,大体如下:QueryPhase
rescorePhase
suggestPhase
aggregationPhase
FetchPhase
对于全文检索,可能还有DFSPhase。从源代码QueryPhase 类可以看出
rescorePhase
suggestPhase
aggregationPhase
FetchPhase
对于全文检索,可能还有DFSPhase。从源代码QueryPhase 类可以看出
@Override public void execute(SearchContext searchContext) throws QueryPhaseExecutionException { //创建AggregationContext, //初始化所有的Aggregator aggregationPhase.preProcess(searchContext); //实际query,还有聚合操作其实是在这部完成的 boolean rescore = execute(searchContext, searchContext.searcher()); //如果是全文检索,并且需要打分 if (rescore) { // only if we do a regular search rescorePhase.execute(searchContext); } suggestPhase.execute(searchContext); //获取聚合结果 aggregationPhase.execute(searchContext); if (searchContext.getProfilers() != null) { List<ProfileShardResult> shardResults = Profiler.buildShardResults(searchContext.getProfilers().getProfilers()); searchContext.queryResult().profileResults(shardResults); } }
相关文章推荐
- java API vs REST API in elasticSearch(未完)
- ElasticSearch Aggregation Bucket 实例分析
- springdata elasticsearch aggregation 操作
- Elasticsearch Terms Aggregation 根据某一项的聚合
- elasticsearch5.4.2安装以及插件head的安装过程
- elasticsearch5.4.2安装以及插件head的安装过程
- Elasticsearch Aggregation 多个字段分组统计 Java API实现
- elasticsearch aggregation script
- 分布式搜索Elasticsearch——项目过程(一)
- 分布式搜索Elasticsearch——项目过程(二)
- ElasticSearch+Springboot实际应用:索引同步建设,搜索过程
- elasticsearch aggregation 缓存
- Elasticsearch Aggregation 多个字段分组统计 Java API实现
- ElasticSearch Aggregation
- 分布式搜索Elasticsearch——项目过程(一)
- ElasticSearch AggregationBuilders java api常用聚会查询
- Elasticsearch Terms Aggregation 详解
- ElasticSearch——nested(mapping,query,aggregation)
- spring中应用模板模式封装ElasticsearchTemplate
- ElasticSearch Java API