Class 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 Details

    • Builder

      public Builder()
  • Method Details

    • databaseFile

      public final GeoIpProcessor.Builder databaseFile(@Nullable 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.

      API name: database_file

    • field

      public final GeoIpProcessor.Builder field(String value)
      Required - The field to get the ip address from for the geographical lookup.

      API name: field

    • firstOnly

      public final GeoIpProcessor.Builder firstOnly(@Nullable Boolean value)
      If true, only the first found geoip data will be returned, even if the field contains an array.

      API name: first_only

    • ignoreMissing

      public final GeoIpProcessor.Builder ignoreMissing(@Nullable Boolean value)
      If true and field does not exist, the processor quietly exits without modifying the document.

      API name: ignore_missing

    • properties

      public final GeoIpProcessor.Builder properties(List<String> list)
      Controls what properties are added to the target_field based on the geoip lookup.

      API name: properties

      Adds all elements of list to properties.

    • properties

      public final GeoIpProcessor.Builder properties(String value, String... values)
      Controls what properties are added to the target_field based on the geoip lookup.

      API name: properties

      Adds one or more values to properties.

    • targetField

      public final GeoIpProcessor.Builder targetField(@Nullable String value)
      The field that will hold the geographical information looked up from the MaxMind database.

      API name: target_field

    • downloadDatabaseOnPipelineCreation

      public final GeoIpProcessor.Builder downloadDatabaseOnPipelineCreation(@Nullable Boolean value)
      If true (and if ingest.geoip.downloader.eager.download is false), the missing database is downloaded when the pipeline is created. Else, the download is triggered by when the pipeline is used as the default_pipeline or final_pipeline in an index.

      API name: download_database_on_pipeline_creation

    • self

      protected GeoIpProcessor.Builder self()
      Specified by:
      self in class ProcessorBase.AbstractBuilder<GeoIpProcessor.Builder>
    • build

      public GeoIpProcessor build()
      Builds a GeoIpProcessor.
      Specified by:
      build in interface ObjectBuilder<GeoIpProcessor>
      Throws:
      NullPointerException - if some of the required fields are null.