Class UserAgentProcessor.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch.ingest.ProcessorBase.AbstractBuilder<UserAgentProcessor.Builder>
co.elastic.clients.elasticsearch.ingest.UserAgentProcessor.Builder
- All Implemented Interfaces:
WithJson<UserAgentProcessor.Builder>
,ObjectBuilder<UserAgentProcessor>
- Enclosing class:
- UserAgentProcessor
public static class UserAgentProcessor.Builder
extends ProcessorBase.AbstractBuilder<UserAgentProcessor.Builder>
implements ObjectBuilder<UserAgentProcessor>
Builder for
UserAgentProcessor
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aUserAgentProcessor
.extractDeviceType
(Boolean value) Extracts device type from the user agent string on a best-effort basis.Required - The field containing the user agent string.ignoreMissing
(Boolean value) Iftrue
andfield
does not exist, the processor quietly exits without modifying the document.properties
(UserAgentProperty value, UserAgentProperty... values) Controls what properties are added totarget_field
.properties
(List<UserAgentProperty> list) Controls what properties are added totarget_field
.The name of the file in theconfig/ingest-user-agent
directory containing the regular expressions for parsing the user agent string.protected UserAgentProcessor.Builder
self()
targetField
(String value) The field that will be filled with the user agent details.Methods inherited from class co.elastic.clients.elasticsearch.ingest.ProcessorBase.AbstractBuilder
description, if_, if_, ignoreFailure, onFailure, 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 containing the user agent string.API name:
field
-
ignoreMissing
Iftrue
andfield
does not exist, the processor quietly exits without modifying the document.API name:
ignore_missing
-
regexFile
The name of the file in theconfig/ingest-user-agent
directory containing the regular expressions for parsing the user agent string. Both the directory and the file have to be created before starting Elasticsearch. If not specified, ingest-user-agent will use theregexes.yaml
from uap-core it ships with.API name:
regex_file
-
targetField
The field that will be filled with the user agent details.API name:
target_field
-
properties
Controls what properties are added totarget_field
.API name:
properties
Adds all elements of
list
toproperties
. -
properties
public final UserAgentProcessor.Builder properties(UserAgentProperty value, UserAgentProperty... values) Controls what properties are added totarget_field
.API name:
properties
Adds one or more values to
properties
. -
extractDeviceType
Extracts device type from the user agent string on a best-effort basis.API name:
extract_device_type
-
self
- Specified by:
self
in classProcessorBase.AbstractBuilder<UserAgentProcessor.Builder>
-
build
Builds aUserAgentProcessor
.- Specified by:
build
in interfaceObjectBuilder<UserAgentProcessor>
- Throws:
NullPointerException
- if some of the required fields are null.
-