Lucene +加入== RDBMS?


2

現在Lucene支持聯接(在建立索引時和在查詢時)可以將Lucene用作數據庫(NoSQL,具有最終一致性)嗎?

注意:我曾考慮過一段時間,這是一個不時出現的想法,有證據表明on在某種程度上確實可以做到這一點(RavenDB)。此外,我認為參照完整性被高估了-當我與一個小型團隊一起處理一個快速變化的大型項目時,我從不在RDBMS中使用外鍵;從經驗來看,這純粹是維護頭痛,並會降低生產率。

在我看來,樹立這種思維方式的唯一障礙是缺乏交易-是的;您可以進行兩步交易(比如說MongoDB和Lucene在內部進行交易),但是工作量很大。我不知道使用Lucene怎麼可能。

3

Yes. I've done projects in the past where we essentially used lucene as a data store in lieu of a database. This was long before NoSQL was hot. Really there's no fixed definition of what qualifies as a NoSQL database, so anything that stores and retrieves data is sufficient. Things like dbm files have been around forever.


3

The main downside I see is updates. The only way to do an update in the Lucene ecosystem was to read the whole document, modify it, delete the original, and write back the contents as a new document. Some syntactic sugar has been added to Solr to make this easier. Lucene itself doesn't support per-field updates, though some stacked update feature appears to be being worked on.

Otherwise, for read-only data, you won't get a better general purposes way of slicing/dicing/analyzing data. We've done a lot of work for clients where they use Lucene (through Solr) just for the fact that every column is indexed, and its easy to lookup/filter/group/facet on anything. That's why tools like kibana (built on ElasticSearch, another service built on top of Lucene) are so powerful even though they have relatively little to do with fulltext search.