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 作为数据存储
- Eclipse 插件更新错误日志在哪里? 2022-01-01
- Safepoint+stats 日志,输出 JDK12 中没有 vmop 操作 2022-01-01
- 从 finally 块返回时 Java 的奇怪行为 2022-01-01
- Jersey REST 客户端:发布多部分数据 2022-01-01
- value & 是什么意思?0xff 在 Java 中做什么? 2022-01-01
- 将log4j 1.2配置转换为log4j 2配置 2022-01-01
- Java包名称中单词分隔符的约定是什么? 2022-01-01
- Spring Boot连接到使用仲裁器运行的MongoDB副本集 2022-01-01
- 如何使用WebFilter实现授权头检查 2022-01-01
- C++ 和 Java 进程之间的共享内存 2022-01-01