[SERVER-30188] Index option to skip keys that are too large Created: 17/Jul/17 Updated: 27/Oct/23 Resolved: 18/Jul/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Question | Priority: | Minor - P4 |
| Reporter: | Karolin Varner | Assignee: | Backlog - Storage Execution Team |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Storage Execution
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
Currently if there is any document with a key too large to be indexed (>1024), an error will be thrown and the index will not be created. I would like to have an option to skip those values and index all the other keys. As far as I can see, this can not be achieved with partial indices for multikey indices, since partial indices can only exclude the entire document from being indexed, not a single element from the array being indexed. |
| Comments |
| Comment by Karolin Varner [ 18/Jul/17 ] |
|
@Eric Awesome! Thank you for that info, I'll watch that ticket then |
| Comment by Eric Milkie [ 18/Jul/17 ] |
|
Instead of implementing this idea (which would be counted as "index corruption" by our validation checking), we are instead working on lifting the index key length limit, which is only necessarily for the MMAPv1 storage engine; see |
| Comment by Karolin Varner [ 18/Jul/17 ] |
|
Hi Stephen, Best, |
| Comment by Stennie Steneker (Inactive) [ 18/Jul/17 ] |
|
Hi Karolin, There is already a failIndexKeyTooLong server parameter which you can set to false if you want to ignore values that exceed the index key length limit. Generally this isn't a recommended parameter to disable. If failIndexKeyTooLong is set to false, documents will silently fail to be included in indexes when a value is too long to index. This can lead to some unexpected behaviors (see Regards, |
| Comment by Karolin Varner [ 17/Jul/17 ] |
|
Thanks, I only noticed when I couldn't change it any more! |
| Comment by Eric Milkie [ 17/Jul/17 ] |
|
This doesn't appear to be filed in the correct product, as you are talking about MongoDB. I will move it now. |