0
0
Elasticsearchquery~10 mins

Why Kibana visualizes Elasticsearch data - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create an index in Elasticsearch.

Elasticsearch
PUT /[1]
Drag options to blanks, or click blank then click option'
Adata-store
Bsearch-data
Clogs
Dmy-index
Attempts:
3 left
💡 Hint
Common Mistakes
Using uppercase letters in the index name.
Forgetting to specify the index name.
2fill in blank
medium

Complete the code to add a document to the Elasticsearch index.

Elasticsearch
POST /my-index/_doc/[1] 
{
  "user": "alice",
  "message": "Hello Kibana!"
}
Drag options to blanks, or click blank then click option'
Adoc1
B1
Cuser1
Dmsg1
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting the document ID.
Using spaces or special characters in the ID.
3fill in blank
hard

Fix the error in the query to retrieve all documents from the index.

Elasticsearch
GET /my-index/_search
{
  "query": {
    [1]: { "match_all": {} }
  }
}
Drag options to blanks, or click blank then click option'
Amatch_all
Bmatch
Cquery
Dterm
Attempts:
3 left
💡 Hint
Common Mistakes
Using query, which is not a valid query type.
Using match which expects a field.
4fill in blank
hard

Fill both blanks to create a Kibana visualization that shows the count of documents per user.

Elasticsearch
{
  "aggs": {
    "users": {
      [1]: {
        "field": "[2]"
      }
    }
  }
}
Drag options to blanks, or click blank then click option'
Aterms
Bcount
Cuser
Dmessage
Attempts:
3 left
💡 Hint
Common Mistakes
Using count as aggregation type which is invalid here.
Using message field instead of user.
5fill in blank
hard

Fill all three blanks to filter documents where the message contains 'Kibana' and visualize the count per user.

Elasticsearch
{
  "query": {
    "match": {
      "[1]": "Kibana"
    }
  },
  "aggs": {
    "users": {
      "[2]": {
        "field": "[3]"
      }
    }
  }
}
Drag options to blanks, or click blank then click option'
Amessage
Bterms
Cuser
Dmatch_all
Attempts:
3 left
💡 Hint
Common Mistakes
Using match_all in the query instead of match.
Mixing up the aggregation type or field names.