Challenge - 5 Problems
Discover Data Explorer
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2:00remaining
What is the output of this Elasticsearch query in Discover?
Given the following Elasticsearch query used in Discover to filter documents, what will be the count of returned documents if the index contains 100 documents with field
status values distributed as 40 'open', 30 'closed', and 30 'pending'?Elasticsearch
{
"query": {
"term": {
"status": "open"
}
}
}Attempts:
2 left
💡 Hint
The term query matches documents where the field exactly matches the given value.
✗ Incorrect
The term query filters documents where the field 'status' is exactly 'open'. Since there are 40 such documents, the output count is 40.
🧠 Conceptual
intermediate2:00remaining
Which aggregation type is best to explore the distribution of a numeric field in Discover?
You want to explore how values of a numeric field
price are distributed in your data using Discover. Which aggregation type should you use?Attempts:
2 left
💡 Hint
Think about grouping numeric values into buckets of equal size.
✗ Incorrect
Histogram aggregation groups numeric values into buckets of fixed intervals, which helps explore the distribution of numeric fields like price.
🔧 Debug
advanced2:00remaining
Why does this Discover query return zero results?
You run this query in Discover but get zero results, even though you know matching documents exist. What is the cause?
Elasticsearch
{
"query": {
"match": {
"message": "Error occurred"
}
}
}Attempts:
2 left
💡 Hint
Consider how analyzed text fields are searched with match queries.
✗ Incorrect
Match queries analyze the input text. If the field is analyzed, searching for the exact phrase 'Error occurred' may not match documents because the phrase is split into tokens.
📝 Syntax
advanced2:00remaining
Which option correctly filters documents with a date range in Discover?
You want to filter documents where the
timestamp field is between 2023-01-01 and 2023-01-31. Which query syntax is correct?Attempts:
2 left
💡 Hint
Range queries use 'gte' and 'lte' to specify boundaries.
✗ Incorrect
The correct syntax for a range query uses 'gte' (greater than or equal) and 'lte' (less than or equal) inside the range object for the field.
🚀 Application
expert2:00remaining
How many unique user IDs are returned by this aggregation in Discover?
Given this aggregation query in Discover, what is the number of unique user IDs if the index contains 500 documents with 200 unique user IDs?
Elasticsearch
{
"aggs": {
"unique_users": {
"cardinality": {
"field": "user_id"
}
}
}
}Attempts:
2 left
💡 Hint
Cardinality aggregation counts unique values of a field.
✗ Incorrect
The cardinality aggregation returns the count of unique values for the specified field. Since there are 200 unique user IDs, the result is 200.