Java – questions about Solr documents, etc

Website: classified advertising website (users can put advertisements, search advertisements, etc.)

I plan to use Solr to search, then return the results as ID NR: s, then use those ID NR: s and query mysql, and finally display the results with these IDS: s

At present, I have about 30 tables in mysql, one for each category

1 - do you think I should take a different approach from the above?

2 - should I use only one Solr document or multiple documents? In addition, is the document the same as the Solr index?

3 - use only Solr and skip mysql. Would it be better to know that there are many columns in each table? Personally, I am better at using MySQL than using Solr

4 - suppose the user wants to search for cars in a specific area, how to execute / complete such queries in Solr? For example: q = car and Region = is Washington possible?

You may think there is a lot of information about Solr, but no, especially not using PHP and Solr and Solr PHP client... Maybe I will write something after I learn this... Or maybe one of you can write something!

Thank you again for all your help

Solution

First, the definition: Solr / Lucene documents are roughly equivalent to database rows The index is roughly the same as the database table

I suggest trying to store all classification related information in Solr Querying Solr and then the database is inefficient and probably unnecessary

The query in a specific region will be similar to q = cars region: Washington, assuming that you have a region field in Solr

Solr wiki has a lot of good information and pretty good basic tutorial Of course, this can always be improved, so if you find anything unclear, please let the Solr team know about it

I can't comment on the PHP client because I don't use PHP

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>