OpenSearch/libs
Zachary Tong 0372d6d239 Allow ObjectParsers to specify required sets of fields (#49661)
ConstructingObjectParser can be used to specify required fields,
but it is still difficult to configure "sets" of fields where only
one of the set is required (requiring hand-rolled logic in each
ConstructingObjectParser, or adding special validation methods
to objects that are called after building the object).

This commit adds a new method on ObjectParser which allows
the parsers to register required sets.  E.g. ["foo", "bar"] can be
registered, which means "foo", "bar" or both must be configured
by the user otherwise an exception is thrown.

This pattern crops up in many places in our parsers; a good example are
the aggregation "field" and "script" fields.  One or both must be
configured on all aggregations, omitting both should result in an exception.
This was previously handled far downstream resulting in an aggregation
exception, when it should be a parse exception.
2020-02-11 13:03:33 -05:00
..
cli Password-protected Keystore Feature Branch PR (#51123) (#51510) 2020-01-28 05:32:32 -05:00
core correct licensing and incorporation of FastMath (#49122) (#49441) 2019-11-21 09:02:30 -08:00
dissect Apply 2-space indent to all gradle scripts (#49071) 2019-11-14 11:01:23 +00:00
geo Remove comparison to true for booleans (#51723) 2020-01-31 16:35:43 -08:00
grok Missing suffix for German Month "Juli" in Grok Pattern MONTH (#51579) (#51591) (#51863) 2020-02-04 08:25:24 -06:00
nio Apply 2-space indent to all gradle scripts (#49071) 2019-11-14 11:01:23 +00:00
plugin-classloader [Backport] Replace usages RandomizedTestingTask with built-in Gradle Test (#40978) (#40993) 2019-04-09 11:52:50 -07:00
secure-sm Add SecureSM support for newer IDEA versions (#49747) 2019-12-04 13:50:06 +01:00
ssl-config Enable tests in FIPS 140 in JDK 11 (#49485) 2020-01-27 11:14:52 +02:00
x-content Allow ObjectParsers to specify required sets of fields (#49661) 2020-02-11 13:03:33 -05:00
build.gradle Apply 2-space indent to all gradle scripts (#49071) 2019-11-14 11:01:23 +00:00