paultman
paultman

Reputation: 435

Sync views between pouchdb and couchdb

I've been able to sync data from my cloudant instance to my nodejs based pouchdb, however I need to setup a secondary search index and therefore I created a view on the couchdb instance however I am unable to see it in my synced pouchdb instance.

I see it in cloudant, in all documents, however after syncing and calling alldocs on pouchdb, it's not there. Also, i'm using the pouchdb-find plugin and I can't reference the secondary index search fields. Of course from pouchdb if if set the secondary index, it works fine.

Am I missing something? Does sync not replicate design docs in PouchDB? If not, what's the best way to create a persistent secondary index?

Any good docs for this? (Nolan....?) Speaking of docs, or support, is there an IRC room or some other live support for couchdb from the user community?

Thanks for your attention, Paul

Upvotes: 1

Views: 1517

Answers (2)

Danielo515
Danielo515

Reputation: 7181

Maybe this is stupid but, does the user that access couch has the admin role? Only admins can see and edit design documents.

Upvotes: 1

nlawson
nlawson

Reputation: 11620

pouchdb-find is a reimplementation of Cloudant Query Language, not their search index (which is what I think you're talking about). It's also not done; I've only written about half of the operators. :) You may also want to try the pouchdb-quick-search plugin, which is for full-text search.

In general, the advice I usually give people is to not sync design documents at all – just replicate using a filter to avoid syncing design docs. Then you can create design documents that are optimized for whatever platform you happen to be on (PouchDB, CouchDB, Cloudant, the various PouchDB plugins, etc.).

And yeah, we are usually pretty responsive inside of the IRC channel and on the mailing list, but it's a small operation because we aren't sponsored by Cloudant or Couchbase or anybody. The core PouchDB team are all hobbyists. :)

Upvotes: 3

Related Questions