lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From entdeveloper <>
Subject Grouping / Collapse Query
Date Wed, 13 Jul 2011 01:36:06 GMT
I'm messing around with the field collapsing in 4.x . Is it currently possible to
group by a field with a certain value only and leave all the others
ungrouped using the group.query param? This currently doesn't seem to work
the way I want it to.

For example, I have documents all with a "type" field. Possible values are:
picture, video, game, other. I want to only group the pictures, and leave
all other documents ungrouped.

If I query something like:

I ONLY get pictures back. Seems like this behaves more like an 'fq'

What I want is a result set that looks like this:

1. doc 1, type=video
2. doc 2, type=game
3. doc 3, type=picture, + 3 other pictures
4. doc 4, type=video
5. doc 5, type=video

I've also tried:

But this doesn't work because the order of the groups don't put together the
correct order of results that would be displayed.

View this message in context:
Sent from the Solr - User mailing list archive at

View raw message