hardy.ferentschik wrote:
Hi,
what exactly do you want to achieve? Once the search is executed there is no way to change which documents/entities get loaded. What's about using a Filter?
FYI, the TopDocs are getting calculated in the org.hibernate.search.query.engine.impl.QueryHits. To do what you want we would need to make it possible for users to plug in a custom TopDocs collector. Would that help you?
--Hardy
Hi Hardy,
Is there any plan to support pluggable custom collector in Hibernate Search? Is there a plan to support lucene grouping in Hibernate Search? I have a use case which would be a lot easier to handle if Hibernate Search supports grouping.
Scenario:
I have a relational database which holds my products info. However, for each product, there are more than one version available. When user search my database, I want to:
1) for each product, the total hit count only counts on regardless how many version it has -- the hit count is the # of top groups;
2) display only one version for each product;
3) display how many versions are available for each product;
2) apply additional algorithm select a version for each product (among all different versions). The algorithm could be user's preset preferences (such as color, size), the creation of each version, etc.
Could you advise a practical solution with the current hibernate search? thanks a lot.