[DOCS-4372] Document distinct()'s behavior when field is an array Created: 15/Oct/14 Updated: 13/Nov/23 Resolved: 20/Feb/15 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual |
| Affects Version/s: | None |
| Fix Version/s: | v1.3.18, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Ranjith Ramachandra | Assignee: | Kay Kim (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: | |
| Days since reply: | 8 years, 51 weeks, 6 days ago |
| Description |
|
When there is an array field in the records and a distinct query is performed on that field, the return is not an array of arrays. The behaviour is not documented anywhere and is quite counter-intuitive. I would expect an array of arrays. Even if it is not the case there should at least be some documentation about this beahaviour |
| Comments |
| Comment by Githook User [ 20/Feb/15 ] | ||||||
|
Author: {u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}Message: | ||||||
| Comment by Githook User [ 20/Feb/15 ] | ||||||
|
Author: {u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}Message: | ||||||
| Comment by Githook User [ 20/Feb/15 ] | ||||||
|
Author: {u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}Message: | ||||||
| Comment by Ramon Fernandez Marina [ 14/Nov/14 ] | ||||||
|
Hi ranjith19, when the distinct() field is an array, each element of the array is considered a distinct value. Here's another example similar to yours that illustrates this behavior:
You're right about the documentation part, so I'm moving this ticket to the DOCS project so the documentation can be enhanced. | ||||||
| Comment by Ranjith Ramachandra [ 12/Nov/14 ] | ||||||
|
What is the status on this bug? |