Misspelling when describing field alias 

Instead of Query.new({ "n" => "name" }) should be Query.new({ "name" => "n" })