mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 17:34:17 -04:00
Adds a new `index.mapping.total_fields.ignore_dynamic_beyond_limit` index setting. When set to `true`, new fields are added to the mapping as long as the field limit (`index.mapping.total_fields.limit`) is not exceeded. Fields that would exceed the limit are not added to the mapping, similar to `dynamic: false`. Ignored fields are added to the `_ignored` metadata field. Relates to https://github.com/elastic/elasticsearch/issues/89911 To make this easier to review, this is split into the following PRs: - [x] https://github.com/elastic/elasticsearch/pull/102915 - [x] https://github.com/elastic/elasticsearch/pull/102936 - [x] https://github.com/elastic/elasticsearch/pull/104769 Related but not a prerequisite: - [ ] https://github.com/elastic/elasticsearch/pull/102885
45 lines
1.4 KiB
Text
45 lines
1.4 KiB
Text
[[mapping-ignored-field]]
|
|
=== `_ignored` field
|
|
|
|
The `_ignored` field indexes and stores the names of every field in a document
|
|
that has been ignored when the document was indexed. This can, for example,
|
|
be the case when the field was malformed and <<ignore-malformed,`ignore_malformed`>>
|
|
was turned on, when a `keyword` field's value exceeds its optional
|
|
<<ignore-above,`ignore_above`>> setting, or when
|
|
<<mapping-settings-limit,`index.mapping.total_fields.limit`>> has been reached and
|
|
<<mapping-settings-limit,`index.mapping.total_fields.ignore_dynamic_beyond_limit`>>
|
|
is set to `true`.
|
|
|
|
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:
|
|
|
|
[source,console]
|
|
--------------------------------------------------
|
|
GET _search
|
|
{
|
|
"query": {
|
|
"exists": {
|
|
"field": "_ignored"
|
|
}
|
|
}
|
|
}
|
|
--------------------------------------------------
|
|
|
|
Similarly, the below query finds all documents whose `@timestamp` field was
|
|
ignored at index time:
|
|
|
|
[source,console]
|
|
--------------------------------------------------
|
|
GET _search
|
|
{
|
|
"query": {
|
|
"term": {
|
|
"_ignored": "@timestamp"
|
|
}
|
|
}
|
|
}
|
|
--------------------------------------------------
|