As I explained in my post a few days before I’m programming an ASP MVC3 multi-language website which should contain facetted search, full text search and a distance search. To realize that I’ve installed solr 3.3 on a Tomcat 7. I’m also successfully integrated a dataimporthandler.
Now I want to index the data from my relational ms sql database. I read the index structure looks like one table containing all the data of one object. That means if I’ve got a object like a car my schema catains fields like Branding, Color and so on.
- But what about n-m realtions? Does the index “table” have one column for each relation?
- And what about multi language items? Should I create one object/row int the index for each language?
- And should I save just the id of objects in the index or the whole names?
- And last how to index (query) a Object like on the database image? (I read something about dynamic fields and multiplevalue fields but I’m not sure if it is the solution for my problem)
I’ve a example of a database design I’m talking about attached.
Thanks for all the answers!!!

Update:
The people should be able to have different way to search.
They should have the possibility to search the tbl_text_local.text by full text searching and the miscellaneous are are facettes.
The Result should be a list of objects that match to the search and a list of facetts.
But how should I index the Miscellaneous? Is there a posibility to index them in a form like that:
<cattegory name = "cat1">
<Miscellaneous>
name...
</Miscellaneous>
<Miscellaneous>
...
</Miscellaneous>
<Miscellaneous>
...
</Miscellaneous>
</cattegory>
<cattegory name = "cat2">
<Miscellaneous>
</Miscellaneous>
<Miscellaneous>
</Miscellaneous>
<Miscellaneous>
</Miscellaneous>
</cattegory>
People should have a searchfield like:
Text input (to search the text)
Facettes:
Miscellaneous-Cattegory1
- Miscellaneous1 (9)
- Miscellaneous2 (39)
- Miscellaneous3 (49)
Miscellaneous-Cattegory2
- Miscellaneous5 (59)
- Miscellaneous6 (69)
Miscellaneous-Cattegory3
- Miscellaneous7 (7)
- Miscellaneous8 (8)
Miscellaneous-Cattegory4
- Miscellaneous9 (19)
There is no single, “best” way to model relationships in Solr. Unlike relational databases, where you design tables by following normalization, in Solr the schema design is very much ad-hoc, a function of the searches you will perform on the index. Ask yourself these questions as guidance:
Finally, don’t be afraid of duplicating data in the index for specific search purposes.