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.downloadisfalse), 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) Iftrueandfielddoes not exist, the processor quietly exits without modifying the document.properties(String value, String... values) Controls what properties are added to thetarget_fieldbased on the IP location lookup.properties(List<String> list) Controls what properties are added to thetarget_fieldbased on the IP location lookup.protected IpLocationProcessor.Builderself()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, 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
-
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
Iftrueandfielddoes not exist, the processor quietly exits without modifying the document.API name:
ignore_missing -
properties
Controls what properties are added to thetarget_fieldbased on the IP location lookup.API name:
propertiesAdds all elements of
listtoproperties. -
properties
Controls what properties are added to thetarget_fieldbased on the IP location lookup.API name:
propertiesAdds 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.downloadisfalse), the missing database is downloaded when the pipeline is created. Else, the download is triggered by when the pipeline is used as thedefault_pipelineorfinal_pipelinein an index.API name:
download_database_on_pipeline_creation -
self
- Specified by:
selfin classProcessorBase.AbstractBuilder<IpLocationProcessor.Builder>
-
build
Builds aIpLocationProcessor.- Specified by:
buildin interfaceObjectBuilder<IpLocationProcessor>- Throws:
NullPointerException- if some of the required fields are null.
-