[JAVA-4262] AggregateIterable should allow to set hint as String (index name) Created: 26/Jul/21  Updated: 28/Oct/23  Resolved: 18/Oct/21

Status: Closed
Project: Java Driver
Component/s: Query Operations
Affects Version/s: None
Fix Version/s: 4.4.0

Type: Improvement Priority: Unknown
Reporter: Christoph Strobl Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: external-user
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
Related
related to JAVA-2511 Support passing index hint to aggrega... Closed
Backwards Compatibility: Fully Compatible
Documentation Changes: Needed

 Description   

AggregateIterable only allows to set a hint via Bson. It would be nice to have something similar to FindIterable.hintString(...).

Reported via: spring-data-mongodb#2737



 Comments   
Comment by Githook User [ 18/Oct/21 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Support hint value as a string for aggregate (#802)

The string is the index name, rather than a document describing the keys

JAVA-4262
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/c8a6447a3f94a228d74b9fe93087c06d4e498386

Comment by Esha Bhargava [ 26/Jul/21 ]

cstrobl Thanks for reporting this. We'll do this in our next feature release.

Comment by Jeffrey Yemin [ 26/Jul/21 ]

The spec requires this: https://github.com/mongodb/specifications/pull/201/files

Generated at Thu Feb 08 09:01:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.