Mastering Kibana 6.x: Visualize your Elastic Stack data with histograms, maps, charts, and graphs by Anurag Srivastava

Mastering Kibana 6.x: Visualize your Elastic Stack data with histograms, maps, charts, and graphs by Anurag Srivastava

Author:Anurag Srivastava [Srivastava, Anurag]
Language: eng
Format: epub
Tags: COM021050 - COMPUTERS / Databases / Servers, COM018000 - COMPUTERS / Data Processing, COM089000 - COMPUTERS / Data Visualization
Publisher: Packt Publishing
Published: 2018-07-30T23:00:00+00:00


In the preceding screen, we can see the type of shard with Self Time, Total Time, and % Time. If we hover on the type name, a right pane data appears with timing breakdown upto Lucene method-level details of the query. Search Profiler shows the name of searched indices, below them the shards in each index and then the query execution time.

In the previous example, it is showing the query type as MatchAllDocsQuery, and that is why the Self Time and Total Time is the same.

Now I am going to explain it by creating a fresh index:

POST profiletest/test/_bulk

{"index":{}}

{"name":"anurag","age":35,"email":"[email protected]"}

{"index":{}}

{"name":"amit","age":29,"email":"[email protected]"}

{"index":{}}

{"name":"suresh","age":49,"email":"[email protected]"}

{"index":{}}

{"name":"mahesh","age":21,"email":"[email protected]"}

{"index":{}}

{"name":"atul","age":32,"email":"[email protected]"}

After creating this index, we can go to the Query Profile screen and change the _all index to the profiletest index. Now to do the little complex query, I am going to change a match_all query and search as follows:

{

"query": {

"bool": {

"should": [

{

"match": {

"name": "anurag"

}

},

{

"terms": {

"name": [

"mahesh",

"atul"

]

}

}

]

}

},

"aggs": {

"stats": {

"stats": {

"field": "email"

}

}

}

}

In the preceding query, I am doing a query with two subquery components—one for search and another for simple aggregation. Now on clicking the Profile button, we would get the following screen:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.