This pipeline can be used to simulate the execution of a pipeline against the set of documents provided in the body of the request. You can either specify an existing pipeline to execute against the provided documents or supply a pipeline definition in the body of the request. To simulate the ingest pipeline, add the _simulate endpoint to the pipeline API.
The following is an example of simulating an existing pipeline:
curl -X POST http://localhost:9200/_ingest/pipeline/firstpipeline/_simulate -H 'content-type: application/json' -d '{
"docs" : [
{ "_source": {"message":"first document"} },
{ "_source": {"message":"second document"} }
]
}'
The following is an example of a simulated request, with the pipeline definition in the body of the request itself:
curl -X POST http://localhost:9200/_ingest/pipeline/_simulate -H 'content-type: application/json' -d '{
"pipeline" : {
"processors":[
{
"join": {
"field": "message",
"separator": "-"
}
}]
},
"docs" : [
{ "_source": {"message":["first","document"]} }
]
}'