[CXX-1334] Add index hint to aggregation and non-materialized views Created: 05/May/17  Updated: 11/Aug/17  Resolved: 05/Jun/17

Status: Closed
Project: C++ Driver
Component/s: API
Affects Version/s: None
Fix Version/s: 3.2.0-rc0

Type: New Feature Priority: Major - P3
Reporter: Rathi Gnanasekaran Assignee: Patrick Freed
Resolution: Done Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by DRIVERS-376 Support passing index hint to aggrega... Closed
Epic Link: CXX MongoDB 3.6 Support

 Comments   
Comment by Githook User [ 05/Jun/17 ]

Author:

{u'name': u'Patrick Freed', u'email': u'patrick.freed@mongodb.com'}

Message: CXX-1334 Add index hint to aggregation and non-materialized views
Branch: master
https://github.com/mongodb/mongo-cxx-driver/commit/6565cdfd7421ae1a8315227cf1655534df8660f1

Comment by J Rassi [ 06/May/17 ]

No C driver changes are needed. The documentation for mongoc_collection_aggregate() indicates that it supports passing through any "[parameter] to the aggregate command, besides pipeline, as fields in opts".

Thus, the work for this ticket should be:

  • API changes: add options::aggregate::hint() getter and setter.
  • Implementation changes: serialize the hint to the options document in collection::aggregate().

The driver already has "support for index hints against non-materialized views, for all operations that support hint.", so no changes are needed for views.

Comment by David Golden [ 05/May/17 ]

rassi, could you please see if this needs C driver changes or if we can do it directly on our side?

Generated at Wed Feb 07 22:02:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.