fix error
This commit is contained in:
parent
5314f282e1
commit
c4fdcd7b06
|
@ -82,7 +82,7 @@ class Site
|
|||
project_date_fields = Hash[*key_op.collect { |key, op| [key, {op => "$#{field}"}] }.flatten]
|
||||
group_id_fields = Hash[*key_op.collect { |key, op| [key, "$#{key}"] }.flatten]
|
||||
pipeline = [
|
||||
{"$match"=> {"_id" => {"$gte" => limit_ele['_id']}}},
|
||||
{"$match"=> {"_id" => {"$gte" => (limit_ele['_id'] rescue '')}}},
|
||||
{"$project" => {field => 1}.merge(project_date_fields)},
|
||||
{"$group" => {"_id" => group_id_fields,"count" => {"$sum" => 1}}},
|
||||
{"$sort" => {"_id"=>-1}}
|
||||
|
|
Loading…
Reference in New Issue