Class IpLocationProcessor.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch.ingest.ProcessorBase.AbstractBuilder<IpLocationProcessor.Builder>
co.elastic.clients.elasticsearch.ingest.IpLocationProcessor.Builder
- All Implemented Interfaces:
WithJson<IpLocationProcessor.Builder>
,ObjectBuilder<IpLocationProcessor>
- Enclosing class:
- IpLocationProcessor
public static class IpLocationProcessor.Builder
extends ProcessorBase.AbstractBuilder<IpLocationProcessor.Builder>
implements ObjectBuilder<IpLocationProcessor>
Builder for
IpLocationProcessor
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aIpLocationProcessor
.databaseFile
(String value) The database filename referring to a database the module ships with (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom database in the ingest-geoip config directory.Iftrue
(and ifingest.geoip.downloader.eager.download
isfalse
), the missing database is downloaded when the pipeline is created.Required - The field to get the ip address from for the geographical lookup.Iftrue
, only the first found IP location data will be returned, even if the field contains an array.ignoreMissing
(Boolean value) Iftrue
andfield
does not exist, the processor quietly exits without modifying the document.properties
(String value, String... values) Controls what properties are added to thetarget_field
based on the IP location lookup.properties
(List<String> list) Controls what properties are added to thetarget_field
based on the IP location lookup.protected IpLocationProcessor.Builder
self()
targetField
(String value) The field that will hold the geographical information looked up from the MaxMind database.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
-
databaseFile
The database filename referring to a database the module ships with (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom database in the ingest-geoip config directory.API name:
database_file
-
field
Required - The field to get the ip address from for the geographical lookup.API name:
field
-
firstOnly
Iftrue
, only the first found IP location data will be returned, even if the field contains an array.API name:
first_only
-
ignoreMissing
Iftrue
andfield
does not exist, the processor quietly exits without modifying the document.API name:
ignore_missing
-
properties
Controls what properties are added to thetarget_field
based on the IP location lookup.API name:
properties
Adds all elements of
list
toproperties
. -
properties
Controls what properties are added to thetarget_field
based on the IP location lookup.API name:
properties
Adds one or more values to
properties
. -
targetField
The field that will hold the geographical information looked up from the MaxMind database.API name:
target_field
-
downloadDatabaseOnPipelineCreation
public final IpLocationProcessor.Builder downloadDatabaseOnPipelineCreation(@Nullable Boolean value) Iftrue
(and ifingest.geoip.downloader.eager.download
isfalse
), the missing database is downloaded when the pipeline is created. Else, the download is triggered by when the pipeline is used as thedefault_pipeline
orfinal_pipeline
in an index.API name:
download_database_on_pipeline_creation
-
self
- Specified by:
self
in classProcessorBase.AbstractBuilder<IpLocationProcessor.Builder>
-
build
Builds aIpLocationProcessor
.- Specified by:
build
in interfaceObjectBuilder<IpLocationProcessor>
- Throws:
NullPointerException
- if some of the required fields are null.
-