[SERVER-44817] Multi Key Index ,According to definition it has to create index for each element in array. Created: 25/Nov/19  Updated: 26/Nov/19  Resolved: 26/Nov/19

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Pushpak jalibili Assignee: Eric Sedor
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File collection.png     PNG File def.png     PNG File index.png    
Participants:

 Description   



 Comments   
Comment by Eric Sedor [ 26/Nov/19 ]

jpushpakraj1998@gmail.com,

getIndexes returns a list of indexes in a collection. The MultiKey documentation is referring to the number of keys within a specific index. The {type_1} index will contain 2 keys for the example document.

For further discussion about how MongoDB works, I encourage you to ask our community by posting on the mongodb-user group or on Stack Overflow with the mongodb tag. The SERVER project is for bugs and feature suggestions for the MongoDB server.

Sincerely,
Eric

Comment by Pushpak jalibili [ 25/Nov/19 ]

I created a multi key index on field (type)(see i.e. collection.png) , in type array there are two values one is accessory and charger .

But In result only one index is created .(see fig index . png)

According to definition total 2 indexes should be created.

Generated at Thu Feb 08 05:07:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.