OpenSearch/x-pack/plugin
Adrien Grand cb868d2f5e
Introduce a `constant_keyword` field. (#49713) (#53024)
This field is a specialization of the `keyword` field for the case when all
documents have the same value. It typically performs more efficiently than
keywords at query time by figuring out whether all or none of the documents
match at rewrite time, like `term` queries on `_index`.

The name is up for discussion. I liked including `keyword` in it, so that we
still have room for a `singleton_numeric` in the future. However I'm unsure
whether to call it `singleton`, `constant` or something else, any opinions?

For this field there is a choice between
 1. accepting values in `_source` when they are equal to the value configured
    in mappings, but rejecting mapping updates
 2. rejecting values in `_source` but then allowing updates to the value that
    is configured in the mapping
This commit implements option 1, so that it is possible to reindex from/to an
index that has the field mapped as a keyword with no changes to the source.

Backport of #49713
2020-03-03 16:01:47 +01:00
..
analytics Add size support to `top_metrics` (backport of #52662) (#52914) 2020-02-27 16:12:52 -05:00
autoscaling [7.x] Smarter copying of the rest specs and tests (#52114) (#52798) 2020-02-26 08:13:41 -06:00
ccr Allow dynamic updates for index.hidden setting (#52837) 2020-02-26 11:46:29 -07:00
core Introduce a `constant_keyword` field. (#49713) (#53024) 2020-03-03 16:01:47 +01:00
deprecation Remove DeprecationLogger from route objects (#52285) 2020-02-12 15:05:41 -07:00
enrich [7.x] Smarter copying of the rest specs and tests (#52114) (#52798) 2020-02-26 08:13:41 -06:00
eql EQL: Add implicit ordering on timestamp (#53004) 2020-03-02 22:41:36 +02:00
frozen-indices Upgrade Lucene to 8.5.0-snapshot-b01d7cb (#52584) 2020-02-21 10:25:03 +00:00
graph [7.x] Smarter copying of the rest specs and tests (#52114) (#52798) 2020-02-26 08:13:41 -06:00
ilm [7.x] Smarter copying of the rest specs and tests (#52114) (#52798) 2020-02-26 08:13:41 -06:00
logstash [7.x][ML] Refactor ML mappings and templates into JSON resources (#51… (#52353) 2020-02-14 17:16:06 +02:00
mapper-constant-keyword Introduce a `constant_keyword` field. (#49713) (#53024) 2020-03-03 16:01:47 +01:00
mapper-flattened Add size support to `top_metrics` (backport of #52662) (#52914) 2020-02-27 16:12:52 -05:00
ml Allow _rollup_search with read privilege (#52043) (#53047) 2020-03-03 22:29:54 +11:00
monitoring Single instance of the IndexNameExpressionResolver (#52604) 2020-02-21 07:50:02 -07:00
ql EQL: Add implicit ordering on timestamp (#53004) 2020-03-02 22:41:36 +02:00
rollup Single instance of the IndexNameExpressionResolver (#52604) 2020-02-21 07:50:02 -07:00
search-business-rules Generalize how queries on `_index` are handled at rewrite time (#52815) 2020-02-26 15:37:43 +01:00
security Respect runas realm for ApiKey security operations (#52178) (#52932) 2020-02-28 10:53:52 +11:00
spatial Add support for multipoint shape queries (#52564) (#52705) 2020-02-24 13:46:51 +01:00
sql EQL: Add implicit ordering on timestamp (#53004) 2020-03-02 22:41:36 +02:00
src/test Introduce a `constant_keyword` field. (#49713) (#53024) 2020-03-03 16:01:47 +01:00
transform [Transform] fix sporadic race condition in TransformUsageIT (#52946) 2020-03-03 10:27:36 +01:00
vectors Add size support to `top_metrics` (backport of #52662) (#52914) 2020-02-27 16:12:52 -05:00
voting-only-node Single instance of the IndexNameExpressionResolver (#52604) 2020-02-21 07:50:02 -07:00
watcher Simplify watcher indexing listener.(#53046) 2020-03-03 11:01:57 +01:00
build.gradle Disable ILM history in x-pack rest tests (#52868) 2020-02-27 17:20:33 +01:00