Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to load a database with indexes ? #56

Open
larryaubstore opened this issue Feb 3, 2017 · 3 comments
Open

Is it possible to load a database with indexes ? #56

larryaubstore opened this issue Feb 3, 2017 · 3 comments

Comments

@larryaubstore
Copy link

larryaubstore commented Feb 3, 2017

Hi,

I don't know if it's possible but I have the following use case:

Offline mode on mobile:

Step 1. Load each database with https://github.com/nolanlawson/pouchdb-load
Step 2. Create indexes with https://github.com/nolanlawson/pouchdb-find with 'createIndex' method.

Is it possible to create indexes on the server side with CouchDB and load them with 'pouchdb-load' instead of creating them on the client side ?

I ask this question because it takes a lot a time to create indexes on the client side. Can we 'bundle' indexes in files generated with https://github.com/nolanlawson/pouchdb-dump-cli

Step 3 Online mode. Handoff to regular replication mode db.replicate.

@nolanlawson
Copy link
Member

Sorry, there is currently no way to precompute indexes. If you're writing a mobile app, you can precompute the SQLite database itself; instructions are here: https://pouchdb.com/2016/04/28/prebuilt-databases-with-pouchdb.html

@larryaubstore
Copy link
Author

Thank you ! It exactly what I need for my mobile app.

@bilalswiftsolutions
Copy link

Hi, seems like the article is gone, can you please share any other article?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants