给定以下数据:
{
_id: ObjectId("51659dc99d62eedc1a000001"),
type: "image_search",
branch: "qa_media_discovery_feelobot",
time_elapsed: 19000,
test: "1365613930 All Media",
search_term: null,
env: "delta",
date: ISODate("2013-04-10T17:13:45.751Z")
}
我想运行如下命令:
avg_image_search_time = @coll.find("type" => "image_search").avg(:time_elapsed)
我将如何做到这一点?