I am really having a problem...
I would like to make a level search. In my model i have a book that has several expressions, and each of these expresions has several manifestations.
Book
-> List expresion
-> List Manifestation
Book, Expresion and Manifestation extends from Entity. Book has a list of Expresion. Expresion has a List of Manifestation.
How could i search on parent class Entity in Lucene and have the next results:
1.- if the result if a book, i want all expresions and all manifestations.
2.- if the result if a expresion, i want all manifestations
3.- if the result if a manifestation, i just want this manifestation.
I know that maybe this is crazy, but my boss ask me to do that...
Thanks in advance,
Hibernator,
PD: i have been thinking about indexing the Expression and Manifestation list (@IndexEmbbeded) but i don't know how to obtain all childs. Maybe I am wrong, and i just have to manage manually all the results...any idea? I just saw projection
http://docs.jboss.org/hibernate/search/4.1/reference/en-US/html_single/#projections