[SERVER-3241] Why does group return an empty result when no documents are matched? Created: 10/Jun/11  Updated: 16/Mar/21  Resolved: 10/Jun/11

Status: Closed
Project: Core Server
Component/s: MapReduce
Affects Version/s: 1.8.0-rc2
Fix Version/s: None

Type: Question Priority: Minor - P4
Reporter: Martin Thierer Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-54958 Empty result when counting from empty... Backlog
Participants:
Linked BF Score: 0

 Description   

The result for the "group" function is empty if the affected collection is empty or no documents match the condition. Shouldn't it return the value of the "initial" parameter as the result instead?



 Comments   
Comment by Eliot Horowitz (Inactive) [ 10/Jun/11 ]

No.

Group returns key => result pairings
If there are no keys that match the query, you should get nothing back

Generated at Thu Feb 08 03:02:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.