简体   繁体   English

在pouchdb和couchdb之间同步视图

[英]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. 我已经能够将数据从我的cloudant实例同步到基于nodejs的pouchdb,但是我需要设置一个辅助搜索索引,因此我在ouchdb实例上创建了一个视图,但是在同步的pouchdb实例中看不到它。

I see it in cloudant, in all documents, however after syncing and calling alldocs on pouchdb, it's not there. 我在cloudant中的所有文档中都看到了它,但是在pouchdb上同步并调用alldocs之后,它不存在了。 Also, i'm using the pouchdb-find plugin and I can't reference the secondary index search fields. 另外,我使用的是pouchdb-find插件,无法引用二级索引搜索字段。 Of course from pouchdb if if set the secondary index, it works fine. 当然,如果设置了二级索引,则来自pouchdb,它可以正常工作。

Am I missing something? 我想念什么吗? Does sync not replicate design docs in PouchDB? 同步功能是否不会在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? (Nolan ....?)说到文档或支持,用户社区是否有IRC聊天室或其他对ouchdb的实时支持?

Thanks for your attention, Paul 谢谢您的关注,保罗

pouchdb-find is a reimplementation of Cloudant Query Language, not their search index (which is what I think you're talking about). pouchdb-find是Cloudant查询语言的重新实现,而不是它们的搜索索引(这是我认为您在说的)。 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. :)您可能还想尝试pouchdb-quick-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.). 然后,您可以创建针对您所使用的平台(PouchDB,CouchDB,Cloudant,各种PouchDB插件等)进行了优化的设计文档。

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. 是的,在IRC频道内和邮件列表中,我们通常都反应灵敏,但这是一个很小的操作,因为我们不是由Cloudant或Couchbase或任何人赞助的。 The core PouchDB team are all hobbyists. PouchDB的核心团队都是爱好者。 :) :)

Maybe this is stupid but, does the user that access couch has the admin role? 也许这很愚蠢,但是,访问沙发的用户是否具有管理员角色? Only admins can see and edit design documents. 仅管理员可以查看和编辑设计文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM