Class EnrichProcessor.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch.ingest.ProcessorBase.AbstractBuilder<EnrichProcessor.Builder>
co.elastic.clients.elasticsearch.ingest.EnrichProcessor.Builder
- All Implemented Interfaces:
WithJson<EnrichProcessor.Builder>,ObjectBuilder<EnrichProcessor>
- Enclosing class:
- EnrichProcessor
public static class EnrichProcessor.Builder
extends ProcessorBase.AbstractBuilder<EnrichProcessor.Builder>
implements ObjectBuilder<EnrichProcessor>
Builder for
EnrichProcessor.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aEnrichProcessor.final EnrichProcessor.BuilderRequired - The field in the input document that matches the policies match_field used to retrieve the enrichment data.final EnrichProcessor.BuilderignoreMissing(Boolean value) Iftrueandfielddoes not exist, the processor quietly exits without modifying the document.final EnrichProcessor.BuildermaxMatches(Integer value) The maximum number of matched documents to include under the configured target field.final EnrichProcessor.BuilderIf processor will update fields with pre-existing non-null-valued field.final EnrichProcessor.BuilderpolicyName(String value) Required - The name of the enrich policy to use.protected EnrichProcessor.Builderself()final EnrichProcessor.BuildershapeRelation(GeoShapeRelation value) A spatial relation operator used to match the geoshape of incoming documents to documents in the enrich index.final EnrichProcessor.BuildertargetField(String value) Required - Field added to incoming documents to contain enrich data.Methods inherited from class co.elastic.clients.elasticsearch.ingest.ProcessorBase.AbstractBuilder
description, if_, if_, ignoreFailure, onFailure, onFailure, onFailure, onFailure, tagMethods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
field
Required - The field in the input document that matches the policies match_field used to retrieve the enrichment data. Supports template snippets.API name:
field -
ignoreMissing
Iftrueandfielddoes not exist, the processor quietly exits without modifying the document.API name:
ignore_missing -
maxMatches
The maximum number of matched documents to include under the configured target field. Thetarget_fieldwill be turned into a json array ifmax_matchesis higher than 1, otherwisetarget_fieldwill become a json object. In order to avoid documents getting too large, the maximum allowed value is 128.API name:
max_matches -
override
If processor will update fields with pre-existing non-null-valued field. When set tofalse, such fields will not be touched.API name:
override -
policyName
Required - The name of the enrich policy to use.API name:
policy_name -
shapeRelation
A spatial relation operator used to match the geoshape of incoming documents to documents in the enrich index. This option is only used forgeo_matchenrich policy types.API name:
shape_relation -
targetField
Required - Field added to incoming documents to contain enrich data. This field contains both thematch_fieldandenrich_fieldsspecified in the enrich policy. Supports template snippets.API name:
target_field -
self
- Specified by:
selfin classProcessorBase.AbstractBuilder<EnrichProcessor.Builder>
-
build
Builds aEnrichProcessor.- Specified by:
buildin interfaceObjectBuilder<EnrichProcessor>- Throws:
NullPointerException- if some of the required fields are null.
-