Hi Arihant,

Getting Matches is a fairly heavy operation and is designed to be used for 
top-k hits only, a bit like the explain API.  Collectors by contrast are 
supposed to be very lightweight - collect(doc) could get called millions of 
times during a search.  So the two APIs are not really meant to be used 
together.

Thanks, Alan

> On 15 Jul 2021, at 04:18, Arihant Samar <[email protected] 
> <mailto:[email protected]>> wrote:
> 
> Hi,
> Is there any way to get the matches of a document in the collect(int doc) 
> function of the collector, other than calling the matches function of the 
> Weight Class again?
> 
> Thanking you in advance,
> Arihant.

Reply via email to