++ed by:
ABRAXXA DRTECH TIMB

3 PAUSE user(s)
4 non-PAUSE user(s).

Clinton Gormley

NAME

Elastic::Model::Meta::Class::Doc - A meta-class for Docs

VERSION

version 0.28

DESCRIPTION

Extends the meta-class for classes which do Elastic::Model::Role::Doc. You shouldn't need to use anything from this class directly.

ATTRIBUTES

mapping

    \%mapping = $meta->mapping($mapping);

Used to store custom mapping config for a class. Use the "has_mapping" in Elastic::Doc sugar instead of calling this method directly.

unique_keys

    \%unique_keys = $meta->unique_keys

Returns a hashref whose keys are the attribute names, and whose values are the value specified in "unique_key" in Elastic::Manual::Attributes. If there are no unique keys, returns undef.

METHODS

new_stub()

    $stub_doc = $meta->new_stub($uid);
    $stub_doc = $meta->new_stub($uid, $source);

Creates a stub instance of the class, which auto-inflates when any accessor is called. If the $source param is defined, then it is used to inflate the attributes of the instance, otherwise the attributes are fetched from Elasticsearch when an attribute is accessed.

AUTHOR

Clinton Gormley <drtech@cpan.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.




Hosting generously
sponsored by Bytemark