Thanks Jack!


Jeremy Branham
Software Engineer
http://LinkedIn.com/in/JeremyBranham
http://jeremybranham.wordpress.com/
http://Zeroth.biz


-----Original Message----- From: Jack Krupansky
Sent: Saturday, July 07, 2012 11:16 AM
To: solr-user@lucene.apache.org
Subject: Re: Grouping and Averages

You can always check the Lucene/Solr archives:

http://mail-archives.apache.org/mod_mbox/lucene-solr-user/

Your message is here:
http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201207.mbox/%3CBAY170-DS274C673A7C82D716E7E000BAED0%40phx.gbl%3E

It does not yet appear to have any responses.

-- Jack Krupansky

-----Original Message----- From: Jeremy Branham
Sent: Saturday, July 07, 2012 11:05 AM
To: solr-user@lucene.apache.org
Subject: Grouping and Averages

I’m sorry – I sent this email before I was confirmed in the group, so I don’t
know if anyone sent a reply =\

__________________________________________

Hello -
I’m not sure If this is an appropriate use for Solr, but I want to stay away
from a typical DB store for high availability reasons.

I am storing documents that may have a common value for a field we’ll call
“category”.
In another field there will be an integer field we’ll call “rating”.

I would like to group the documents on the “category” field and display the
average “rating” per group.

The stats component lets me get the avg rating, but when I collapse the
results into groups it gives me the average for the entire collection,
rather than for the specific group.

Am I going about this wrong?
Is it possible to get the desired outcome with a  single query?

I’d appreciate any insight!
Thank you,



Jeremy Branham
Software Engineer
http://LinkedIn.com/in/JeremyBranham
http://jeremybranham.wordpress.com/
http://Zeroth.biz

Reply via email to