This index pipeline stage looks up the geographical location of an IP address. If the IP Address Field (ipAddrField) is specified, it will be used first to perform the geolocation lookup. If the lookup is successful, then the Hostname Field (hostnameField) will be skipped. However, if the lookup failed or the IP Address Field is blank, and the Hostname Field is specified, then the stage will try to perform the lookup using the hostname. The default geo database is GeoLite2-City from MaxMind. To use a different database for which you have a commercial license, you can upload it to the blob store in binary format, then specify its blob ID in the Geoip Lookup Database Blob ID (blobId) parameter.

Fields added in this stage

When this stage is run, specific fields are added to the document. If the value is not present, the value added is undefined.
FieldDefinition
geo_loc_coordThe latitude and longitude coordinates of the location. For example, 37.751,-97.822.
geo_postal_codeThe postal code of the location.
geo_country_nameThe country of the geographic location. For example, United States.
geo_subdivision_isoThe subdivision of the country in an ISO code format. For example, the ISO code for the state or province of the geographic location.
geo_lonThe longitude of the location. For example, -97.822.
geo_country_isoThe two-letter ISO code for the country of the location. For example, US.
geo_subdivision_nameThe subdivision name of the location in the country. For example, the name of the state or province of the geographic location.
geo_latThe latitude of the location. For example, 37.751.
geo_city_nameThe city name of the location. For example, Chicago.

Configuration

When entering configuration values in the UI, use unescaped characters, such as \t for the tab character. When entering configuration values in the API, use escaped characters, such as \\t for the tab character.