Re: Getting Matches in a document

2021-09-08 Thread Arihant Samar
Hi, Sorry, for a little late response from but actually, this doubt was in response to the Highlighting Matching in the monitor module of Lucene. Essentially the matcher is calling the *matches* function for each document in the index corresponding to a selected query and hence I assume it will go

Re: Getting Matches in a document

2021-07-15 Thread Alan Woodward
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

Getting Matches in a document

2021-07-14 Thread Arihant Samar
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.