Faceted searching and categories in MySQL and Solr

2020-07-26 22:41发布

问题:

I'd like to be able to do a search page similar to ebay or newegg where you can select categories and different facets depending on the categories - could anybody point me in the right direction?

How do I store and search such facets and categories with the products in Solr and what sort of DB schema would I be looking at with MySQL. (I'm guessing I'd use MySQL to feed Solr, yes?)

Please excuse my lack of knowledge on these subjects - I'm pretty new to all of this.

I'd greatly appreciate the help. Thanks in advance.

回答1:

Faceting through a category tree is not straightforward with Solr, but it's possible. Read this question + answer.

For the mysql things you will have to have a category table with id, name and parent_id which links to the parent category (and is e.g. null if root node)