使 CouchDB 更具可搜索性和实时性
我在弄清楚如何在我的场景中最好地使用 CouchDB 时遇到问题(或者找到另一个更合适的解决方案)。这是对所需内容的概述,我希望我能更好地了解我需要什么:
- 该系统几乎完全基于关键字。
- 每个文档都有一组关键字。
- 我需要能够根据关键字搜索并返回文档。
- 我还需要能够根据增量 ID 号搜索并返回文档 (例如,自文档 ID:1318814 起,所有带有关键字“test OR more”的文档)
- 这一切都需要能够处理数十万个文档,实时更新 关键字,并且最好没有太大的滞后(例如,CouchDB 视图生成,因此能够将其输出到动态生成的查询的输入最多只需要几秒钟)。
在 CouchDB 中可以做到这一点吗? CouchDB 是否有任何好的扩展可以让我做到这一点?
编辑:我使用 PHP 连接到数据库,并使用 Java 将信息输入数据库。
I am having problems figuring out how to use CouchDB best in my scenario (or find another solution which is more suitable). This is an overview of what is needed and I hope I can gain better insight into what I need:
- The system is based almost entirely on keywords.
- Each document has an array of keywords.
- I need to be able to search and return the documents based on keywords.
- I also need to be able to search and return documents based on an incremental ID number
(eg, all docs with keywords "test OR more" since document id:1318814) - It all needs to be able to handle hundreds of thousands of documents, realtime updates to
keywords and would preferably have not much lag (eg, CouchDB view generation so input to being able to output it to a dynamically generated query would only take a few seconds at most).
Would this be possible to do in CouchDB? Are there any good extensions to CouchDB which would allow me to do this?
Edit: I'm using PHP to connect to the database and Java to feed info into the database.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这就是我编写 CouchDB-Lucene 的原因。
https://github.com/rnewson/couchdb-lucene
This is why I wrote CouchDB-Lucene.
https://github.com/rnewson/couchdb-lucene