[SERVER-2585] Allow nested $or operator Created: 18/Feb/11  Updated: 12/Jul/16  Resolved: 24/Jun/11

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 1.6.0, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.6.5, 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, 1.7.6
Fix Version/s: 1.9.1

Type: Improvement Priority: Major - P3
Reporter: Flavien Assignee: Aaron Staple
Resolution: Done Votes: 22
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-3192 allow nesting $or within $and Closed
Related
Participants:

 Description   

Allowing nested $or operators would dramatically simplify the logic to build queries. The work of transformation/normalizing the query so that the engine understands it should be done by the server, not the client.



 Comments   
Comment by Aaron Staple [ 15/Aug/11 ]

Xiaofeng - can you send the git hash for the mongod version you are using (this is logged on mongod startup).

Comment by Xiaofeng Wu [ 04/Aug/11 ]

I have tried with 1.9.1 development release and night build with nested $or like this. I saw the message as following:
"failed with exception: exception: 13090 nested $or/$nor not allowed", but I checked the source code(matcher.cpp), this information has been removed. I wonder if the build is not based on latest code. Please check out.

Comment by auto [ 31/Jul/11 ]

Author:

{u'login': u'astaple', u'name': u'Aaron', u'email': u'aaron@10gen.com'}

Message: SERVER-2585 test
Branch: master
https://github.com/mongodb/mongo/commit/8b35cf0f945c5636df17709bf03a03f63217273f

Comment by Aaron Staple [ 24/Jun/11 ]

We've added in matching for nested or clauses, but not index support. Index support is SERVER-3327.

Comment by auto [ 16/Jun/11 ]

Author:

{u'login': u'astaple', u'name': u'Aaron', u'email': u'aaron@10gen.com'}

Message: SERVER-3192 SERVER-2585 allow nested or clauses in queries, opaque to indexing system
Branch: master
https://github.com/mongodb/mongo/commit/0b32ad4e6d5629525001add932fe78ba517cb503

Comment by Eliot Horowitz (Inactive) [ 29/Apr/11 ]

Its in the planned but not scheduled bucket, which means we are going to do it, but have not put in a release yet.

Comment by Mikael Nousiainen [ 29/Apr/11 ]

Could someone from the developers comment on the possibility/schedule of implementing this?

Comment by Thomas Tucker [ 25/Mar/11 ]

+1 very good for dynamic query building on client

Comment by Thierry Passeron [ 01/Mar/11 ]

+1 Very important to me!

Comment by Fred Stluka [ 18/Feb/11 ]

+1

See: http://jira.mongodb.org/browse/SERVER-1089?focusedCommentId=23237&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_23237

Comment by Mikael Nousiainen [ 18/Feb/11 ]

+1 - I completely agree!

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