lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prasenjit mukherjee <>
Subject access payload from HitCollector.collect()
Date Mon, 22 Mar 2010 12:56:31 GMT
I am trying to implement oracle's aggregation like SQL's  ( e.g.
SUM(col3) where col1='foo' and col2='bar' ) using lucene's payload

I can add the integer_value ( of col3 ) as a payload to my searchable
fields ( col1 and col2 ). I can probably extend the
DefaultSImilarity's scorePayload() to compute the aggregated value.
But was wondering if I can access the payload values from
HitColelctor.collect() as I really dont need to do any score
computation. I just want the sum of col3's values  for all matching

What is a good approach to achieve the above? The use case is slightly
different and more like RDBMS, but still ( methinks )  lucene seems to
the best tool available to do these kind of computation in a large


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

View raw message