What will be the value of field1 in the output document?
medium
A. "old"
B. null
C. An error occurs
D. "test"
Solution
Step 1: Understand the set processor effect
The set processor changes the value of field1 to "test" regardless of its previous value.
Step 2: Apply processor to input document
The input has field1 as "old", but after processing, it becomes "test".
Final Answer:
"test" -> Option D
Quick Check:
Set processor overwrites field1 = "test" [OK]
Hint: Set processor overwrites field value in simulation [OK]
Common Mistakes:
Assuming original value remains unchanged
Thinking simulation returns null
Expecting an error from set processor
4. You run this pipeline test:
POST _ingest/pipeline/my_pipeline/_simulate
{
"docs": [
{"_source": {"field": "value"}}
]
}
But get an error: "pipeline [my_pipeline] does not exist". What is the likely cause?
medium
A. The pipeline ID 'my_pipeline' does not exist in Elasticsearch
B. The HTTP method should be GET instead of POST
C. The docs array is empty
D. The _source field is missing
Solution
Step 1: Analyze error message
The error clearly states the pipeline ID 'my_pipeline' does not exist, meaning Elasticsearch cannot find it.
Step 2: Check other options
HTTP method POST is correct, docs array is not empty, and _source is present, so these are not causes.
Final Answer:
The pipeline ID 'my_pipeline' does not exist in Elasticsearch -> Option A
Quick Check:
Pipeline not found error = missing pipeline ID [OK]
Hint: Check pipeline ID exists before testing by ID [OK]
Common Mistakes:
Using wrong HTTP method
Ignoring pipeline existence
Assuming docs array causes error
5. You want to test a pipeline that conditionally adds a field only if status is "active". Which pipeline testing approach correctly verifies this behavior?
hard
A. Test the pipeline inline with docs having status: "active" and status: "inactive" to check conditional logic
B. Test only with docs having status: "active" to confirm field addition
C. Test with empty docs array to see if field is added
D. Test the pipeline by deleting it first and then simulating
Solution
Step 1: Understand conditional testing need
To verify conditional logic, test with both matching and non-matching documents to see if the field is added only when status is "active".
Step 2: Evaluate options
Testing only with "active" docs misses false positives; empty docs or deleting pipeline are irrelevant.
Final Answer:
Test the pipeline inline with docs having status: "active" and status: "inactive" to check conditional logic -> Option A
Quick Check:
Test all cases to verify conditional pipeline behavior [OK]
Hint: Test with both matching and non-matching docs for conditions [OK]
Common Mistakes:
Testing only positive cases
Using empty docs array
Deleting pipeline before testing
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.