Elastic::Model::Meta::Class::Doc - A meta-class for Docs
version 0.52
Extends the meta-class for classes which do Elastic::Model::Role::Doc. You shouldn't need to use anything from this class directly.
\%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 = $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.
undef
$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.
$source
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.