OpenSearch/plugins
Colin Goodheart-Smithe 99aca9cdfc
Enhances exists queries to reduce need for `_field_names` (#26930)
* Enhances exists queries to reduce need for `_field_names`

Before this change we wrote the name all the fields in a document to a `_field_names` field and then implemented exists queries as a term query on this field. The problem with this approach is that it bloats the index and also affects indexing performance.

This change adds a new method `existsQuery()` to `MappedFieldType` which is implemented by each sub-class. For most field types if doc values are available a `DocValuesFieldExistsQuery` is used, falling back to using `_field_names` if doc values are disabled. Note that only fields where no doc values are available are written to `_field_names`.

Closes #26770

* Addresses review comments

* Addresses more review comments

* implements existsQuery explicitly on every mapper

* Reinstates ability to perform term query on `_field_names`

* Added bwc depending on index created version

* Review Comments

* Skips tests that are not supported in 6.1.0

These values will need to be changed after backporting this PR to 6.x
2017-11-01 10:46:59 +00:00
..
analysis-icu Enhances exists queries to reduce need for `_field_names` (#26930) 2017-11-01 10:46:59 +00:00
analysis-kuromoji Added Bengali Analyzer to Elasticsearch with respect to the lucene update(PR#238) 2017-10-05 13:25:05 +02:00
analysis-phonetic Fix beidermorse phonetic token filter for unspecified `languageset` (#27112) 2017-10-27 10:07:36 +02:00
analysis-smartcn Added Bengali Analyzer to Elasticsearch with respect to the lucene update(PR#238) 2017-10-05 13:25:05 +02:00
analysis-stempel Added Bengali Analyzer to Elasticsearch with respect to the lucene update(PR#238) 2017-10-05 13:25:05 +02:00
analysis-ukrainian Added Bengali Analyzer to Elasticsearch with respect to the lucene update(PR#238) 2017-10-05 13:25:05 +02:00
discovery-azure-classic Allow build to directly run under JDK 9 (#25859) 2017-07-27 16:14:04 +02:00
discovery-ec2 Return List instead of an array from settings (#26903) 2017-10-09 09:52:08 +02:00
discovery-file File Discovery: Remove fallback with zen discovery (#26667) 2017-09-19 16:32:34 -07:00
discovery-gce Return List instead of an array from settings (#26903) 2017-10-09 09:52:08 +02:00
examples Allow plugins to plug rescore implementations (#26368) 2017-08-25 13:46:57 -04:00
ingest-attachment Revert "Upgrade to Jackson 2.9.2 (#27032)" 2017-10-20 08:25:41 +02:00
ingest-geoip [Docs] "The the" is a great band, but ... (#26644) 2017-09-14 15:08:20 +02:00
ingest-user-agent update ingest-user-agent regexes.yml (#25608) 2017-07-10 08:43:11 -07:00
jvm-example Remove path.conf setting 2017-06-26 15:18:29 -04:00
mapper-murmur3 Enhances exists queries to reduce need for `_field_names` (#26930) 2017-11-01 10:46:59 +00:00
mapper-size Unify the result interfaces from get and search in Java client (#25361) 2017-06-29 11:35:28 +02:00
repository-azure Return List instead of an array from settings (#26903) 2017-10-09 09:52:08 +02:00
repository-gcs Ensure that gcs client creation is privileged (#25938) 2017-07-27 22:28:47 -05:00
repository-hdfs Remove Settings#getAsMap() (#26845) 2017-10-04 01:21:38 -06:00
repository-s3 (refactor) some opportunities to use diamond operator (#25585) 2017-08-15 16:36:42 -06:00
store-smb Validate top-level keys for create index request (#23755) (#23869) 2017-09-26 09:49:20 -07:00
build.gradle Plugins: Include license and notice files in zip (#23191) 2017-02-15 11:23:12 -08:00