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
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aEnrichProcessor
.final EnrichProcessor.Builder
Required - The field in the input document that matches the policies match_field used to retrieve the enrichment data.final EnrichProcessor.Builder
ignoreMissing
(Boolean value) Iftrue
andfield
does not exist, the processor quietly exits without modifying the document.final EnrichProcessor.Builder
maxMatches
(Integer value) The maximum number of matched documents to include under the configured target field.final EnrichProcessor.Builder
If processor will update fields with pre-existing non-null-valued field.final EnrichProcessor.Builder
policyName
(String value) Required - The name of the enrich policy to use.protected EnrichProcessor.Builder
self()
final EnrichProcessor.Builder
shapeRelation
(GeoShapeRelation value) A spatial relation operator used to match the geoshape of incoming documents to documents in the enrich index.final EnrichProcessor.Builder
targetField
(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_, ignoreFailure, onFailure, onFailure, onFailure, tag
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods 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
Iftrue
andfield
does 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_field
will be turned into a json array ifmax_matches
is higher than 1, otherwisetarget_field
will 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_match
enrich policy types.API name:
shape_relation
-
targetField
Required - Field added to incoming documents to contain enrich data. This field contains both thematch_field
andenrich_fields
specified in the enrich policy. Supports template snippets.API name:
target_field
-
self
- Specified by:
self
in classProcessorBase.AbstractBuilder<EnrichProcessor.Builder>
-
build
Builds aEnrichProcessor
.- Specified by:
build
in interfaceObjectBuilder<EnrichProcessor>
- Throws:
NullPointerException
- if some of the required fields are null.
-