I’ m using Solr to index a dataset stored in DBMS using SQL DIH. One on the table use a n-to-n relationship. Just for sake of simplicity (my app is much more complex than this) here is an example of the application: a person has a name and it has associated 0..n roles (a role is described by a role_name string).
Table Person:
- id: int
- Name: string
Table roles
- id: int
- role_name: string
Table association
- id_person: int
- id_role: int
Two persons could be described as:
id=1, name=John Doe, roles=[programmer, father, soccer player]
id=2, name= Eric Smith, roles=[]
Here what I would like to achieve with solr.
- Import the data with DIH (may be using a nested sql query?)
- Query and present the data with all the person info + the person’s roles
- Be able to query using a given role, e.g. tell me all the person with role=programmer?
- Set up faceting, to create a list of all roles, each one with the number of occurrences in the whole datasets
I expect this to be possible with solr (I am using version 6.4, but I can easily upgrade to latest 6.5). Does anybody can explain how to do it or point to proper information/tutorial?
Thanks
UMG