[
https://issues.apache.org/jira/browse/COUCHDB-3013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15843634#comment-15843634
]
Paul Joseph Davis commented on COUCHDB-3013:
--------------------------------------------
Those queries aren't the same. The $and query is actually expanding to:
{code}
{"$and": [{"$eq": {}}, {"$eq": {}}]}
{code}
The _explain HTTP endpoint is useful for understanding how Mango is
interpreting your selector in these sorts of situations.
> Empty selector and empty $and selector not returning same results
> -----------------------------------------------------------------
>
> Key: COUCHDB-3013
> URL: https://issues.apache.org/jira/browse/COUCHDB-3013
> Project: CouchDB
> Issue Type: Bug
> Components: Mango
> Reporter: Garren Smith
>
> If I do `selector: {}` I get all the docs returned.
> But if I do `selector: {$and: [{}, {}]}` I get 0 docs returned.
> I think these queries are the same and should return all docs.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)