Class QuerySettingDef.Builder<T>
java.lang.Object
org.elasticsearch.xpack.esql.plan.QuerySettingDef.Builder<T>
- Enclosing class:
QuerySettingDef<T>
Fluent builder for
QuerySettingDef. Terminates in build(), which validates the
combination of flags and constructs the immutable setting.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Validate the builder state and construct the immutable definition.canonicalize(UnaryOperator<T> canonicalizer) Coerce every value of this setting into a canonical form on write (seeQuerySettingDef.canonicalize(T)).withAliasAt(String parentPath, String aliasName) Body alias at a JSON path.Body alias at the top level of the request body, named after the SET key.withDefault(T value) withDeprecated(String message) Mark this setting deprecated.withReconciler(QuerySettingDef.SettingReconciler<T> reconciler) Custom merge function.Opt in: the setting is reachable from the_queryrequest body undersettings.<name>.Deployment marker for serverless-only settings.Hard availability gate: supplying this setting on a non-snapshot build is rejected at validate/resolve.withValidator(QuerySettingDef.Validator<T> validator)
-
Method Details
-
withDefault
-
withValidator
-
withRequestBody
Opt in: the setting is reachable from the_queryrequest body undersettings.<name>. -
withAliasAtRoot
Body alias at the top level of the request body, named after the SET key. ImplieswithRequestBody(). -
withAliasAt
Body alias at a JSON path.parentPathis a dotted path to the parent object (""= root). ImplieswithRequestBody(). May be called multiple times.Only root aliases (
parentPath == "") are wired in the request parser today; declaring a non-root alias makesRequestXContentfail at parser-build time. Nested-path parsing is tracked in #149283. -
withReconciler
Custom merge function. Default is "highest-precedence non-null wins" — correct for scalars. Override only for settings whose value is a multi-field object where partial contributions from different sources should combine instead of overwriting. -
withPreview
-
withSnapshotOnly
Hard availability gate: supplying this setting on a non-snapshot build is rejected at validate/resolve. -
withServerlessOnly
Deployment marker for serverless-only settings. UnlikewithSnapshotOnly()this is NOT a parse/resolve gate — it only drives telemetry (QuerySettings.applicableIn(boolean, boolean)). A serverless-only setting that must be hard-rejected on a stateful cluster enforces that through itswithValidator(org.elasticsearch.xpack.esql.plan.QuerySettingDef.Validator<T>)(asproject_routingdoes via its cross-project check). -
withDeprecated
Mark this setting deprecated. It keeps working (still resolved and applied), but supplying it emitsmessageas a deprecation warning. Use this instead of dropping a setting from the registry when you want to steer clients away from it without breaking the ones that still send it. -
canonicalize
Coerce every value of this setting into a canonical form on write (seeQuerySettingDef.canonicalize(T)). Use it when equal values can be spelled differently — e.g.time_zonenormalizesZoneIds — so consumers never see two forms of the same value. -
build
Validate the builder state and construct the immutable definition. The setting is not self-registered; register it by adding its constant toQuerySettings.ALL(duplicate names are caught there).
-