Method: Elasticsearch::Persistence::Repository#mapping
- Defined in:
- lib/elasticsearch/persistence/repository.rb
permalink #mapping(*args) ⇒ Elasticsearch::Model::Indexing::Mappings Also known as: mappings
Note:
If mappings were set when the repository was created, a block passed to this method will not be evaluated.
Get the index mapping. Optionally pass a block to define the mappings.
end
165 166 167 168 169 170 171 |
# File 'lib/elasticsearch/persistence/repository.rb', line 165 def mapping(*args) @memoized_mapping ||= @options[:mapping] || (begin if _mapping = __get_class_value(:mapping) _mapping end end) || (super && @mapping) end |