remove.asciidoc 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. [[remove-processor]]
  2. === Remove processor
  3. ++++
  4. <titleabbrev>Remove</titleabbrev>
  5. ++++
  6. Removes existing fields. If one field doesn't exist, an exception will be thrown.
  7. [[remove-options]]
  8. .Remove Options
  9. [options="header"]
  10. |======
  11. | Name | Required | Default | Description
  12. | `field` | yes | - | Fields to be removed. Supports <<accessing-template-fields,template snippets>>.
  13. | `ignore_missing` | no | `false` | If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document
  14. include::common-options.asciidoc[]
  15. |======
  16. Here is an example to remove a single field:
  17. [source,js]
  18. --------------------------------------------------
  19. {
  20. "remove": {
  21. "field": "user_agent"
  22. }
  23. }
  24. --------------------------------------------------
  25. // NOTCONSOLE
  26. To remove multiple fields, you can use the following query:
  27. [source,js]
  28. --------------------------------------------------
  29. {
  30. "remove": {
  31. "field": ["user_agent", "url"]
  32. }
  33. }
  34. --------------------------------------------------
  35. // NOTCONSOLE