[DOCS-13553] [Server] Clarify number of index entries per array Created: 25/Feb/20 Updated: 06/Nov/23 |
|
| Status: | Internal Review |
| Project: | Documentation |
| Component/s: | manual, Server |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Mark Callaghan (Inactive) | Assignee: | Nicholas Larew |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | proactive, release, reopened, server-docs-bug-bash | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: | |
| Days since reply: | 29 weeks, 6 days ago |
| Epic Link: | DOCSP-30314 |
| Description |
|
From the docs it wasn't clear to me that the number of index entries for an array field is based on the number of distinct values in the array. I read the docs below to imply that the number of entries is based on the number of values in the array. For example, this array [1,1,2] will generate 2 index entries, not 3. This was highlighted in NHTT training and I think the docs should explain it. https://docs.mongodb.com/manual/core/index-multikey/ https://docs.mongodb.com/manual/indexes/ |
| Comments |
| Comment by Nicholas Larew [ 13/Jul/23 ] |
| Comment by Sarah Olson [ 02/Nov/22 ] |
|
Thanks for the confirm spencer.brown@mongodb.com! |
| Comment by Spencer Brown [ 31/Oct/22 ] |
|
These incorrect documentation pages still need to be fixed. |
| Comment by Education Bot [ 31/Oct/22 ] |
|
Hello! This ticket has been closed due to inactivity. If you believe this ticket is still important, please reopen it and leave a comment to explain why. Thank you! |
| Comment by Ravind Kumar (Inactive) [ 31/Mar/20 ] |
|
Whoops - I completely misread the ticket. Thanks for the clarity anyways! |
| Comment by Louis Williams [ 31/Mar/20 ] |
|
Mark is correct, we only index distinct keys from an array. A KeyString is effectively a tuple of (Value, RecordId), so any repeated values within a document in an array are deduplicated. Key generation achieves this by using a std::set of KeyStrings. We do not index a key's offset into the array. That actually wouldn't be useful information, because BSON arrays can have variable types. Storing an array offset would only be useful if each element were of the same size. We should probably update the docs to clarify that we only index each distinct element in an array. |
| Comment by Mark Callaghan (Inactive) [ 27/Mar/20 ] |
|
Hoping for an answer |
| Comment by Mark Callaghan (Inactive) [ 27/Mar/20 ] |
|
No objections from me |
| Comment by Backlog - Core Eng Program Management Team [ 26/Mar/20 ] |
|
There hasn't been any recent activity on this HELP ticket, so we're resolving it. Thanks for reaching out! Please feel free to reopen this if we've missed something. |
| Comment by Ravind Kumar (Inactive) [ 27/Feb/20 ] |
|
Yeah this looks like a DOCS question. We can move it to DOCS and queue it for work, though given the upcoming release I cannot provide a schedule for when we can address this. Any objections mark.callaghan? |
| Comment by Eoin Brazil [ 26/Feb/20 ] |
|
Hi ravind.kumar Can you triage this as I think it's a Docs question ? Kindest regards, |