Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter hint in Query#hint is not index name [DATAMONGO-2365] #3221

Closed
spring-projects-issues opened this issue Sep 12, 2019 · 4 comments
Closed

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Sep 12, 2019

huantt opened DATAMONGO-2365 and commented

As the following code, I expect that hint parameter that passed into withHint method must be index name.

Query query = new Query().withHint("country_code_1")

However, It actually is a json text likes:

Query query = new Query().withHint("{country_code: 1}")

Attachments:

Issue Links:

  • DATAMONGO-2249 Query hint leads to error when executed via reactive template

Referenced from: pull request #828

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Sep 12, 2019

huantt commented

!image-2019-09-12-16-45-23-487.png!

Look like you guys have change type of this parameter to Document.
However, it's still not friendly.
I expect that it is index name

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Sep 12, 2019

Christoph Strobl commented

the driver removed support for plain string index and now only accepts Bson. We're in talks with them to find a solution

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Sep 12, 2019

huantt commented

OK Christoph Strobl, I've seen Bson parameter in version 2.2
However I hope that it will be index name

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Oct 1, 2019

Christoph Strobl commented

New method scheduled for MongoDB Java Driver 3.12.0. See JAVA-3441 for updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants