OpenSearch/plugins
Luca Cavanna f769821bc8
Pass SearchLookup supplier through to fielddataBuilder (#61430) (#61638)
Runtime fields need to have a SearchLookup available, when building their fielddata implementations, so that they can look up other fields, runtime or not.

To achieve that, we add a Supplier<SearchLookup> argument to the existing MappedFieldType#fielddataBuilder method.

As we introduce the ability to look up other fields while building fielddata for mapped fields, we implicitly add the ability for a field to require other fields. This requires some protection mechanism that detects dependency cycles to prevent stack overflow errors.

With this commit we also introduce detection for cycles, as well as a limit on the depth of the references for a runtime field. Note that we also plan on introducing cycles detection at compile time, so the runtime cycles detection is a last resort to prevent stack overflow errors but we hope that we can reject runtime fields from being registered in the mappings when they create a cycle in their definition.

Note that this commit does not introduce any production implementation of runtime fields, but is rather a pre-requisite to merge the runtime fields feature branch.

This is a breaking change for MapperPlugins that plug in a mapper, as the signature of MappedFieldType#fielddataBuilder changes from taking a single argument (the index name), to also accept a Supplier<SearchLookup>.

Relates to #59332

Co-authored-by: Nik Everett <nik9000@gmail.com>
2020-08-27 18:09:56 +02:00
..
analysis-icu Pass SearchLookup supplier through to fielddataBuilder (#61430) (#61638) 2020-08-27 18:09:56 +02:00
analysis-kuromoji [7.x] Convert most OSS plugins from integTest to [yaml | java]RestTest or internalClusterTest (#59444) (#60343) 2020-07-29 13:06:13 -05:00
analysis-nori [7.x] Convert most OSS plugins from integTest to [yaml | java]RestTest or internalClusterTest (#59444) (#60343) 2020-07-29 13:06:13 -05:00
analysis-phonetic Do not create two loggers for DeprecationLogger backport(#58435) (#61530) 2020-08-26 16:04:02 +02:00
analysis-smartcn [7.x] Convert most OSS plugins from integTest to [yaml | java]RestTest or internalClusterTest (#59444) (#60343) 2020-07-29 13:06:13 -05:00
analysis-stempel [7.x] Convert most OSS plugins from integTest to [yaml | java]RestTest or internalClusterTest (#59444) (#60343) 2020-07-29 13:06:13 -05:00
analysis-ukrainian [7.x] Convert most OSS plugins from integTest to [yaml | java]RestTest or internalClusterTest (#59444) (#60343) 2020-07-29 13:06:13 -05:00
discovery-azure-classic Do not create two loggers for DeprecationLogger backport(#58435) (#61530) 2020-08-26 16:04:02 +02:00
discovery-ec2 Do not create two loggers for DeprecationLogger backport(#58435) (#61530) 2020-08-26 16:04:02 +02:00
discovery-gce Replace immediate task creations by using task avoidance api (#60071) (#60504) 2020-07-31 13:09:04 +02:00
examples Merge test runner task into RestIntegTest (7.x backport) (#60600) 2020-08-04 14:46:32 +02:00
ingest-attachment Fix the REST FIPS tests (#61001) 2020-08-13 16:23:54 -07:00
mapper-annotated-text Correct how field retrieval handles multifields and copy_to. (#61391) 2020-08-20 15:53:35 -07:00
mapper-murmur3 Pass SearchLookup supplier through to fielddataBuilder (#61430) (#61638) 2020-08-27 18:09:56 +02:00
mapper-size Make MetadataFieldMapper extend ParametrizedFieldMapper (#59847) (#60924) 2020-08-11 09:02:28 +01:00
repository-azure [7.x] Convert repository-* from integTest to [yaml | java]RestTest or internalClusterTest (#60085) (#60404) 2020-07-29 11:19:44 -05:00
repository-gcs Remove GCS Bucket Exists Check (#60899) (#60914) 2020-08-11 09:54:27 +02:00
repository-hdfs Remove old test mute code (#61277) 2020-08-19 09:40:59 +01:00
repository-s3 Do not create two loggers for DeprecationLogger backport(#58435) (#61530) 2020-08-26 16:04:02 +02:00
store-smb [7.x] Convert most OSS plugins from integTest to [yaml | java]RestTest or internalClusterTest (#59444) (#60343) 2020-07-29 13:06:13 -05:00
transport-nio [7.x] Convert most OSS plugins from integTest to [yaml | java]RestTest or internalClusterTest (#59444) (#60343) 2020-07-29 13:06:13 -05:00
build.gradle Apply 2-space indent to all gradle scripts (#49071) 2019-11-14 11:01:23 +00:00