ignored-field.asciidoc 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. [[mapping-ignored-field]]
  2. === `_ignored` field
  3. added[6.4.0]
  4. The `_ignored` field indexes and stores the names of every field in a document
  5. that has been ignored because it was malformed and
  6. <<ignore-malformed,`ignore_malformed`>> was turned on.
  7. This field is searchable with <<query-dsl-term-query,`term`>>,
  8. <<query-dsl-terms-query,`terms`>> and <<query-dsl-exists-query,`exists`>>
  9. queries, and is returned as part of the search hits.
  10. For instance the below query matches all documents that have one or more fields
  11. that got ignored:
  12. [source,js]
  13. --------------------------------------------------
  14. GET _search
  15. {
  16. "query": {
  17. "exists": {
  18. "field": "_ignored"
  19. }
  20. }
  21. }
  22. --------------------------------------------------
  23. // CONSOLE
  24. Similarly, the below query finds all documents whose `@timestamp` field was
  25. ignored at index time:
  26. [source,js]
  27. --------------------------------------------------
  28. GET _search
  29. {
  30. "query": {
  31. "term": {
  32. "_ignored": "@timestamp"
  33. }
  34. }
  35. }
  36. --------------------------------------------------
  37. // CONSOLE