Lucene as data store(Lucene 作为数据存储)
问题描述
是否可以使用 Lucene 作为成熟的数据存储(像其他(mongo,couch)nosql 变体).
Is it possible to use Lucene as full fledged data store (like other(mongo,couch) nosql variants).
我知道有一些限制,例如一个索引器新更新的文档不会显示在其他索引器中.所以我们需要重启索引器来获取更新.
I know there are some limitations like newly updated documents by one indexer will not be shown in other indexer. So we need to restart the indexer to get the updates.
但我最近偶然发现了 solr,似乎通过某种快照复制可以避免这些问题.
But i stumble upon solr lately, it seems these problems are avoided by some kind of snapshot replication.
所以我认为我可以使用 lucene 作为数据存储,因为这也使用 mongo 和 couch 内部使用的相同类型的文档(基于 JSON)来管理文档,并且其经过验证的索引算法可以超快速地获取记录.
So i thought i could use lucene as a data store since this also uses same kind of documents(JSON based) used by mongo and couch internally to manage documents, and its proven indexing algorithm fetches the records super fast.
但我很好奇以前有人试过吗..?如果不是,那么不选择这种方法的原因是什么.
But i am curious has anybody tried that before..? if not what are reasons not choosing this approach.
推荐答案
还有持久性的问题.虽然 Lucene 索引不应该被破坏,但我已经看到它发生了.Lucene 修复损坏索引的方法是将其丢弃并从原始数据重建".这对于索引工具来说非常有意义.但它确实需要您将数据存储在其他地方.
There is also the problem of durability. While a Lucene index should not get corrupted ever, I've seen it happen. And the approach Lucene takes to repairing a broken index is "throw it away and rebuild from the original data". Which makes perfect sense for an indexing tool. But it does require you to have the data stored somewhere else.
这篇关于Lucene 作为数据存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Lucene 作为数据存储
基础教程推荐
- 如何使用 Java 创建 X509 证书? 2022-01-01
- Java:带有char数组的println给出乱码 2022-01-01
- Java Keytool 导入证书后出错,"keytool error: java.io.FileNotFoundException &拒绝访问" 2022-01-01
- 设置 bean 时出现 Nullpointerexception 2022-01-01
- 无法使用修饰符“public final"访问 java.util.Ha 2022-01-01
- 在 Libgdx 中处理屏幕的正确方法 2022-01-01
- “未找到匹配项"使用 matcher 的 group 方法时 2022-01-01
- FirebaseListAdapter 不推送聊天应用程序的单个项目 - Firebase-Ui 3.1 2022-01-01
- 减少 JVM 暂停时间 >1 秒使用 UseConcMarkSweepGC 2022-01-01
- 降序排序:Java Map 2022-01-01