lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morten Lied Johansen <>
Subject Stats per group with StatsComponent?
Date Wed, 30 Nov 2011 13:25:15 GMT


I posted the below mail to the solr-user list a little over a week ago. 
Since there has been no response, we assume this means that what we need 
is not currently possible.

We need this functionality, and are willing to put in time and effort to 
implement it, but could use some pointers to where it would be natural 
to add this, and ideas for how to best solve it.

I'm also wondering if I should create an issue in JIRA right away, or if 
I should wait until we have a first patch ready?

-------- Original Message --------
Subject: Stats per group with StatsComponent?
Date: Tue, 22 Nov 2011 14:40:45 +0100
From: Morten Lied Johansen <>


We need to get minimum and maximum values for a field, within a group in
a grouped search-result. Is this possible today, perhaps by using
StatsComponent some way?

I'll flesh out the example a little, to make the question clearer.

We have a number of documents, indexed with a price, date and a hotel.
For each hotel, there are a number of documents, each representing a
price/date combination. We then group our search result on hotel.

We want to show the minimum and maximum price for each hotel.

A little googling leads us to look at StatsComponent, as what it does
would be what we need, if it could be done for each group. There was a
thread on this list in August, "Grouping and performing statistics per
group" that seemed to go into this a bit, but didn't find a solution.

Is this possible in Solr 3.4, either with StatsComponent, or some other way?

We all live in a yellow subroutine.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message