Challenge - 5 Problems
Cross-Cluster Search Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2:00remaining
Output of a basic cross-cluster search query
What is the output of the following Elasticsearch cross-cluster search query when searching for documents with
status:active across two clusters named clusterA and clusterB?Elasticsearch
GET clusterA:logs-2023,clusterB:logs-2023/_search
{
"query": {
"term": { "status": "active" }
}
}Attempts:
2 left
💡 Hint
Cross-cluster search allows querying multiple clusters by prefixing the index name with the cluster alias.
✗ Incorrect
The query targets indices named logs-2023 in both clusterA and clusterB. The term query filters documents with status 'active'. Cross-cluster search merges results from both clusters transparently.
🧠 Conceptual
intermediate1:30remaining
Understanding remote cluster configuration
Which statement correctly describes how to configure a remote cluster for cross-cluster search in Elasticsearch?
Attempts:
2 left
💡 Hint
Think about how the local cluster knows where to find the remote cluster nodes.
✗ Incorrect
To enable cross-cluster search, the local cluster must be configured with the remote cluster's seed nodes using the
cluster.remote..seeds setting. This allows the local cluster to connect and query the remote cluster.🔧 Debug
advanced2:00remaining
Identify the error in cross-cluster search query
Given the following cross-cluster search query, what error will Elasticsearch return?
Elasticsearch
GET clusterX:logs-2023/_search
{
"query": {
"match": { "message": "error" }
}
}Attempts:
2 left
💡 Hint
Check if the remote cluster alias is configured in the local cluster.
✗ Incorrect
If the remote cluster alias (clusterX) is not configured in the local cluster's settings, Elasticsearch will return a "No such remote cluster" error when attempting cross-cluster search.
📝 Syntax
advanced1:30remaining
Correct syntax for cross-cluster search index pattern
Which option shows the correct syntax to search across indices named
logs-2023 in remote clusters east and west simultaneously?Attempts:
2 left
💡 Hint
Remember the format is
cluster_alias:index_name.✗ Incorrect
The correct syntax prefixes the index name with the cluster alias separated by a colon. Comma separates multiple indices or clusters.
🚀 Application
expert2:30remaining
Result count from cross-cluster search with filters
You run this cross-cluster search query to count documents with
status:failed in clusters alpha and beta. Cluster alpha has 5 matching documents, beta has 3. What is the value of hits.total.value in the response?Elasticsearch
GET alpha:app-logs,beta:app-logs/_search
{
"query": {
"term": { "status": "failed" }
}
}Attempts:
2 left
💡 Hint
Cross-cluster search merges results from all targeted clusters.
✗ Incorrect
The total hits count sums matching documents from all clusters queried. Here, 5 from alpha plus 3 from beta equals 8.