NAME
Elastic::Model::TypeMap::ES - Type maps for ElasticSearch-specific types
VERSION
version 0.52
DESCRIPTION
Elastic::Model::TypeMap::ES provides mapping, inflation and deflation for Elasticsearch specific types.
TYPES
Elastic::Model::Types::Keyword
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.
Elastic::Model::Types::UID
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'
},
}
}
Elastic::Model::Types::GeoPoint
Attributes of type "GeoPoint" in Elastic::Model::Types are mapped as { type => 'geo_point' }
.
Elastic::Model::Types::Binary
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' }
.
Elastic::Model::Types::Timestamp
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' }
.
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' }}
AUTHOR
Clinton Gormley <drtech@cpan.org>
COPYRIGHT AND LICENSE
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.