title: How to explain the query in elasticsearch
body: <p>I have a complex query in elasticsearch. it's slow. I want to optimize it.
  but i can't know how to work .
  how to explain the query , like Sql explain.</p>
  
  <p>i see elastichsearch _valite/query?explain . it can explain score.
  but I need to view detailed execution plan. </p>
  
  <pre><code>{
    "post_filter": {
      "bool": {
        "should": [
          {
            "bool": {
              "must": [
                {
                  "term": {
                    "base.sysCode": "2801"
                  }
                },
                {
                  "term": {
                    "base.status": [
                      12,
                      0
                    ]
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "fields": [
      "base.sysCode",
      "base.orderNo"
    ]
  }
  </code></pre>
  
  <p>result</p>
  
  <pre><code>{
  "valid": true,
  "_shards": {
  "total": 1,
  "successful": 1,
  "failed": 0
  },
  "explanations": [
  {
  "index": "odi_bus_betad_2013",
  "valid": true,
  "explanation": "ConstantScore(*:*)"
  }
  ]
  }
  </code></pre>