Do you really need to know which term/s caused a given hit for every single hit, or only for the top N hits?
If you must know this for every single hit, you should make your own Collector and use the Scorer.getChildren API to gather the sub-scorer for each term, and on collecting each hit, look at those children to see which ones matched the current hit. If it's only for the top N hits, it's more efficient to do a 2nd step with those hits where you test each term separately to see if they match it. Mike McCandless http://blog.mikemccandless.com On Wed, Aug 2, 2017 at 1:48 AM, Sarthak Sugandhi <[email protected] > wrote: > Hi Fellow Luceneers, > > I am trying to search multiple terms in an index at one go and I want to > differentiate search results for each term all in the same query. > > Could you suggest what is the class/method name. > > Thanks, > Sarthak >
