Follow-up, hoping someone will help.
On Wednesday, August 6, 2014 5:40 PM, Hafiz Mian M Hamid <mianhami...@yahoo.com.INVALID> wrote: We're using solr 4.2.1 and use an extension of Lucene's DefaultSimilarity as our similarity class. I am trying to figure out how we could get hold of the matching stats (i.e. how many/which terms in the query matched on different fields in the retrieved document set) in our similarity class since we want to add some custom boost to our scoring function. The scoring logic needs to know the number of terms matched on each field in the query to determine the boost value. Basically we want our similarity class to be aware of the global matching stats even for scoring a single term in it's TFIDFDocScorer.score() method. I was wondering how we could get hold of that information. It looks like the exactSimScorer() and sloppySimScorer() methods get an instance of AtomicReaderContext as second parameter but it doesn't look like we could retrieve matching stats from this object. Is there any other way we could make the similarity class aware of the global matching stats? I'd highly appreciate any help. Thanks, Hamid