[SERVER-41591] Custom index Created: 09/Jun/19 Updated: 17/Jun/19 Resolved: 17/Jun/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | RAFIK | Assignee: | Danny Hatcher (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
Some times, we need indexing of type: index each value of "attr1" + any document with value "attr2='ccc'"
In general, we need to customise indexing behaviour. (using predicats or function)
|
| Comments |
| Comment by Danny Hatcher (Inactive) [ 17/Jun/19 ] | ||||||||||||
|
The SERVER project is for bugs and feature suggestions for the MongoDB server. If you need assistance on designing optimal indexes for your use case, I encourage you to ask our community by posting on the mongodb-user group or on Stack Overflow with the mongodb tag. | ||||||||||||
| Comment by RAFIK [ 13/Jun/19 ] | ||||||||||||
|
The reason for this is to respond to this query:
db.docs.find({})
| ||||||||||||
| Comment by RAFIK [ 13/Jun/19 ] | ||||||||||||
|
Yes, i just found that mongo has that feature and that has "index intersection" that respond to my case very match, (not yeat tested, my case is to get an intersection between fullText search index and multikey index) Thanks.
| ||||||||||||
| Comment by Danny Hatcher (Inactive) [ 11/Jun/19 ] | ||||||||||||
|
You can use partial indexes which will let you set an equality on specific values in your indexes. Does this fulfill your use case? If not, can you please explain why partial indexes are insufficient? |