Elastic::Model::TypeMap::ES - Type maps for ElasticSearch-specific types
version 0.51
Elastic::Model::TypeMap::ES provides mapping, inflation and deflation for Elasticsearch specific types.
Attributes of type "Keyword" in Elastic::Model::Types are in/deflated via "Any" in Elastic::Model::TypeMap::Moose and are mapped as:
{ type => 'string', index => 'not_analyzed' }
It is a suitable type to use for string attributes which should not be analyzed, and will not be used for scoring. Rather they are suitable to use as filters.
An Elastic::Model::UID is deflated into a hash ref and reinflated via "new_from_store()" in Elastic::Model::UID. It is mapped as:
{ type => 'object', dynamic => 'strict', path => 'path', properties => { index => { type => 'string', index => 'not_analyzed' }, type => { type => 'string', index => 'not_analyzed' }, id => { type => 'string', index => 'not_analyzed' }, routing => { type => 'string', index => 'no' }, } }
Attributes of type "GeoPoint" in Elastic::Model::Types are mapped as { type => 'geo_point' }.
{ type => 'geo_point' }
Attributes of type "Binary" in Elastic::Model::Types are deflated via "encode_base64" in MIME::Base64 and inflated via "decode_base_64" in MIME::Base64. They are mapped as { type => 'binary' }.
{ type => 'binary' }
Attributes of type "Timestamp" in Elastic::Model::Types are deflated to epoch milliseconds, and inflated to epoch seconds (with floating-point milliseconds). It is mapped as { type => 'date' }.
{ type => 'date' }
Note: When querying timestamp fields in a View you will need to express the comparison values as epoch milliseconds or as an RFC3339 datetime:
{ my_timestamp => { '>' => 1351748867 * 1000 }} { my_timestamp => { '>' => '2012-11-01T00:00:00Z' }}
Clinton Gormley <drtech@cpan.org>
This software is copyright (c) 2015 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.
To install Elastic::Model, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Elastic::Model
CPAN shell
perl -MCPAN -e shell install Elastic::Model
For more information on module installation, please visit the detailed CPAN module installation guide.