[SERVER-3984] Support $or and geo queries Created: 30/Sep/11  Updated: 11/Jul/16  Resolved: 22/Nov/13

Status: Closed
Project: Core Server
Component/s: Geo, Querying
Affects Version/s: None
Fix Version/s: 2.5.5

Type: Improvement Priority: Major - P3
Reporter: Greg Studer Assignee: Benety Goh
Resolution: Done Votes: 34
Labels: query_triage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File server3984.js    
Issue Links:
Depends
Related
related to SERVER-11836 $or with "special" query fails someti... Closed
is related to SERVER-5858 Special index types including hashed ... Closed
is related to SERVER-18004 Support $or between geo queries in th... Closed
Participants:

 Description   

In some cases it would be useful to do combinations of geospatial queries using $or, or $all, to do geospatial union or intersection.



 Comments   
Comment by Alon Horev [ 13/Apr/15 ]

Done: https://jira.mongodb.org/browse/SERVER-18004

Comment by Daniel Pasette (Inactive) [ 13/Apr/15 ]

alonho, can you open a new ticket please?

Comment by Alon Horev [ 12/Apr/15 ]

This still isn't solved for sharded collections. Should I open another ticket or re-open this one?
It's easy to reproduce: invoke a $or with two geoWithin on a sharded collection and you'll get: database error: $or may not contain 'special' query

Comment by Githook User [ 22/Nov/13 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-3984 added support for $or and geo queries
Branch: master
https://github.com/mongodb/mongo/commit/e34325d78543aca3a9f37469aee64c8a9bd23772

Comment by Robert Ignacz [ 06/Aug/13 ]

It would be useful

Comment by Ryan Cino [ 25/Mar/13 ]

This is strongly, and negatively, affecting our ability to get a key feature out for our app. Is there a known workaround for the time being?

Comment by Daniel Kador [ 02/Dec/12 ]

Kind of annoying that I can't put my geo query inside of an $and expression with my other clauses. Makes the code a bit harder to write even though it's identical to just listing the clauses without the $and.

Comment by Shuo Chang [ 08/Nov/12 ]

+1 Any update on this?

Comment by Tim Xi [ 10/Sep/12 ]

I think this feature is very import for our project. We need search members who are within multiple polygons with $or

Comment by Jaakko [ 21/Aug/12 ]

+1

Meanwhile, a workaround would be much appreciated.

Comment by Dawid [ 03/May/12 ]

Example I had database witch job offers:

Some jobs are with multi localization OK no problem i solved this

But some are specify only to some region

Eq:
lat => 21,131231 , 12,43243241
$and => province => 12

and Question How i make this ?

SELECT * FROM jobs WHERE province = 12 AND geo NEAR($LAT);

Imprisbre

Yep i can make spageti code add to LAT all city in province about 3 thousand

A

Comment by Alex [ 14/Apr/12 ]

+1

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