# File lib/more/facets/uri.rb, line 42
  def query_to_hash(query_string)
    return {} unless query_string

    query_parameters = cgi_parse(query_string)

    query_parameters.each { |key, val|
      ## replace the array with an object
      query_parameters[key] = val[0] if 1 == val.length
    }

    ## set default value to nil! cgi sets this to []
    query_parameters.default = nil

    return query_parameters
  end