ingest.asciidoc 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. [[ingest]]
  2. = Ingest node
  3. [partintro]
  4. --
  5. Use an ingest node to pre-process documents before the actual document indexing happens.
  6. The ingest node intercepts bulk and index requests, it applies transformations, and it then
  7. passes the documents back to the index or bulk APIs.
  8. All nodes enable ingest by default, so any node can handle ingest tasks. You can also create
  9. dedicated ingest nodes. To disable ingest for a node, configure the following setting in the
  10. elasticsearch.yml file:
  11. [source,yaml]
  12. --------------------------------------------------
  13. node.ingest: false
  14. --------------------------------------------------
  15. To pre-process documents before indexing, <<pipeline,define a pipeline>> that specifies a series of
  16. <<ingest-processors,processors>>. Each processor transforms the document in some specific way. For example, a
  17. pipeline might have one processor that removes a field from the document, followed by
  18. another processor that renames a field. The <<cluster-state,cluster state>> then stores
  19. the configured pipelines.
  20. To use a pipeline, simply specify the `pipeline` parameter on an index or bulk request. This
  21. way, the ingest node knows which pipeline to use. For example:
  22. [source,js]
  23. --------------------------------------------------
  24. PUT my-index/_doc/my-id?pipeline=my_pipeline_id
  25. {
  26. "foo": "bar"
  27. }
  28. --------------------------------------------------
  29. // CONSOLE
  30. // TEST[catch:bad_request]
  31. An index may also declare a <<dynamic-index-settings,default pipeline>> that will be used in the
  32. absence of the `pipeline` parameter.
  33. See <<ingest-apis,Ingest APIs>> for more information about creating, adding, and deleting pipelines.
  34. --
  35. include::ingest/ingest-node.asciidoc[]