You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by rjain15 <rj...@gmail.com> on 2012/05/29 18:57:16 UTC

MongoDB and Solr

Hi

I am building web app/mobile app, where users can update information
frequently and there is a search function to quick search the information
using different types of searches. 

Most of the data is going to be posted in JSON Format and stored in JSON
format

I have a few questions on the architecture choices, I am relatively new to
Solr and MongoDB.  

1. Should I use MongoDB to store the JSON documents, or does Solr natively
store the documents in the data directory

2. Does Solr require a specific schema for the JSON document. 


Thanks
Rajesh



--
View this message in context: http://lucene.472066.n3.nabble.com/MongoDB-and-Solr-tp3986636.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: MongoDB and Solr

Posted by Walter Underwood <wu...@wunderwood.org>.
Solr does not natively store/index/search arbitrary JSON documents.

It accepts JSON in a specific format for document input.

wunder

On May 29, 2012, at 3:21 PM, rjain15 wrote:

> Hi Gora, 
> 
> I am working on a Mobile App, which is updating/accessing/searching data and
> I have created a simple prototype using Solr and the Update JSON / Get JSON
> functions of Solr. 
> 
> I came across some discussion on MongoDB and how it natively stores JSON
> data, and hence as I was looking at scalability of data storage/indexing, I
> was pausing to understand if I am on the right track of just using Solr or
> should I combine Solr with MongoDB as I am reading this blog post...
> 
> http://blog.knuthaugen.no/2010/04/cooking-with-mongodb-and-solr.html
> http://blog.knuthaugen.no/2010/04/cooking-with-mongodb-and-solr.html
> 
> Maybe this is an incorrect question, as you say -- MongoDB might be an
> entirely different beast. 
> 
> Apologies for a novice question. My point was, for Mobile / Consumer Web
> Apps -- what are the architectural considerations. I don't want it to be a
> overkill, hence if solr can natively store/index/search json documents, then
> that is the solution I can build on top of. 
> 
> 
> Thanks
> Rajesh
> 





Re: MongoDB and Solr

Posted by Gora Mohanty <go...@mimirtech.com>.
On 30 May 2012 03:51, rjain15 <rj...@gmail.com> wrote:
> Hi Gora,
>
> I am working on a Mobile App, which is updating/accessing/searching data and
> I have created a simple prototype using Solr and the Update JSON / Get JSON
> functions of Solr.
>
> I came across some discussion on MongoDB and how it natively stores JSON
> data, and hence as I was looking at scalability of data storage/indexing, I
> was pausing to understand if I am on the right track of just using Solr or
> should I combine Solr with MongoDB as I am reading this blog post...
[...]

A discussion on web architecture is off-topic for
this list, and will also probably draw in people with
strong opinions. Here is a brief personal opinion,
but you are probably better off trying out a couple
of different architectural prototypes, and/or talking
to someone with experience in scalable sites.

First of all, you should consider whether you really
need a NoSQL store. This would depend on the
scale, and requirements of your app. IMHO, RDBMSes
now are proven systems with many years of learning
behind them. Thus, your question should be why
NoSQL, rather than the other way around.

Solr for search should do fine, and you already
know how to get JSON in and out of it. Incidentally,
we also tested out Solr as a NoSQL store (raw data,
and not JSON, though), and were quite happy with
the performance.

Regards,
Gora

Re: MongoDB and Solr

Posted by rjain15 <rj...@gmail.com>.
Hi Gora, 

I am working on a Mobile App, which is updating/accessing/searching data and
I have created a simple prototype using Solr and the Update JSON / Get JSON
functions of Solr. 

I came across some discussion on MongoDB and how it natively stores JSON
data, and hence as I was looking at scalability of data storage/indexing, I
was pausing to understand if I am on the right track of just using Solr or
should I combine Solr with MongoDB as I am reading this blog post...

http://blog.knuthaugen.no/2010/04/cooking-with-mongodb-and-solr.html
http://blog.knuthaugen.no/2010/04/cooking-with-mongodb-and-solr.html

Maybe this is an incorrect question, as you say -- MongoDB might be an
entirely different beast. 

Apologies for a novice question. My point was, for Mobile / Consumer Web
Apps -- what are the architectural considerations. I don't want it to be a
overkill, hence if solr can natively store/index/search json documents, then
that is the solution I can build on top of. 


Thanks
Rajesh



--
View this message in context: http://lucene.472066.n3.nabble.com/MongoDB-and-Solr-tp3986636p3986729.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: MongoDB and Solr

Posted by Gora Mohanty <go...@mimirtech.com>.
On 29 May 2012 22:27, rjain15 <rj...@gmail.com> wrote:
> Hi
>
> I am building web app/mobile app, where users can update information
> frequently and there is a search function to quick search the information
> using different types of searches.
>
> Most of the data is going to be posted in JSON Format and stored in JSON
> format
>
> I have a few questions on the architecture choices, I am relatively new to
> Solr and MongoDB.
>
> 1. Should I use MongoDB to store the JSON documents, or does Solr natively
> store the documents in the data directory

Sorry, but you do not provide nearly enough information
for people to be able to make sensible suggestions. What
is your use case? MongoDB is largely a different beast from
Solr. What do you think merits its use, and where does it
fit in your scheme of things? In many cases, one could have
both MongoDB, and Solr. In other cases, one or the other
might better fit the bill.

> 2. Does Solr require a specific schema for the JSON document.

You can POST a JSON document to Solr, and get
JSON output back. Not sure if this meets your needs,
but please take a look at:
http://wiki.apache.org/solr/UpdateJSON
http://wiki.apache.org/solr/SolJSON

Regards,
Gora