-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: 1.46.2
-
Component/s: Query Bar
-
Environment:OS:
node.js / npm versions:
Additional info:
-
None
-
None
-
Developer Tools
We added hint to the query options, but it's not actually used in the crud tab, or schema tab when we perform the operations:
https://github.com/mongodb-js/compass/blob/1e95d95cc2326941618e33ceb4792707c096afbc/packages/compass-crud/src/stores/crud-store.ts#L1639
For this ticket we should do two things, first, we should add a validator to mongodb-query-parser to validate hints:
Next we need to use the hint field when we perform operations in the query/aggregation options for the crud tab, schema tab, and explain.
This can be very loose as hints can be strings or documents:
https://www.mongodb.com/docs/manual/reference/method/cursor.hint/
Adding the validator to mongodb-query-parser will get rid of this noisy log (happens on every query in Compass):
PR where we added hint: