Re-index your data with a separate field for "domain name", then either
manually populate it or use an update processor to extract the domain name
and store it in the desired field. You can then group by that field.
The URL Classify update processor can do the trick.
Or maybe a custom script with the Stateless Script update processor.
My book has examples for URL Classify.
-- Jack Krupansky
-----Original Message-----
From: A Geek
Sent: Tuesday, July 02, 2013 1:47 PM
To: solr user
Subject: How to show just the parent domains from results in Solr
hi All, I've indexed documents in my Solr 4.0 index, with fields like URL,
page_content etc. Now when I run a search query, against the page_content I
get a lot of urls . And say, if I in total 15 URL domains, and under these
15 domains I've all the pages indexed in SOLR. Is there a way in which, I
can just get the parent URLs for search results instead of getting all the
urls.
For example, say searching for "abc" returns:
www.aa.com/11.html www.aa.com/12.htmlwww.aa.com/13.html
www.bb.com/15.htmlwww.bb.com/18.html
I want the results to be like this:www.aa.comwww.bb.com
Is there a way in SOLR, through which I can achieve this. I've tried
FieldCollapsing[ https://wiki.apache.org/solr/FieldCollapsing ] but either
its not the right solution or I'm not able to use it properly. Could someone
help me find the solution to the above problem. Thanks in advance.
Regards, KK