elasticsearch/libs
Alan Woodward 289d202cb2
Rework geo mappers to index value by value (#71696)
The various geo field mappers are organised in a hierarchy that shares
parsing and indexing code. This ends up over-complicating things,
particularly when we have some mappers that accept multiple values
and others that only accept singletons. It also leads to confusing
behaviour around ignore_malformed behaviour: geo fields will ignore
all values if a single one is badly formed, while all other field mappers
will only ignore the problem value and index the rest. Finally, this
structure makes adding index-time scripts to geo_point needlessly
complex.

This commit refactors the indexing logic of the hierarchy to move the
individual value indexing logic into the concrete implementations,
and aligns the ignore_malformed behaviour with that of other mappers.

It contains two breaking changes:

* The geo field mappers no longer check for external field values on the
  parse context. This added considerable complication to the refactored
  parse methods, and is unused anywhere in our codebase, but may
  impact plugin-based field mappers which expect to use geo fields
  as multifields
* The geo_point field mapper now passes geohashes to its multifields
  one-by-one, instead of formatting them into a comma-delimited
  string and passing them all at once. Completion multifields using
  this as an input should still behave as normal because by default
  they would split this combined geohash string on the commas in any
  case, but keyword subfields may look different.

Fixes #69601
2021-04-19 12:38:01 +01:00
..
cli Update sources with new SSPL+Elastic-2.0 license headers 2021-02-02 16:10:53 -08:00
core Assert That AbstractRefCounted#decRef Does not Throw on Closing (#70373) 2021-04-17 07:39:48 +02:00
dissect Replace NOT operator with explicit `false` check - part 8 (#68625) 2021-02-08 15:20:34 +00:00
geo Remove depth limit from checkstyle negation rule (#70274) 2021-03-10 22:06:50 +00:00
grok Update sources with new SSPL+Elastic-2.0 license headers 2021-02-02 16:10:53 -08:00
nio Stop Ignoring Exceptions on Close in Network Code (#69665) 2021-03-01 14:38:18 +01:00
plugin-classloader Publish plugin-classloader library JAR (#68926) 2021-02-11 12:00:39 -08:00
secure-sm Update sources with new SSPL+Elastic-2.0 license headers 2021-02-02 16:10:53 -08:00
ssl-config Replace NOT operator with explicit `false` check - part 8 (#68625) 2021-02-08 15:20:34 +00:00
x-content Rework geo mappers to index value by value (#71696) 2021-04-19 12:38:01 +01:00
build.gradle Update sources with new SSPL+Elastic-2.0 license headers 2021-02-02 16:10:53 -08:00