Anonymous12345 Anonymous12345 - 2 years ago 62
Java Question

Questions about SOLR documents and some more

Website: Classifieds website (users may put ads, search ads etc)

I plan to use SOLR for searching and then return results as ID nr:s only, and then use those ID nr:s and query mysql, and then lastly display the results with those ID:s.

Currently I have around 30 tables in MySQL, one for each category.

1- Do you think I should do it differently than above?

2- Should I use only one SOLR document, or multiple documents? Also, is document the same as a SOLR index?

3- Would it be better to Only use SOLR and skip MySQL knowing that I have alot of columns in each table? Personally I am much better at using MySQL than SOLR.

4- Say the user wants to search for cars in a specific region, how is this type of querying performed/done in SOLR? Ex:


You may think there is alot of info about SOLR out there, but there isn't, and especially not about using PHP with SOLR and a SOLR php client... Maybe I will write something when I have learned all this... Or maybe one of you could write something up!

Thanks again for all help...

Answer Source

First, the definitions: a Solr/Lucene document is roughly the equivalent of a database row. An index is roughly the same as a database table.

I recommend trying to store all the classified-related information in Solr. Querying Solr and then the database is inefficient and very likely unnecessary.

Querying in a specific region would be something like q=cars+region:washington assuming you have a region field in Solr.

The Solr wiki has tons of good information and a pretty good basic tutorial. Of course this can always be improved, so if you find anything that isn't clear please let the Solr team know about it.

I can't comment on the PHP client since I don't use PHP.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download