The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Elastic::Model::TypeMap::ES - Type maps for ElasticSearch-specific types

VERSION

version 0.01

DESCRIPTION

Elastic::Model::TypeMap::ES provides mapping, inflation and deflation for ElasticSearch specific types.

TYPES

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        => 'just_name',
        properties  => {
            index   => {
                type                         => 'string',
                index                        => 'not_analyzed',
                index_name                   => 'uid.index',
                omit_norms                   => 1,
                omit_term_freq_and_positions => 1,
            },
            type => {
                type                         => 'string',
                index                        => 'not_analyzed',
                index_name                   => 'uid.type',
                omit_norms                   => 1,
                omit_term_freq_and_positions => 1,
            },
            id   => {
                type                         => 'string',
                index                        => 'not_analyzed',
                index_name                   => 'uid.id',
                omit_norms                   => 1,
                omit_term_freq_and_positions => 1,
            },
            routing   => {
                type                         => 'string',
                index                        => 'no',
                omit_norms                   => 1,
                omit_term_freq_and_positions => 1,
            },
        }
    }

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' }.

AUTHOR

Clinton Gormley <drtech@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2012 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.