-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Grouping of search results
PostPosted: Sat Jun 26, 2010 5:04 pm 
Newbie

Joined: Sat Jun 26, 2010 4:52 pm
Posts: 2
Solr has a feature called Field Collapsing which allows grouping of search results. Is there a similar feature available with Hibernate Search?

For example, I have a Product which has an embedded Category. I want to be able to search on product.name and group my results by product.category.id with a limit on the number of results in each category - I may have 50 results overall when searching for "dog" with results spread over 3 categories, but for each category, I only want to return the first 5 results.


Top
 Profile  
 
 Post subject: Re: Grouping of search results
PostPosted: Mon Jun 28, 2010 5:27 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hi,

I assume you are referring to faceted search when talking about grouping. Currently Hibernate Search does not have anything like this built-in, even though we have been talking about it. It should not be hard so to implement something on your own though. Maybe this Lucene Jira issue LUCENE-1421 is helpful. Using a custom Collector seems to be promising.

--Hardy


Top
 Profile  
 
 Post subject: Re: Grouping of search results
PostPosted: Mon Jun 28, 2010 6:56 am 
Newbie

Joined: Sat Jun 26, 2010 4:52 pm
Posts: 2
Its not faceting that I am referring to. Field Collapsing is described on the solr wiki.


Top
 Profile  
 
 Post subject: Re: Grouping of search results
PostPosted: Wed Jun 30, 2010 12:35 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi Dave,
I've seen the implementation of Field Collapsing some while ago, so although it might have changed, it's a post-processor on the results retrived by Lucene; you can easily implement the same iterating on the results when using Hibernate Search as the index is not a remote service, just make sure you use projections to avoid fetching the whole database in memory. Solr needs this as a remote component to keep the resulting XML/Json/.. as short as possible, but in our case such a feature is hardly needed.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.