In all the elasticsearch examples I've seen so far, every index request that needs to use an ingest pipeline passes it as query parameter like
PUT /<target>/_doc/<_id>?pipeline=my_pipeline
Is this the only way to use the pipeline when indexing documents? Or are there also other ways to utilize the pipelines?
CodePudding user response:
That's only one of the options, there are plenty of ways to leverage ingest pipelines. You can also:
- Specify pipeline in bulk queries
- or when reindexing documents
- or when updating documents matching a query
You can also define a default pipeline to be used when indexing documents inside an index with the index.default_pipeline
setting and the index.final_pipeline
setting, so as not to have to specify it in each indexing request (as in your question).
You can also specify it in the elasticsearch
Logstash output plugin or in the Filebeat elasticsearch
output](https://www.elastic.co/guide/en/beats/filebeat/current/elasticsearch-output.html#pipeline-option-es).