Class ContextUtils
java.lang.Object
org.opensearch.search.pipeline.common.helpers.ContextUtils
Helpers for working with request-scoped context.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringParameter that can be passed to a stateful processor to avoid collisions between contextual variables by prefixing them with distinct qualifiers. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringapplyContextPrefix(String contextPrefix, String variableName) Replaces a "global" variable name with one scoped to a given context prefix (unless prefix is null or empty).
-
Field Details
-
CONTEXT_PREFIX_PARAMETER
Parameter that can be passed to a stateful processor to avoid collisions between contextual variables by prefixing them with distinct qualifiers.- See Also:
-
-
Method Details
-
applyContextPrefix
Replaces a "global" variable name with one scoped to a given context prefix (unless prefix is null or empty).- Parameters:
contextPrefix- the prefix qualifier for the variablevariableName- the generic "global" form of the context variable- Returns:
- the variableName prefixed with contextPrefix followed by ".", or just variableName if contextPrefix is null or empty
-