You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lucenenet.apache.org by David Smith <da...@nzcity.co.nz> on 2007/04/02 23:54:19 UTC

Search result grouping

I have built an index of websites for a regional search site.  My next task
with the results is to group the results by site.  i.e. if a search for
'doctor' returned www.site1/services/medical.html the result I want would be
www.site1/ 

Does lucene do this?  Or are there any links, pointers to how I might go
about this?

I'm using Lucene.Net 2.0.0 downloaded from the repository about 1 month ago.

David Smith


RE: Search result grouping

Posted by George Aroush <ge...@aroush.net>.
Assuming I understood your requirement, I don't believe there is anything
Lucene has to offer out of the box to do this.

One solution is to store a field for each document you index which has the
top level of the URL stored as www.site1/  When you get your hit result
back, you have to filter out any hit which doesn't contain www.site1/

-- George Aroush

> -----Original Message-----
> From: David Smith [mailto:davids@nzcity.co.nz] 
> Sent: Monday, April 02, 2007 5:54 PM
> To: 'lucene-net-user@incubator.apache.org'
> Subject: Search result grouping
> 
> 
> I have built an index of websites for a regional search site. 
>  My next task with the results is to group the results by 
> site.  i.e. if a search for 'doctor' returned 
> www.site1/services/medical.html the result I want would be www.site1/ 
> 
> Does lucene do this?  Or are there any links, pointers to how 
> I might go about this?
> 
> I'm using Lucene.Net 2.0.0 downloaded from the repository 
> about 1 month ago.
> 
> David Smith
>