OpenSearch/docs/reference/mapping
Nicholas Knize af1ab68b64 Add RangeFieldMapper for numeric and date range types
Lucene 6.2 added index and query support for numeric ranges. This commit adds a new RangeFieldMapper for indexing numeric (int, long, float, double) and date ranges and creating appropriate range and term queries. The design is similar to NumericFieldMapper in that it uses a RangeType enumerator for implementing the logic specific to each type. The following range types are supported by this field mapper: int_range, float_range, long_range, double_range, date_range.

Lucene does not provide a DocValue field specific to RangeField types so the RangeFieldMapper implements a CustomRangeDocValuesField for handling doc value support.

When executing a Range query over a Range field, the RangeQueryBuilder has been enhanced to accept a new relation parameter for defining the type of query as one of: WITHIN, CONTAINS, INTERSECTS. This provides support for finding all ranges that are related to a specific range in a desired way. As with other spatial queries, DISJOINT can be achieved as a MUST_NOT of an INTERSECTS query.
2016-11-29 10:10:14 -06:00
..
dynamic Document that the PUT mapping API with the _default_ type overwrites instead of merging 2016-11-26 12:43:56 +01:00
fields Revert "Default `include_in_all` for numeric-like types to false" 2016-09-28 07:07:46 -06:00
params [DOCS] Document all date formats (#21164) 2016-10-31 09:15:36 -06:00
types Add RangeFieldMapper for numeric and date range types 2016-11-29 10:10:14 -06:00
dynamic-mapping.asciidoc Allows multiple patterns to be specified for index templates (#21009) 2016-11-10 18:00:30 -05:00
fields.asciidoc Fix doc build. 2016-06-22 09:34:49 +02:00
params.asciidoc [DOC] Cleanup dangling references to deprecated geo parameters 2016-09-13 16:38:38 -05:00
types.asciidoc Add RangeFieldMapper for numeric and date range types 2016-11-29 10:10:14 -06:00