ingest.asciidoc 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. [[ingest]]
  2. = Ingest Node
  3. [partintro]
  4. --
  5. You can use ingest node to pre-process documents before the actual indexing takes place.
  6. This pre-processing happens by an ingest node that intercepts bulk and index requests, applies the
  7. transformations, and then passes the documents back to the index or bulk APIs.
  8. You can enable ingest on any node or even have dedicated ingest nodes. Ingest is enabled by default
  9. on all nodes. To disable ingest on a node, configure the following setting in the `elasticsearch.yml` file:
  10. [source,yaml]
  11. --------------------------------------------------
  12. node.ingest: false
  13. --------------------------------------------------
  14. To pre-process documents before indexing, you <<pipeline,define a pipeline>> that specifies
  15. a series of <<ingest-processors,processors>>. Each processor transforms the document in some way.
  16. For example, you may have a pipeline that consists of one processor that removes a field from
  17. the document followed by another processor that renames a field.
  18. To use a pipeline, you simply specify the `pipeline` parameter on an index or bulk request to
  19. tell the ingest node which pipeline to use. For example:
  20. [source,js]
  21. --------------------------------------------------
  22. PUT my-index/my-type/my-id?pipeline=my_pipeline_id
  23. {
  24. "foo": "bar"
  25. }
  26. --------------------------------------------------
  27. // CONSOLE
  28. // TEST[catch:request]
  29. See <<ingest-apis,Ingest APIs>> for more information about creating, adding, and deleting pipelines.
  30. --
  31. include::ingest/ingest-node.asciidoc[]