2014-05-20 23:34:00 +08:00
|
|
|
[[mapping-field-names-field]]
|
2015-07-20 07:24:29 +08:00
|
|
|
=== `_field_names` field
|
|
|
|
|
2018-06-04 16:17:11 +08:00
|
|
|
The `_field_names` field used to index the names of every field in a document that
|
|
|
|
contains any value other than `null`. This field was used by the
|
2015-12-12 03:07:57 +08:00
|
|
|
<<query-dsl-exists-query,`exists`>> query to find documents that
|
|
|
|
either have or don't have any non-+null+ value for a particular field.
|
2015-07-20 07:24:29 +08:00
|
|
|
|
2018-06-04 16:17:11 +08:00
|
|
|
Now the `_field_names` field only indexes the names of fields that have
|
|
|
|
`doc_values` and `norms` disabled. For fields which have either `doc_values`
|
|
|
|
or `norm` enabled the <<query-dsl-exists-query,`exists`>> query will still
|
|
|
|
be available but will not use the `_field_names` field.
|
2017-10-06 22:49:15 +08:00
|
|
|
|
2019-04-30 22:19:09 +08:00
|
|
|
[[disable-field-names]]
|
2017-10-06 22:49:15 +08:00
|
|
|
==== Disabling `_field_names`
|
|
|
|
|
2019-09-23 20:13:44 +08:00
|
|
|
Disabling `_field_names` is no longer possible. It is now enabled by default
|
|
|
|
because it no longer carries the index overhead it once did.
|
2019-09-11 20:55:30 +08:00
|
|
|
|
2019-09-23 20:13:44 +08:00
|
|
|
NOTE: Support for disabling `_field_names` has been removed. Using it on new
|
|
|
|
indices will throw an error. Using it in pre-8.0 indices is still allowed but
|
|
|
|
issues a deprecation warning.
|