Closed natew closed 7 years ago
Ahh figured this out,
DB.collection.pouch.addIndex
Also, I saw a post somewhere that auto-index adding was a thing. What are downsides of adding that?
Also generally docs on accessing pouch through collections would be 👍
Yes. The _adminPouch
is used internally and you have to touch myCollection.pouch
for the pouchdb-instance of a collection.
To add an index, you can set index: true
in the schema, see here or compound-indexes like here.
It looks like this is missing in the docs, I'm sorry for that.
TODO add index and compound-index to docs
Case
Making it a bit easier to figure out indexing with RxDB
Issue
Been trying to create an index and sort by that index for a while with no luck.
I've tried a variety of things like this:
And then querying that collection using:
With no luck so far, doing everything client side in the browser.