[SERVER-77413] Replace old indexHint idl type with the new IndexHint type Created: 23/May/23  Updated: 08/Aug/23

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

Type: Improvement Priority: Major - P3
Reporter: Denis Grebennicov Assignee: Romans Kasperovics
Resolution: Unresolved Votes: 0
Labels: M3
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-68922 $natural parser should be stricter (r... Closed
is related to SERVER-77075 Define query settings in idl Closed
Assigned Teams:
Query Execution
Participants:

 Description   

indexHint is an idl type defined in hint.idl

Currently it accepts BSONObj or String as valid BSON types and is represented as a BSONObj in code (by converting an IndexName represented in String into a BSONObj).

When working with hint type, it not always clear what exactly does the hint represent, an IndexName, IndexKeyPattern, or a NaturalOrderHint.

As part of SERVER-77075 query settings were defined in the idl, together with the index hint spec and the new definition of the (new) index hint type.

New IndexHint class is represented as a class wrapping 

 

stdx::variant<IndexKeyPattern, IndexName, NaturalOrderHint> _hint;

 

which documents all possible index hint types.

As part of this ticket we would:


Generated at Thu Feb 08 06:35:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.