-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
BadValue Too many geoNear expressions in 2.3.8 #3767
Comments
@flovilmart Anything on this? |
Can your provide the logs when running with VERBOSE=1? This will log the full query. We have many tests covering the geoPoints. I'm not sure why your particular query fails |
|
@flovilmart Anything on this? |
I don't believe you can use geonear alongside $or as part of a restriction on mongodb |
@flovilmart It used to work all right until i updated my parse server version to 2.3.8 |
Can you provide the exact client code that trigger this issue? |
|
Anyone who updated to 2.3.8 is facing the same? |
And what's the query that's being done in cloud code? |
|
The point variable is unused, can you provide the exact code please so I can write a proper test and check against previous versions? |
@flovilmart I have edited the previous comment. |
I'll run the tests against 2.3.7 to try to indentify where / if a regression occured |
@flovilmart Any updates on this? |
I haven't had a chance to look at it during the week end |
@srameshr I know where it's coming from, actually, it comes from that commit 7319562, from @NotBobTheBuilder, which is detailed enough so you have more information why we don't support it anymore. Yes, it breaks your particular query, but that's for the best I believe. |
As a follow up - consider using $geoWithin and $centerSphere instead of $nearSphere. (Bear in mind that results will not be sorted by distance, though) |
thanks @NotBobTheBuilder for the followup! |
@flovilmart @NotBobTheBuilder Any workaround for "OR" involving |
Could you give an example of an error that's raised from a query with a null value? In the example above, the null shouldn't cause problems |
@NotBobTheBuilder Im thinking of using
This is the error:
|
It looks like the error is occuring because I'm not familiar enough with Parse to know if there's a way to use Otherwise, the options I see: (1). Using It's hacky but (3) is probably your best short term fix. I'm not sure how you express $not in Parse, I thought initially it would be doesNotMatchQuery but I'm not certain. Longer term, I will look at implementing (2) given others are likely to encounter this problem too, though I think (1) would be the ideal solution. |
Mongo has a hard limit on 1 $near operation per query. Restructuring to avoid SERVER-13732 should not invalidate a query by creating multiple $near operations. Additionally, queries with multiple $ors are now recursively handled, whereas before, ops at the top level would only have been pushed one level deeper. parse-community#3767
Mongo has a hard limit on 1 $near operation per query. Restructuring to avoid SERVER-13732 should not invalidate a query by creating multiple $near operations. Additionally, queries with multiple $ors are now recursively handled, whereas before, ops at the top level would only have been pushed one level deeper. parse-community#3767
(Lets move further discussion to that PR.) |
@NotBobTheBuilder I will do that and let you know ASAP. |
@NotBobTheBuilder That commit fixed it! Thanks! Hope its merged soon and available on 2.3.9 |
Mongo has a hard limit on 1 $near operation per query. Restructuring to avoid SERVER-13732 should not invalidate a query by creating multiple $near operations. Additionally, queries with multiple $ors are now recursively handled, whereas before, ops at the top level would only have been pushed one level deeper. #3767
Issue Description
All geo queries
near
,withinMiles
etc fail with the error:The same used to work previously under parse version
2.3.0
Steps to reproduce
Expected Results
Should work as it did under version 2.3.0
Actual Outcome
Error on Mongo
Environment Setup
Server
Database
MongoDB version: MongoDB shell version: 3.0.12
Storage engine: [FILL THIS OUT]
Hardware: [FILL THIS OUT]
Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): [FILL THIS OUT]
Logs/Trace
Include all relevant logs. You can turn on additional logging by configuring VERBOSE=1 in your environment.
The text was updated successfully, but these errors were encountered: