Challenge - 5 Problems
Enrich Processor Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2:00remaining
What is the output of this enrich processor simulation?
Given the enrich processor configuration below, what will be the value of the field
user_info.name after enrichment?Elasticsearch
{
"enrich": {
"policy_name": "user_policy",
"field": "user_id",
"target_field": "user_info"
}
}
// Assume the enrich index contains a document with user_id=42 and name="Alice"Attempts:
2 left
💡 Hint
The enrich processor copies matching fields from the enrich index document to the target field.
✗ Incorrect
The enrich processor looks up the document with user_id=42 in the enrich index and copies the 'name' field into 'user_info.name'. So the value is 'Alice'.
🧠 Conceptual
intermediate1:30remaining
Which field does the enrich processor use to match documents?
In an enrich processor configuration, which field is used to find matching documents in the enrich index?
Attempts:
2 left
💡 Hint
Look for the field that identifies the key to match on.
✗ Incorrect
The
field in the enrich processor is the field in the incoming document used to find a matching document in the enrich index.🔧 Debug
advanced2:30remaining
Why does this enrich processor fail with a missing field error?
This enrich processor configuration causes an error when the field to enrich on is missing in some documents. What is the cause?
Elasticsearch
{
"enrich": {
"policy_name": "city_policy",
"field": "city_id",
"target_field": "city_info"
}
}
// Some documents do not have 'city_id' fieldAttempts:
2 left
💡 Hint
Check what happens if the field used for matching is missing in the document.
✗ Incorrect
If the field specified in
field is missing in a document, the enrich processor cannot perform the lookup and throws an error.📝 Syntax
advanced1:30remaining
Which enrich processor configuration is syntactically correct?
Choose the syntactically correct enrich processor configuration snippet.
Attempts:
2 left
💡 Hint
Look for missing commas or missing values.
✗ Incorrect
Option B has all required fields with correct JSON syntax. Options A, C, and D have missing commas, missing values, or incomplete fields causing syntax errors.
🚀 Application
expert3:00remaining
How many fields will be added to the document after enrichment?
An enrich policy indexes documents with fields
city_id, name, and population. The enrich processor is configured with field": "city_id" and target_field": "city_info". After enrichment, how many new fields will be added under city_info in the original document?Attempts:
2 left
💡 Hint
The enrich processor copies all fields except the matching key into the target field.
✗ Incorrect
The enrich documents have three fields: city_id (the matching key), name, and population. The enrich processor copies all fields from the matched document except the match field (city_id) into the city_info object. Thus, two fields are added: city_info.name and city_info.population.