ignored-field.asciidoc 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 because it was malformed and
  5. <<ignore-malformed,`ignore_malformed`>> was turned on.
  6. This field is searchable with <<query-dsl-term-query,`term`>>,
  7. <<query-dsl-terms-query,`terms`>> and <<query-dsl-exists-query,`exists`>>
  8. queries, and is returned as part of the search hits.
  9. For instance the below query matches all documents that have one or more fields
  10. that got ignored:
  11. [source,console]
  12. --------------------------------------------------
  13. GET _search
  14. {
  15. "query": {
  16. "exists": {
  17. "field": "_ignored"
  18. }
  19. }
  20. }
  21. --------------------------------------------------
  22. Similarly, the below query finds all documents whose `@timestamp` field was
  23. ignored at index time:
  24. [source,console]
  25. --------------------------------------------------
  26. GET _search
  27. {
  28. "query": {
  29. "term": {
  30. "_ignored": "@timestamp"
  31. }
  32. }
  33. }
  34. --------------------------------------------------