def multiple_queries(queries, options = nil, strategy = nil)
      if options.is_a?(Hash)
        index_name_key = options.delete(:index_name_key) || options.delete('index_name_key')
        strategy = options.delete(:strategy) || options.delete('strategy')
        request_options = options.delete(:request_options) || options.delete('request_options')
      else
        # Deprecated def multiple_queries(queries, index_name_key, strategy)
        index_name_key = options
      end
      index_name_key ||= :index_name
      strategy ||= 'none'
      request_options ||= {}

      requests = {
        :requests => queries.map do |query|
          query = query.dup
          index_name = query.delete(index_name_key) || query.delete(index_name_key.to_s)
          raise ArgumentError.new("Missing '#{index_name_key}' option") if index_name.nil?
          encoded_params = Hash[query.map { |k, v| [k.to_s, v.is_a?(Array) ? v.to_json : v] }]
          { :indexName => index_name, :params => Protocol.to_query(encoded_params) }
        end
      }
      post(Protocol.multiple_queries_uri(strategy), requests.to_json, :search, request_options)
    end
def multiple_queries(queries, options = nil, strategy = nil)
      if options.is_a?(Hash)
        index_name_key = options.delete(:index_name_key) || options.delete('index_name_key')
        strategy = options.delete(:strategy) || options.delete('strategy')
        request_options = options.delete(:request_options) || options.delete('request_options')
      else
        # Deprecated def multiple_queries(queries, index_name_key, strategy)
        index_name_key = options
      end
      index_name_key ||= :index_name
      strategy ||= 'none'
      request_options ||= {}

      requests = {
        :requests => queries.map do |query|
          query = query.dup
          index_name = query.delete(index_name_key) || query.delete(index_name_key.to_s)
          raise ArgumentError.new("Missing '#{index_name_key}' option") if index_name.nil?
          encoded_params = Hash[query.map { |k, v| [k.to_s, v.is_a?(Array) ? v.to_json : v] }]
          { :indexName => index_name, :params => Protocol.to_query(encoded_params) }
        end
      }
      post(Protocol.multiple_queries_uri(strategy), requests.to_json, :search, request_options)
    end
This method allows to query multiple indexes with one API call

 @param queries the array of hash representing the query and associated index name
 @param options - accepts those keys:
   - index_name_key the name of the key used to fetch the index_name (:index_name by default)
   - strategy define the strategy applied on the sequential searches (none by default)
   - request_options contains extra parameters to send with your query