NAME

OpenSearch::Client::Core::3_0::Direct::GeoSpatial

VERSION

version 3.007009

SYNOPSIS

use OpenSearch::Client;

my $client = OpenSearch::Client->new( ... );

my $response = $client->geospatial-><methodname>(
  valone => $value1,
  valtwo => $value2
);

DESCRIPTION

IP2Geo processor

The ip2geo processor adds information about the geographical location of an IPv4 or IPv6 address. The ip2geo processor uses IP geolocation (GeoIP) data from an external endpoint and therefore requires an additional component, datasource, that defines from where to download GeoIP data and how frequently to update the data.

See OpenSearch documentation for geospatial.

METHODS

delete_ip2geo_datasource

Delete a specific IP2Geo data source.

Paths served by this method:

DELETE /_plugins/geospatial/ip2geo/datasource/{name}

Method added in OpenSearch version 2.11

$resp = $client->geospatial->delete_ip2geo_datasource(
    
     # path parameters
    
    'name'         =>  $name,      # required
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for geospatial->delete_ip2geo_datasource

geojson_upload_post

Use an OpenSearch query to upload `GeoJSON`, operation will fail if index exists. - When type is `geo_point`, only Point geometry is allowed - When type is `geo_shape`, all geometry types are allowed (Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, GeometryCollection, Envelope).

Paths served by this method:

POST /_plugins/geospatial/geojson/_upload

Method added in OpenSearch version 2.11

$resp = $client->geospatial->geojson_upload_post(
    
    'body'         =>  $body,      # optional
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for geospatial->geojson_upload_post

geojson_upload_put

Use an OpenSearch query to upload `GeoJSON` regardless if index exists. - When type is `geo_point`, only Point geometry is allowed - When type is `geo_shape`, all geometry types are allowed (Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, GeometryCollection, Envelope).

Paths served by this method:

PUT /_plugins/geospatial/geojson/_upload

Method added in OpenSearch version 2.11

$resp = $client->geospatial->geojson_upload_put(
    
    'body'         =>  $body,      # optional
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for geospatial->geojson_upload_put

get_ip2geo_datasource

Get one or more IP2Geo data sources, defaulting to returning all if no names specified.

Paths served by this method:

GET /_plugins/geospatial/ip2geo/datasource
GET /_plugins/geospatial/ip2geo/datasource/{name}

Method added in OpenSearch version 2.11

$resp = $client->geospatial->get_ip2geo_datasource(
    
     # path parameters
    
    'name'         =>  $name,      # optional
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for geospatial->get_ip2geo_datasource

get_upload_stats

Retrieves statistics for all geospatial uploads.

Paths served by this method:

GET /_plugins/geospatial/_upload/stats

Method added in OpenSearch version 2.11

$resp = $client->geospatial->get_upload_stats(
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for geospatial->get_upload_stats

put_ip2geo_datasource

Create a specific IP2Geo data source. Default values: - `endpoint`: `"https://geoip.maps.opensearch.org/v1/geolite2-city/manifest.json"` - `update_interval_in_days`: 3.

Paths served by this method:

PUT /_plugins/geospatial/ip2geo/datasource/{name}

Method added in OpenSearch version 2.11

$resp = $client->geospatial->put_ip2geo_datasource(
    
    'body'         =>  $body,      # optional
    
     # path parameters
    
    'name'         =>  $name,      # required
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for geospatial->put_ip2geo_datasource

put_ip2geo_datasource_settings

Update a specific IP2Geo data source.

Paths served by this method:

PUT /_plugins/geospatial/ip2geo/datasource/{name}/_settings

Method added in OpenSearch version 2.11

$resp = $client->geospatial->put_ip2geo_datasource_settings(
    
    'body'         =>  $body,      # optional
    
     # path parameters
    
    'name'         =>  $name,      # required
    
     # Common API query string parameters
    
    'error_trace'  =>  $qval1,     # boolean
    'filter_path'  =>  $qval2,     # list
    'human'        =>  $qval3,     # boolean
    'pretty'       =>  $qval4,     # boolean
    'source'       =>  $qval5,     # string
);

OpenSearch documentation for geospatial->put_ip2geo_datasource_settings

method_supported_in_version

Return whether a method in this module namespace is supported for an OpenSearch server version

my $boolean = $os->geospatial->method_supported_in_version(
    method  => 'delete_ip2geo_datasource',
    version => '2.4.0'
);

Both method and version are required.

See also global_method_supported_in_version

MANUAL

Documentation index OpenSearch::Client::Manual

HISTORY

This distribution is derived from Search::Elasticsearch version 7.714. All subsequent changes are unique to this distribution.

AUTHOR

Mark Dootson <mdootson@cpan.org> ( current maintainer )

CREDITS

OpenSearch::Client is based on Search::Elasticsearch version 7.714 by Enrico Zimuel <enrico.zimuel@elastic.co>.

COPYRIGHT AND LICENSE

Copyright (C) 2026 by Mark Dootson ( this distribution )

Copyright (C) 2021 by Elasticsearch BV ( original distribution )

This is free software, licensed under:

The Apache License, Version 2.0, January 2004