Merge pull request #18392 from colings86/docs/profiler_changes
Updates the documentation for the recent changes in the profiler
This commit is contained in:
commit
8547410eea
|
@ -176,3 +176,9 @@ The `coerce` and `ignore_malformed` parameters were deprecated in favour of `val
|
||||||
* Top level inner hits syntax has been removed. Inner hits can now only be specified as part of the `nested`,
|
* Top level inner hits syntax has been removed. Inner hits can now only be specified as part of the `nested`,
|
||||||
`has_child` and `has_parent` queries. Use cases previously only possible with top level inner hits can now be done
|
`has_child` and `has_parent` queries. Use cases previously only possible with top level inner hits can now be done
|
||||||
with inner hits defined inside the query dsl.
|
with inner hits defined inside the query dsl.
|
||||||
|
|
||||||
|
==== Query Profiler
|
||||||
|
|
||||||
|
In the response for profiling queries, the `query_type` has been renamed to `type` and `lucene` has been renamed to
|
||||||
|
`description`. These changes have been made so the response format is more friendly to supporting other types of profiling
|
||||||
|
in the future.
|
||||||
|
|
|
@ -65,8 +65,8 @@ This will yield the following result:
|
||||||
{
|
{
|
||||||
"query": [
|
"query": [
|
||||||
{
|
{
|
||||||
"query_type": "BooleanQuery",
|
"type": "BooleanQuery",
|
||||||
"lucene": "message:search message:test",
|
"description": "message:search message:test",
|
||||||
"time": "15.52889800ms",
|
"time": "15.52889800ms",
|
||||||
"breakdown": {
|
"breakdown": {
|
||||||
"score": 0,
|
"score": 0,
|
||||||
|
@ -78,8 +78,8 @@ This will yield the following result:
|
||||||
},
|
},
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"query_type": "TermQuery",
|
"type": "TermQuery",
|
||||||
"lucene": "message:search",
|
"description": "message:search",
|
||||||
"time": "4.938855000ms",
|
"time": "4.938855000ms",
|
||||||
"breakdown": {
|
"breakdown": {
|
||||||
"score": 0,
|
"score": 0,
|
||||||
|
@ -91,8 +91,8 @@ This will yield the following result:
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"query_type": "TermQuery",
|
"type": "TermQuery",
|
||||||
"lucene": "message:test",
|
"description": "message:test",
|
||||||
"time": "0.5016660000ms",
|
"time": "0.5016660000ms",
|
||||||
"breakdown": {
|
"breakdown": {
|
||||||
"score": 0,
|
"score": 0,
|
||||||
|
@ -180,20 +180,20 @@ The overall structure of this query tree will resemble your original Elasticsear
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
"query": [
|
"query": [
|
||||||
{
|
{
|
||||||
"query_type": "BooleanQuery",
|
"type": "BooleanQuery",
|
||||||
"lucene": "message:search message:test",
|
"description": "message:search message:test",
|
||||||
"time": "15.52889800ms",
|
"time": "15.52889800ms",
|
||||||
"breakdown": {...}, <1>
|
"breakdown": {...}, <1>
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"query_type": "TermQuery",
|
"type": "TermQuery",
|
||||||
"lucene": "message:search",
|
"description": "message:search",
|
||||||
"time": "4.938855000ms",
|
"time": "4.938855000ms",
|
||||||
"breakdown": {...}
|
"breakdown": {...}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"query_type": "TermQuery",
|
"type": "TermQuery",
|
||||||
"lucene": "message:test",
|
"description": "message:test",
|
||||||
"time": "0.5016660000ms",
|
"time": "0.5016660000ms",
|
||||||
"breakdown": {...}
|
"breakdown": {...}
|
||||||
}
|
}
|
||||||
|
@ -204,8 +204,8 @@ The overall structure of this query tree will resemble your original Elasticsear
|
||||||
<1> The breakdown timings are omitted for simplicity
|
<1> The breakdown timings are omitted for simplicity
|
||||||
|
|
||||||
Based on the profile structure, we can see that our `match` query was rewritten by Lucene into a BooleanQuery with two
|
Based on the profile structure, we can see that our `match` query was rewritten by Lucene into a BooleanQuery with two
|
||||||
clauses (both holding a TermQuery). The `"query_type"` field displays the Lucene class name, and often aligns with
|
clauses (both holding a TermQuery). The `"type"` field displays the Lucene class name, and often aligns with
|
||||||
the equivalent name in Elasticsearch. The `"lucene"` field displays the Lucene explanation text for the query, and
|
the equivalent name in Elasticsearch. The `"description"` field displays the Lucene explanation text for the query, and
|
||||||
is made available to help differentiating between parts of your query (e.g. both `"message:search"` and `"message:test"`
|
is made available to help differentiating between parts of your query (e.g. both `"message:search"` and `"message:test"`
|
||||||
are TermQuery's and would appear identical otherwise.
|
are TermQuery's and would appear identical otherwise.
|
||||||
|
|
||||||
|
@ -214,7 +214,7 @@ of all children.
|
||||||
|
|
||||||
The `"breakdown"` field will give detailed stats about how the time was spent, we'll look at
|
The `"breakdown"` field will give detailed stats about how the time was spent, we'll look at
|
||||||
that in a moment. Finally, the `"children"` array lists any sub-queries that may be present. Because we searched for two
|
that in a moment. Finally, the `"children"` array lists any sub-queries that may be present. Because we searched for two
|
||||||
values ("search test"), our BooleanQuery holds two children TermQueries. They have identical information (query_type, time,
|
values ("search test"), our BooleanQuery holds two children TermQueries. They have identical information (type, time,
|
||||||
breakdown, etc). Children are allowed to have their own children.
|
breakdown, etc). Children are allowed to have their own children.
|
||||||
|
|
||||||
==== Timing Breakdown
|
==== Timing Breakdown
|
||||||
|
@ -465,8 +465,8 @@ And the response:
|
||||||
{
|
{
|
||||||
"query": [
|
"query": [
|
||||||
{
|
{
|
||||||
"query_type": "TermQuery",
|
"type": "TermQuery",
|
||||||
"lucene": "my_field:foo",
|
"description": "my_field:foo",
|
||||||
"time": "0.4094560000ms",
|
"time": "0.4094560000ms",
|
||||||
"breakdown": {
|
"breakdown": {
|
||||||
"score": 0,
|
"score": 0,
|
||||||
|
@ -478,8 +478,8 @@ And the response:
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"query_type": "TermQuery",
|
"type": "TermQuery",
|
||||||
"lucene": "message:search",
|
"description": "message:search",
|
||||||
"time": "0.3037020000ms",
|
"time": "0.3037020000ms",
|
||||||
"breakdown": {
|
"breakdown": {
|
||||||
"score": 0,
|
"score": 0,
|
||||||
|
@ -522,8 +522,8 @@ And the response:
|
||||||
{
|
{
|
||||||
"query": [
|
"query": [
|
||||||
{
|
{
|
||||||
"query_type": "MatchAllDocsQuery",
|
"type": "MatchAllDocsQuery",
|
||||||
"lucene": "*:*",
|
"description": "*:*",
|
||||||
"time": "0.04829300000ms",
|
"time": "0.04829300000ms",
|
||||||
"breakdown": {
|
"breakdown": {
|
||||||
"score": 0,
|
"score": 0,
|
||||||
|
|
Loading…
Reference in New Issue