2018-05-02 04:47:02 -04:00
|
|
|
[[mapping-ignored-field]]
|
|
|
|
=== `_ignored` field
|
|
|
|
|
|
|
|
added[6.4.0]
|
|
|
|
|
|
|
|
The `_ignored` field indexes and stores the names of every field in a document
|
|
|
|
that has been ignored because it was malformed and
|
|
|
|
<<ignore-malformed,`ignore_malformed`>> was turned on.
|
|
|
|
|
|
|
|
This field is searchable with <<query-dsl-term-query,`term`>>,
|
|
|
|
<<query-dsl-terms-query,`terms`>> and <<query-dsl-exists-query,`exists`>>
|
|
|
|
queries, and is returned as part of the search hits.
|
|
|
|
|
|
|
|
For instance the below query matches all documents that have one or more fields
|
|
|
|
that got ignored:
|
|
|
|
|
2019-09-06 11:31:13 -04:00
|
|
|
[source,console]
|
2018-05-02 04:47:02 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
GET _search
|
|
|
|
{
|
|
|
|
"query": {
|
|
|
|
"exists": {
|
|
|
|
"field": "_ignored"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
--------------------------------------------------
|
|
|
|
|
|
|
|
Similarly, the below query finds all documents whose `@timestamp` field was
|
|
|
|
ignored at index time:
|
|
|
|
|
2019-09-06 11:31:13 -04:00
|
|
|
[source,console]
|
2018-05-02 04:47:02 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
GET _search
|
|
|
|
{
|
|
|
|
"query": {
|
|
|
|
"term": {
|
|
|
|
"_ignored": "@timestamp"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
--------------------------------------------------
|