Cannot sort on field(s) "name" when using the default index
Open
- Dominant language
- JavaScript
- Stars
- 17.6k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
It's impossible to find a sort because it claims that the defualt index is still active. Since I tried a lot of combinations (incl. only one property), I think this is a bug or a lack of docs.
```ts
await this.db.createIndex({
index: { fields: ['a', 'b'] }
});
const result = await this.db.find({
selector: { b: { $exists: false } },
sort: [{ a: 'desc' }]
});
```
> Cannot sort on field(s) "a" when using the default index
pouchdb: 9.0.0
pouchdb-find: 9.0.0
https://pouchdb.com/guides/mango-queries.html
Contributor guide
Assessment
This issue has not been assessed yet.