- PUBLIC TYPES
- COPYRIGHT AND LICENSE
Elastic::Model::Types - MooseX::Types for general and internal use
use Elastic::Model::Types qw(GeoPoint); has 'point' => ( is => 'ro', isa => GeoPoint, coerce => 1 );
Elastic::Model::Types define a number of MooseX::Types, some for internal use and some which will be useful generally.
use Elastic::Model::Types qw(Keyword); has 'status' => ( is => 'ro', isa => Keyword );
Keyword is a sub-type of
Str. It is provided to make it easy to map string values which should not be analyzed (eg a
status field rather than a
comment_body field). See "Keyword" in Elastic::Model::TypeMap::ES.
use Elastic::Model::Types qw(Binary); has 'binary_field' => ( is => 'ro', isa => Binary );
Inherits from the
Defined type. Is automatically Base64 encoded/decoded.
use Elastic::Model::Types qw(GeoPoint); has 'point' => ( is => 'ro', isa => GeoPoint, coerce => 1, );
GeoPoint is a hashref with two keys:
Numberbetween -180 and 180
Numberbetween -90 and 90
It can be coerced from an
[$lon,$lat] and from a
use Elastic::Model::Types qw(Timestamp); has 'timestamp' => ( is => 'ro', isa => Timestamp );
Timestamp is a
Num which holds floating point epoch seconds, with milliseconds resolution. It is automatically mapped as a
date field in Elasticsearch.
Clinton Gormley <firstname.lastname@example.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2014 by Clinton Gormley.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.