lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Löfquist <daniel.lofqu...@it.cdon.com>
Subject Group by field in Solr
Date Thu, 20 Aug 2009 12:40:23 GMT
Hello,

I'm trying to accomplish something akin to "GROUP BY" in SQL but in Solr.
I have an index full of songs (one song per document in Solr) by various artists and I
would like to construct a search that gives me all of the artists back, one row per
artist. The current search returns one row per artist and song.

So I get this right now if I search after "war" in the artist-field:

30 Years War - Ideal Means
30 Years War - Dirty Castle
30 Years War - Misinformed
All Out War - Soaked In Torment
All Out War - Claim Your Innocence
Audio War - Negativity
Audio War - One Drug
Audio War - Super Freak

But this is what I'd really like:

30 Years War - whatever song
All Out War - whatever song
Audio War - whatever song

I tried using facets but couldn't get it to work properly. Anybody have a clue how to do
something like this?

//Daniel

Mime
View raw message