NAME

Data::AnyXfer::Elastic::Utils::Validator

DESCRIPTION

This module is a helper utility to validate queries against Elasticsearch.

See: https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-validate.html

SYNOPSIS

use Data::AnyXfer::Elastic::Utils::Validator ();

my $validator = Data::AnyXfer::Elastic::Utils::Validator->new;

RESPONSE

{
   "explanations": [
       {
           "error": "Invalid Exception",
           "valid": 1
       }
   ],
   "valid": 1
}

METHODS

my $validation_response = $validator->validate_geo_shape( Geo::JSON );

Validates the provided GeoJSON shape against Elasticsearch validator. Checks for self-intersections, duplicate points etc.

COPYRIGHT

This software is copyright (c) 2019, Anthony Lucas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.