I'm trying to denormalize a tree-like structure into solr.
I mean, into my relational database I've this:
+------------+
| |
+--------------+ +--------v--------+ |
| | | | |
| Employee +-----------> | Department +---+
| | | |
+--------------+ +-----------------+
Any department can have any subdepartment.
Are there any tips or tricks in order to denormalize this kind of relationships into solr?
I bit more of details.
Currently, I've created an index storing all denormalized employees.
Something like:
employee_id, employee_name, department_id, depatment_name
However, I need to make searches like:
Department (210)
Deparment1 (100)
Department-1.2 (50)
Department-1.3 (50)
Department2 (110)
Department-2.2 (40)
Department-2.3 (70)
The problem using my approach employees only have the current department, department tree associated is not available...
Any ideas about how to get it?
I hope I've explained so well...