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.
相关文章