See Solr's faceting capabilities. http://lucene.apache.org/solr and
the wiki from there. Faceting is built right in.
On Dec 16, 2008, at 3:53 PM, RobertV wrote:
>
> Does anyone know how to retrieve aggregated results from lucene? Is is
> possible to do something similar to this SQL statement below, which
> returns
> the numbers of books for each author for books published in 2007-2008?
>
> select count(*), author_name
> from book
> where published_date >= '2007-01-01'
> and published_date <= '2008-12-31'
> group by author_name
>
> Note: I do NOT want to loop through every document to get these
> totals.
> Also note the "group by" and I am using two fields (author_name and
> published_date) so a simple TermEnum does not cut it.
>
> Thanks.
> --
> View this message in context: http://www.nabble.com/aggregation-in-lucene-tp21041575p21041575.html
> Sent from the Lucene - General mailing list archive at Nabble.com.
>
--------------------------
Grant Ingersoll
Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ
|