OpenSearch/plugins
Adrien Grand d84c643f58 Use the new points API to index numeric fields. #17746
This makes all numeric fields including `date`, `ip` and `token_count` use
points instead of the inverted index as a lookup structure. This is expected
to perform worse for exact queries, but faster for range queries. It also
requires less storage.

Notes about how the change works:
 - Numeric mappers have been split into a legacy version that is essentially
   the current mapper, and a new version that uses points, eg.
   LegacyDateFieldMapper and DateFieldMapper.
 - Since new and old fields have the same names, the decision about which one
   to use is made based on the index creation version.
 - If you try to force using a legacy field on a new index or a field that uses
   points on an old index, you will get an exception.
 - IP addresses now support IPv6 via Lucene's InetAddressPoint and store them
   in SORTED_SET doc values using the same encoding (fixed length of 16 bytes
   and sortable).
 - The internal MappedFieldType that is stored by the new mappers does not have
   any of the points-related properties set. Instead, it keeps setting the index
   options when parsing the `index` property of mappings and does
   `if (fieldType.indexOptions() != IndexOptions.NONE) { // add point field }`
   when parsing documents.

Known issues that won't fix:
 - You can't use numeric fields in significant terms aggregations anymore since
   this requires document frequencies, which points do not record.
 - Term queries on numeric fields will now return constant scores instead of
   giving better scores to the rare values.

Known issues that we could work around (in follow-up PRs, this one is too large
already):
 - Range queries on `ip` addresses only work if both the lower and upper bounds
   are inclusive (exclusive bounds are not exposed in Lucene). We could either
   decide to implement it, or drop range support entirely and tell users to
   query subnets using the CIDR notation instead.
 - Since IP addresses now use a different representation for doc values,
   aggregations will fail when running a terms aggregation on an ip field on a
   list of indices that contains both pre-5.0 and 5.0 indices.
 - The ip range aggregation does not work on the new ip field. We need to either
   implement range aggs for SORTED_SET doc values or drop support for ip ranges
   and tell users to use filters instead. #17700

Closes #16751
Closes #17007
Closes #11513
2016-04-14 17:56:23 +02:00
..
analysis-icu Upgrade Lucene 6 Release 2016-04-11 16:50:04 -05:00
analysis-kuromoji Upgrade Lucene 6 Release 2016-04-11 16:50:04 -05:00
analysis-phonetic Upgrade Lucene 6 Release 2016-04-11 16:50:04 -05:00
analysis-smartcn Upgrade Lucene 6 Release 2016-04-11 16:50:04 -05:00
analysis-stempel Upgrade Lucene 6 Release 2016-04-11 16:50:04 -05:00
delete-by-query Remove Settings.settingsBuilder. 2016-04-08 18:10:02 +02:00
discovery-azure Remove Settings.settingsBuilder. 2016-04-08 18:10:02 +02:00
discovery-ec2 Add EC2 discovery tests to check permissions of AWS Java SDK (#17677) 2016-04-13 10:01:49 +02:00
discovery-gce Remove hostname from NetworkAddress.format 2016-04-07 17:27:59 -04:00
ingest-attachment Ingest Attachment: Allow to prevent base64 conversions by using raw bytes (#16601) 2016-04-11 14:14:56 +02:00
ingest-geoip Remove hostname from NetworkAddress.format 2016-04-07 17:27:59 -04:00
jvm-example Merge pull request #16038 from rjernst/remove_site_plugin 2016-01-21 12:32:22 -08:00
lang-javascript Disable fielddata on text fields by defaults. #17386 2016-03-30 14:35:32 +02:00
lang-python Disable fielddata on text fields by defaults. #17386 2016-03-30 14:35:32 +02:00
mapper-attachments Use the new points API to index numeric fields. #17746 2016-04-14 17:56:23 +02:00
mapper-murmur3 Use the new points API to index numeric fields. #17746 2016-04-14 17:56:23 +02:00
mapper-size Use the new points API to index numeric fields. #17746 2016-04-14 17:56:23 +02:00
repository-azure Remove Settings.settingsBuilder. 2016-04-08 18:10:02 +02:00
repository-hdfs Remove Settings.settingsBuilder. 2016-04-08 18:10:02 +02:00
repository-s3 Remove Settings.settingsBuilder. 2016-04-08 18:10:02 +02:00
store-smb upgrade to lucene 6.0.0-snapshot-bea235f 2016-03-07 04:12:23 -05:00
build.gradle Revert "Build: Switch to maven-publish plugin" 2016-03-18 17:22:25 -07:00