Class GeoIpProcessor.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch.ingest.ProcessorBase.AbstractBuilder<GeoIpProcessor.Builder>
co.elastic.clients.elasticsearch.ingest.GeoIpProcessor.Builder
- All Implemented Interfaces:
WithJson<GeoIpProcessor.Builder>
,ObjectBuilder<GeoIpProcessor>
- Enclosing class:
- GeoIpProcessor
public static class GeoIpProcessor.Builder
extends ProcessorBase.AbstractBuilder<GeoIpProcessor.Builder>
implements ObjectBuilder<GeoIpProcessor>
Builder for
GeoIpProcessor
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aGeoIpProcessor
.final GeoIpProcessor.Builder
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.final GeoIpProcessor.Builder
Required - The field to get the ip address from for the geographical lookup.final GeoIpProcessor.Builder
Iftrue
, only the first found geoip data will be returned, even if the field contains an array.final GeoIpProcessor.Builder
ignoreMissing
(Boolean value) Iftrue
andfield
does not exist, the processor quietly exits without modifying the document.final GeoIpProcessor.Builder
properties
(String value, String... values) Controls what properties are added to thetarget_field
based on the geoip lookup.final GeoIpProcessor.Builder
properties
(List<String> list) Controls what properties are added to thetarget_field
based on the geoip lookup.protected GeoIpProcessor.Builder
self()
final GeoIpProcessor.Builder
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_, 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
-
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 geoip 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 geoip lookup.API name:
properties
Adds all elements of
list
toproperties
. -
properties
Controls what properties are added to thetarget_field
based on the geoip 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
-
self
- Specified by:
self
in classProcessorBase.AbstractBuilder<GeoIpProcessor.Builder>
-
build
Builds aGeoIpProcessor
.- Specified by:
build
in interfaceObjectBuilder<GeoIpProcessor>
- Throws:
NullPointerException
- if some of the required fields are null.
-