I'll give an example of data. (purely for demonstration, I don't know much about car)
Top category,
Car, Computer, Shoes, ..
Car has many facets.(sub category)
Car - 2 door/4 door
Car - Audi/Bmw/..
Sub category can have another sub category.
Audi - A series/S series/R series
Now, product can have multiple parents.
Audi A4 -child of- A series - Audi - Car
Audi A4 -child of- 4 door - Car (one shorter depth)
How would I model this in DB?
I've looked at a few RDBMS-only approaches for searching capability, and it looks awful to maintain.
I'm looking at django-haystack, solr approach.
But still I need to model this in django's models.py.
How would I do this and make a search index for haystack?
I'm new to whole django/haystack/solr.
I looked at solr's example document.
It looks like each item has all the necessary data in it.(I guess people call it flattened-data?)
Can I somehow separate meta-data(category trees) from data(actual product item) in DB?
I just feel that's the right approach, am I wrong?
- EDIT
I forgot to mention that I'd like to use solr's faceted search capability.
So after modeling it in DB, how would my search_indexes.py look like for haystack?