molten-trunk/molten5_withgrid/vendor/plugins/acts_as_ferret/lib/ferret_server.rb
# make sure we have a versioned index in place, building one if necessary
make sure we have a versioned index in place, building one if necessary
make sure we have a versioned index in place building one if necessary
def ensure_index_exists(class_name)
        @logger.debug "DRb server: ensure_index_exists for class #{class_name}"
        with_class class_name do |clazz|
          dir = clazz.aaf_configuration[:index_dir]
          unless File.directory?(dir) && File.file?(File.join(dir, 'segments')) && dir =~ %r{/\d+(_\d+)?$}
            rebuild_index(clazz)
          end
        end
      end
def ensure_index_exists ( class_name ) @logger . debug "DRb server: ensure_index_exists for class #{class_name}" with_class class_name do | clazz | dir = clazz . aaf_configuration [ :index_dir ] unless File . directory? ( dir ) && File . file? ( File . join ( dir , 'segments' ) ) && dir =~ %r{ / \d +(_ \d +)?$ } rebuild_index ( clazz ) end end end
make sure we have a versioned index in place, building one if necessary
make sure we have a versioned index in place building one if necessary
class_name