Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is MongoDB a valid alternative to relational db + lucene? [closed]

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?

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.

like image 794
Hugo Avatar asked Mar 30 '10 15:03

Hugo


People also ask

Does MongoDB use Lucene?

Amazon and MongoDB both use Lucene every day, and the most important use case is no doubt application search, in which the engine is primarily used by humans.

Can MongoDB be used for relational database?

MongoDB is a NoSQL solution so doesn't require a relational database management system or RDBMS. However, there might be times when you want to integrate MongoDB with a relational database. For example, if you want to generate data visualizations about information from two disparate sources.

What is the alternative of MongoDB?

Some of the best MongoDB alternatives for 2022 include Redis, Apache Cassandra, RethinkDB, DynamoDB, OrientDB, CouchDB, and ArangoDB.

What is MongoDB equivalent to a row in relational databases a document?

MongoDB Documents are equivalent to the RDBMS Rows. MongoDB Fields are equivalent to the RDBMS Columns.


1 Answers

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.

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.

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.

like image 94
Michael Avatar answered Oct 02 '22 19:10

Michael