Module: Mongoid::Giza

Extended by:
ActiveSupport::Concern
Defined in:
lib/mongoid/giza.rb,
lib/mongoid/giza/index.rb,
lib/mongoid/giza/search.rb,
lib/mongoid/giza/indexer.rb,
lib/mongoid/giza/railtie.rb,
lib/mongoid/giza/version.rb,
lib/mongoid/giza/models/id.rb,
lib/mongoid/giza/xml_pipe2.rb,
lib/mongoid/giza/index/field.rb,
lib/mongoid/giza/index/common.rb,
lib/mongoid/giza/configuration.rb,
lib/mongoid/giza/dynamic_index.rb,
lib/mongoid/giza/index/attribute.rb

Overview

:nodoc:

Defined Under Namespace

Modules: ClassMethods Classes: Configuration, DynamicIndex, ID, Index, Indexer, Railtie, Search, XMLPipe2

Constant Summary collapse

VERSION =
"0.7.0".freeze

Instance Method Summary collapse

Instance Method Details

#generate_sphinx_indexesObject

Generates all the dynamic indexes defined on the class for the object


59
60
61
62
63
64
65
# File 'lib/mongoid/giza.rb', line 59

def generate_sphinx_indexes
  self.class.dynamic_sphinx_indexes.each do |dynamic_index|
    index = dynamic_index.generate_index(self)
    self.class.generated_sphinx_indexes[index.name] = index
    self.class.giza_configuration.add_index(index, true)
  end
end