tonysun83 commented on issue #866: Fix incorrect index selection when sort 
specified
URL: https://github.com/apache/couchdb/pull/866#issuecomment-334776797
 
 
   @willholley : I considered appending ```{"$exists":true}``` for backwards 
compatibility. We've done it in the past when we appended ```{"$gt": null}``` 
to do the _all_docs trick for users. If we do this though, users would not see 
an error message, but they could still be getting incorrect results back as 
we're forcing the predicate fields to exist.  I.e
   
   Index: [a, b, c]
   Query: ```{"c": "foo"}```
   Sort:[a, b]
   New modified becomes: ```{"c": "foo", {"a":{"$exists": true}}, 
{"b":{"$exists": true}}}```
   
   It's a tradeoff: let their apps continue to run with possible incorrect data 
or let it break and force them to possibly re-index and re-write their app. I'd 
like more opinions @garrensmith @davisp ?
 
----------------------------------------------------------------
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