0
0
Elasticsearchquery~10 mins

Ingest pipelines in Elasticsearch - Interactive Code Practice

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

Complete the code to define a simple ingest pipeline that adds a field.

Elasticsearch
{
  "description": "Add field pipeline",
  "processors": [
    {
      "set": {
        "field": "new_field",
        "value": [1]
      }
    }
  ]
}
Drag options to blanks, or click blank then click option'
A"added_value"
Badded_value
C"field_value"
Dfield_value
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to put quotes around string values.
Using unquoted text which causes JSON errors.
2fill in blank
medium

Complete the code to add a processor that converts a field to lowercase.

Elasticsearch
{
  "processors": [
    {
      "lowercase": {
        "field": [1]
      }
    }
  ]
}
Drag options to blanks, or click blank then click option'
Amessage
B"message"
C"field"
Dfield
Attempts:
3 left
💡 Hint
Common Mistakes
Not putting quotes around the field name.
Using a variable name without quotes.
3fill in blank
hard

Fix the error in the pipeline that uses a rename processor incorrectly.

Elasticsearch
{
  "processors": [
    {
      "rename": {
        "field": [1],
        "target_field": "new_name"
      }
    }
  ]
}
Drag options to blanks, or click blank then click option'
A"old_name"
Bold_name
C"new_name"
Dnew_name
Attempts:
3 left
💡 Hint
Common Mistakes
Using unquoted field names causing JSON errors.
Confusing target_field with field.
4fill in blank
hard

Fill both blanks to create a pipeline that removes a field if it exists.

Elasticsearch
{
  "processors": [
    {
      "remove": {
        "field": [1],
        "ignore_missing": [2]
      }
    }
  ]
}
Drag options to blanks, or click blank then click option'
A"obsolete_field"
Btrue
Cfalse
D"missing_field"
Attempts:
3 left
💡 Hint
Common Mistakes
Putting quotes around true or false.
Using wrong field names.
5fill in blank
hard

Fill all three blanks to create a pipeline that sets a field only if it does not exist.

Elasticsearch
{
  "processors": [
    {
      "set": {
        "field": [1],
        "value": [2],
        "if": [3]
      }
    }
  ]
}
Drag options to blanks, or click blank then click option'
A"status"
B"pending"
C"ctx.status == null"
D"ctx.status != null"
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong condition expression.
Not quoting strings properly.