MongoDB是关系型db + lucene的有效替代品吗? [英] Is MongoDB a valid alternative to relational db + lucene?

查看:179
本文介绍了MongoDB是关系型db + lucene的有效替代品吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一个新项目中,我需要努力使用lucene来实现搜索器。这个搜索者将是该项目的一个非常重要(和大)的部分。使用 MongoDb 替换Relational Database + Lucene是否有效或方便?

On a new project I need a hard use of lucene for a searcher implementation. This searcher will be a very important (and big) piece of the project. Is valid or convenient replacing Relational Database + Lucene with MongoDb?

编辑:好的,我会澄清:我不是在询问风险,我可以在这个项目中支付这个价格。我的观点是:MongoDB是否面向这种事情?我可以创建一个完整的搜索引擎,具有与Lucene相同的性能吗?一位朋友指出MongoDB是另一种选择,但我不知道Lucene性能是否带有文档备选(然后,我也会在MongoDB中看到它),或者,另一方面,反向索引和优化是完全的独立于文档方向。

edit: Ok, I will clarify: I'm not asking about risk, I can pay that price in this project. My point is: Is MongoDB oriented to this kind of thing? Can I make a full search engine with the same perfomance as I can get on Lucene?. A friend point me out MongoDB as alternative, but I don't see if the Lucene performance comes with the document alternative (and then, I will see it in MongoDB too), or, in other hand, the inverted index and optimitizations are complety independant of document orientation.

推荐答案

从技术上讲,你可以使用MongoDB进行全文搜索,但是你错过了很多全文搜索提供商必须提供。我喜欢MongoDB,但如果时间紧迫,我会将它与全文搜索提供商(如Lucene或Sphinx)结合起来。我认为MongoDB便于索引单词数组的能力最好留给基于标记而不是全文搜索的标记和搜索。

Technically you can do full text search with MongoDB, but you're missing out on a lot that a full text search provider has to offer. I love MongoDB, but I'd couple it with a full text search provider (such as Lucene or Sphinx) if time to implementation is at all a concern. I think MongoDB's convenient ability to index word arrays is better left to tagging and searching based on tagging than full text search.

搜索(信息检索)不仅仅是抓取任何匹配的文件,如果你想让你的搜索结果具有任何相关性,你将需要TF-IDF,短语匹配(序列分数更高的单词)或任何其他IR技术提高搜索精度。如果你使用MongoDB,你需要从头开始实现它。

Search (Information Retrieval) isn't just about grabbing any documents that match, if you want your search results to have any relevance at all you're going to need something along the lines of TF-IDF, phrase matching (words in a sequence score higher) or any number of other IR techniques to improve search precision. If you use MongoDB you'll need to implement it all from scratch.

如果你真的想从头开始实现它而不是原始存储方面的麻烦,MongoDB非常接近你可以实现它的最好的数据库存储(不能想到其他许多人),但这仍然不是一个很好的选择。

If you really want to implement it all from scratch but not bother with the raw storage side of things, MongoDB is pretty close to the best DB store that you could implement it on top of (can't think of many others), but that still doesn't make it a great option.

这篇关于MongoDB是关系型db + lucene的有效替代品吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆