remove.asciidoc 1.0 KB

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