[SERVER-36183] collection.getIndexes() should display multikey metadata Created: 18/Jul/18  Updated: 06/Dec/22  Resolved: 27/Jul/18

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 3.4.0, 3.6.0
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Adam Harrison Assignee: Backlog - Query Team (Inactive)
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-7566 simpler way to figure out if an index... Backlog
Assigned Teams:
Query
Participants:

 Description   

MongoDB 3.6 introduces compatibility changes regarding the ability of a multikey index to be used in sorting (https://jira.mongodb.org/browse/SERVER-15086). To summarize:

In MongoDB 3.6:

  • A version 1 (or earlier) multikey index (MongoDB 3.2 and earlier) cannot be used to sort
  • A version 2 multikey index (MongoDB 3.4, 3.6) can be used to sort, provided that the sort field is not an array.

Given the performance implications, and that the indexes already contain this information, collection.getIndexes() should:

  • Display the index metadata identifying if an index is multikey
  • If a `v: 2`, show the path level multikey data for any multikey indexes


 Comments   
Comment by Ian Whalen (Inactive) [ 27/Jul/18 ]

Thanks for reporting Adam. We're closing as dupe of SERVER-7566 - please feel free to vote and watch that ticket. Note that the best solution to this might not entail changes to getIndexes but we believe that ticket tracks the work to more simply determine the multikey metadata.

Comment by Nick Brewer [ 25/Jul/18 ]

adamaharrison@gmail.com Thanks for your suggestion - I'm passing this along to our Query team as a feature request.

-Nick

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