You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "Garren Smith (JIRA)" <ji...@apache.org> on 2017/01/22 12:22:26 UTC
[jira] [Created] (COUCHDB-3275) $nin with the _all_docs selector
returns design docs
Garren Smith created COUCHDB-3275:
-------------------------------------
Summary: $nin with the _all_docs selector returns design docs
Key: COUCHDB-3275
URL: https://issues.apache.org/jira/browse/COUCHDB-3275
Project: CouchDB
Issue Type: Bug
Components: Mango
Reporter: Garren Smith
If I create docs like this:
```
{ name: 'James', _id: 'james', favorites: ['Mario', 'Pokemon'], age: 20 },
{ name: 'Mary', _id: 'mary', favorites: ['Pokemon'], age: 21 },
{ name: 'Link', _id: 'link', favorites: ['Zelda', 'Pokemon'], age: 22},
{ name: 'William', _id: 'william', favorites: ['Mario'], age: 23}
```
And I create an index like this:
```
{
"index": {
"fields": ["name"]
},
"name": "name-index",
"type": "json"
};
```
But then do a query like this:
```
selector: {
_id: {
$nin: ['james', 'mary']
}
},
```
I get the following results back:
```
[
{_id: '_design/37ca0de9e0e68521c0eca0239d9b29c5027ae7ea'},
{_id: 'link'},
{_id: 'william'},
]
```
Which is incorrect as we shouldn't have the _design doc in the results.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)