module Elastictastic::BasicDocument::ClassMethods
Attributes
default_index[W]
Public Instance Methods
in_index(name_or_index)
click to toggle source
# File lib/elastictastic/basic_document.rb, line 137 def in_index(name_or_index) Scope.new(Elastictastic::Index(name_or_index), self) end
mapping()
click to toggle source
# File lib/elastictastic/basic_document.rb, line 121 def mapping mapping_for_type = { 'properties' => properties } mapping_for_type['_boost'] = @_boost if @_boost if @_routing_field mapping_for_type['_routing'] = { 'path' => @_routing_field.to_s, 'required' => @_routing_required } end { type => mapping_for_type } end
scoped(params)
click to toggle source
# File lib/elastictastic/basic_document.rb, line 141 def scoped(params) current_scope.scoped(params) end
type()
click to toggle source
# File lib/elastictastic/basic_document.rb, line 133 def type name.underscore end
Private Instance Methods
default_index()
click to toggle source
# File lib/elastictastic/basic_document.rb, line 151 def default_index @default_index || Index.default end
default_scope()
click to toggle source
# File lib/elastictastic/basic_document.rb, line 147 def default_scope in_index(default_index) end