: What would be the easiest to achieve that?

The easiest way is to do the search 10 times, and use either a Filter or a
BooleanQuery with a mandatory companyId:XXX clause in each to restrict the
results.

Which appraoch you take depends on how many total companies might be used
over time, and wether individual companies are re-searched over and over
again so that caching the FIlter BitSet is advantages.


A more complicated way that could concievable be faster, is to use a
HItCollector, and a the FieldCache on your companyId field to record the
highest scoring doc for each companyId ... but that's a lot more work, and
if you are really only going to be dealing with 1-10 companies at a time,
issuing the search 10 teams really isn't that bad.


-Hoss


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

Reply via email to