ignored-field.asciidoc 1.2 KB

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