[SERVER-5878] Allow hashed indexes to be unique Created: 18/May/12 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | 2.1.2 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Kevin Matulef | Assignee: | Backlog - Query Optimization |
| Resolution: | Unresolved | Votes: | 14 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Query Optimization
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
Currently hashed indexes are not allowed to be unique (due to potential hash collisions on the keys). Uniqueness can be enforced on a field if a non-hashed index is created on the same field, but this is inefficient. It should be possible to create a unique hashed index by checking for a match on the actual document (not just on the key in the index) before insertion. |
| Comments |
| Comment by Asya Kamsky [ 22/Jan/19 ] |
|
It's not clear whether this is something that can be done. Flagging for discussion at needs triage. |