brandonblack/mongo-tools — pull request #29 by macworld (2013-02-03 16:48:29+00:00)
Title: Rewrite functions to handle sort() command in query

Mongosniff will output query as follow
query: { query: { price: { $gt: 99.0 } }, orderby: { duration: -1.0 } } ntoreturn: 0 ntoskip: 50

The filed "orderby " is useful to index analysis.So I change the input query
From
"B"=>{"$in"=>[24.0, 25.0, 28.0, 29.0]}, "A"=>{"$gt"=>27.3}}
To
"query" => { "B" => { "$in" => [24.0, 25.0, 28.0, 29.0]}, "A" => { "$gt" => 27.3}},
"orderby" => { "C" => 1.0 }