Hi Prateek, I think you are talking about two different animals. Solr(actually embedded lucene) is actually a search engine where you can use different features like faceting, highlighting etc but it is a document store where for each text it does create an Inverted index and map that to documents. Mongodb is also document store but I think it adds basic search capability. This is my understanding. We are using mongo for temporary storage and I think it is good for that where you want to store a key value document in a collection without any static schema. In Solr you need to define your schema. In solr you can define dynamic fields too. This is all my understanding.
- Rohit On Wed, Nov 23, 2016 at 10:27 AM, Prateek Jain J < prateek.j.j...@ericsson.com> wrote: > > Hi All, > > I have started to use mongodb and solr recently. Please feel free to > correct me where my understanding is not upto the mark: > > > 1. Solr is indexing engine but it stores both data and indexes in > same directory. Although we can select fields to store/persist in solr via > schema.xml. But in nutshell, it's not possible to distinguish between data > and indexes like, I can't remove all indexes and still have persisted data > with SOLR. > > 2. Solr indexing capabilities are far better than any other nosql db > like mongodb etc. like faceting, weighted search. > > 3. Both support scalability via sharding. > > 4. We can have architecture where data is stored in separate db like > mongodb or mysql. SOLR can connect with db and index data (in SOLR). > > I tried googling for question "solr vs mongodb" and there are various > threads on sites like stackoverflow. But I still can't understand why would > anyone go for mongodb and when for SOLR (except for features like faceting, > may be CAP theorem). Are there any specific use-cases for choosing NoSQL > databases like mongoDB over SOLR? > > > Regards, > Prateek Jain > >