Hi, I want to use HSearch in advanced search in my app. I have a problem with many associated entities: I have entity apartment, which contains some attributes and some associations. Searching with apartment's attribute is easy but I don't know how I should search against associated objects.
apartment{ OneToMany Rooms OneToMany Equipment OneToMany Properties OneToMany Reservations and some other. }
And my problem is: I want to search apartments, which desriptions/name/city/region contains some text, and they have some rooms, and some equipments, and some properites and apartment is free with given date or range of dates (reservations)
And I should make index with all data, or make index from basic attributes (name,description), search with given attributes, get result (apartment id) and make another hibernate query for associated objects with IN clausule?
Apartment and its associated objects will change rarely, except reservations.
|