: I want to implement search which in SQL equivalent looks like
: select itemId, min(price) from <table>
:     where <condition on otherFields>
:     groupBy itemId

: Is it possible to achieve?


Not easily.  The most straightforward approach I can think of is to write
your own HitCollector that builds up a Hash of itemId => price mappings
for each docId it sees with a positive score, and only overright existing
mappings if the price it sees is less then the previous price.

To make it efficient, you're going to want to make sure itemId and price
are both indexed fields, and use the FieldCache.



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to