def find_every_by_index(options={})
      # Construct the query. First add the type information.
      query =""

      # set default operator
      options[:operator] ||= :or

      # First add the conditions predicates
      conditions = options[:conditions]
      if conditions.is_a?(String)
        query << conditions
      elsif conditions.is_a?(Array) and !conditions.empty?
        nb_conditions = conditions.size - 1
        i = 0
        query << conditions[0].gsub(/\?/) do |c|
          i += 1
          raise ArgumentError, "Missing condition argument" unless i <= nb_conditions
          "#{conditions[i]}"
        end
      elsif conditions.is_a?(Hash) and !conditions.empty?
        conditions.each do |k, v|
          query << "#{k}:#{v} "
        end
      end

      fields =
        if options[:fields]
          options[:fields]
        else
          fields = options[:view] ? index_views_hash[options[:view]] : index_views_hash[:default]
          fields ||= []
        end

      if options[:format] == :ids
        index_adapter.find_ids_by_index(self, query, {  :offset   => options[:offset],
                                                  :order    => options[:order],
                                                  :limit    => options[:limit],
                                                  :fields   => fields,
                                                  :operator => options[:operator],
                                                  :raw_result => options[:raw_result]})
      else
        index_adapter.find_by_index(self, query, {  :offset   => options[:offset],
                                              :order    => options[:order],
                                              :limit    => options[:limit],
                                              :operator => options[:operator],
                                              :raw_result => options[:raw_result]})
      end

    end
def find_every_by_index(options={})
      # Construct the query. First add the type information.
      query =""

      # set default operator
      options[:operator] ||= :or

      # First add the conditions predicates
      conditions = options[:conditions]
      if conditions.is_a?(String)
        query << conditions
      elsif conditions.is_a?(Array) and !conditions.empty?
        nb_conditions = conditions.size - 1
        i = 0
        query << conditions[0].gsub(/\?/) do |c|
          i += 1
          raise ArgumentError, "Missing condition argument" unless i <= nb_conditions
          "#{conditions[i]}"
        end
      elsif conditions.is_a?(Hash) and !conditions.empty?
        conditions.each do |k, v|
          query << "#{k}:#{v} "
        end
      end

      fields =
        if options[:fields]
          options[:fields]
        else
          fields = options[:view] ? index_views_hash[options[:view]] : index_views_hash[:default]
          fields ||= []
        end

      if options[:format] == :ids
        index_adapter.find_ids_by_index(self, query, {  :offset   => options[:offset],
                                                  :order    => options[:order],
                                                  :limit    => options[:limit],
                                                  :fields   => fields,
                                                  :operator => options[:operator],
                                                  :raw_result => options[:raw_result]})
      else
        index_adapter.find_by_index(self, query, {  :offset   => options[:offset],
                                              :order    => options[:order],
                                              :limit    => options[:limit],
                                              :operator => options[:operator],
                                              :raw_result => options[:raw_result]})
      end

    end
Indexed find method called by {#find_with_index} and dispatches
 the actual search to the adapter.