def find_with_index(*args)
      options = args.extract_options!
      unless options[:bypass_index]
        case args.first
          when :first then
            validate_index_find_options(options)
            find_every_by_index(options.merge({:limit => 1})).first
          when :all   then
            validate_index_find_options(options)
            find_every_by_index(options)
          else
            find_from_ids(args, options)
        end
      else
        options.delete(:bypass_index)
        find_without_index(*(args + [options]))
      end
    end
def find_with_index(*args)
      options = args.extract_options!
      unless options[:bypass_index]
        case args.first
          when :first then
            validate_index_find_options(options)
            find_every_by_index(options.merge({:limit => 1})).first
          when :all   then
            validate_index_find_options(options)
            find_every_by_index(options)
          else
            find_from_ids(args, options)
        end
      else
        options.delete(:bypass_index)
        find_without_index(*(args + [options]))
      end
    end
Class #find method

 From - alias_method_chain :find, :index

 This redefines the original #find method of the class, and
 replaces it with an indexed version of #find. The indexed version can be
 bypassed (dispatch to original instead) by passing :bypass_index => true

 The instantiated records either as a single object (case of :first),
 or as an array of objects. When the option :raw_result => true
 is passed to it, it will return a result object specific to the indexer used.
 In the case of Solr, it will return a SolrResult object for example.