tonysun83 commented on issue #1719: Don't use $not to validate use of index
URL: https://github.com/apache/couchdb/pull/1719#issuecomment-439443842
 
 
   @willholley @garrensmith :  
   I'm trying to wrap my head around NOT vs NE and if we're consistent with the 
results.
   
   The fix for `$not` makes sense to me.
   
   So `$ne` implies that the field exists. I think that's why @garrensmith's 
current test case with
   `"somefield": { "$ne": "somevalue"}}` uses an index.
   
   But what if we did:
   `"somefield": { "$ne": { "$elemMatch": {"$regex": "expression"}}}` ?
   
   This means the field should exist, and not equal to certain documents. It's 
just a bigger
   set than `"somefield": { "$ne": "somevalue"}}`
   
    However, IIRC, $regex is a combination operator and we need to use 
_all_docs. So do
   we choose an index or just _all_docs in this case? From the current code I 
think
   we choose an index right?
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to