首页  

elasticsearch profile 使用简介     所属分类 elasticsearch 浏览量 983
分析查询执行过程

/articles/_search


{
  "profile": "true",
  "query":{
    "term":{
      "content":"java架构师"
    }
  }
}

{
  "profile": "true",
  "query":{
    "match":{
      "content":"java架构师"
    }
  }
}

{
  "profile": "true",
  "query":{
    "match_phrase":{
      "content":"java架构师"
    }
  }
}


响应说明

每个分片分配一个唯一的ID,[nodeID][indexName][shardID]
[AcBTtwOAQGKNubltKmP2Lw][articles][0]

"type": "TermQuery",
"description": "content:java架构师",
    
    
"type": "BooleanQuery",
"description": "content:java content:架构师 content:架构 content:师",
    
"type": "PhraseQuery",
"description": "content:\"java 架构师 架构 师\"", 





query
rewrrite_time
collector

query部分

type  查询类型 譬如  TermQuery  BooleanQuery  PhraseQuery
description 
time   查询执行时间 毫秒
time_in_nanos   查询执行时间 纳秒 

breakdown   查询的更详细信息,主要与lucene参数有关
children    子查询信息 


{
    "type": "TermQuery",
    "description": "content:java架构师",
    "time": "0.3716460000ms",
    "time_in_nanos": 371646,
    "breakdown": {
        "score": 0,
        "build_scorer_count": 9,
        "match_count": 0,
        "create_weight": 369243,
        "next_doc": 0,
        "match": 0,
        "create_weight_count": 1,
        "next_doc_count": 0,
        "score_count": 0,
        "build_scorer": 2393,
        "advance": 0,
        "advance_count": 0
    }
}

Rewrite Time
将查询重写一个或多个组合查询的时间被称为“重写时间” 纳秒

Collectors

SimpleTopScoreDocCollector
TotalHitCountCollector

size=0 使用  TotalHitCountCollector

{
  "profile": "true",
  "size":0,
  "query":{   
    "match_phrase":{
      "content":"java架构师"
    }  
  }
}

上一篇     下一篇
elasticsearch禁用自动创建索引和类型

Elasticsearch 搜索 分词器 过滤器

elasticsearch使用7大原则

Elasticsearch聚合分析简介

elasticsearch 查询 DSL 指定分词器

elasticsearch query 和 filter 的区别