[SERVER-252] $not operator Created: 24/Aug/09  Updated: 12/Jul/16  Resolved: 23/Feb/10

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 1.3.3

Type: Improvement Priority: Major - P3
Reporter: Eliot Horowitz (Inactive) Assignee: Aaron Staple
Resolution: Done Votes: 11
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-251 no way to negate regex (WAS: doesn't ... Closed
Participants:

 Comments   
Comment by auto [ 23/Feb/10 ]

Author:

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

Message: SERVER-252 can't use key match with $not
http://github.com/mongodb/mongo/commit/57038c59781b737f9b1d89352f316e364f8840ca

Comment by Eliot Horowitz (Inactive) [ 23/Feb/10 ]

i think this is none are greater than

Comment by Aaron Staple [ 23/Feb/10 ]

What are the semantics supposed to be for multikeys?

If we have

{i:["a","b"]}

and my query is {i:{$not:{$gt:"a"}}} is it a match?

Comment by Aaron Staple [ 23/Feb/10 ]

I've implemented with all the "simple" btree limit optimizations - eg $not/$lt => $gte. I didn't implement any fancy optimizations, like for $not/$in or $not/$type - theoretically we could create bounds based on the complementary ranges for these query types, but not planning to do it unless necessary.

Comment by auto [ 23/Feb/10 ]

Author:

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

Message: SERVER-252 finishing $not operator
http://github.com/mongodb/mongo/commit/ce1293782f29197053098fb90094eac2a7a93627

Comment by auto [ 23/Feb/10 ]

Author:

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

Message: SERVER-252 checkpoint
http://github.com/mongodb/mongo/commit/cc74e804004d24a882b8c61baee7264b394813b3

Comment by auto [ 23/Feb/10 ]

Author:

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

Message: SERVER-252 checkpoint
http://github.com/mongodb/mongo/commit/3f1befcda1264f14498eea796dd39d57abd56d48

Comment by auto [ 23/Feb/10 ]

Author:

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

Message: SERVER-252 $not checkpoint
http://github.com/mongodb/mongo/commit/a1254dbc2cc2cdc1a43d063266e3091298bd4ab9

Comment by auto [ 23/Feb/10 ]

Author:

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

Message: SERVER-252 $not checkpoint
http://github.com/mongodb/mongo/commit/0ce8996a44e19c0380e66335e6b6c32a229f3bba

Comment by Eliot Horowitz (Inactive) [ 22/Feb/10 ]

i think $not can only be applied to another $ operator
i think thats the cleanest solution for now

Comment by Aaron Staple [ 22/Feb/10 ]

Can $not act as a substitute for $ne, or can $not only be applied to another $ operator?

Generated at Thu Feb 08 02:53:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.