Hello Solr Community! *Problem*: I wish to know if the result document matched all the terms in the query. The ranking used in solr works most of the time. For some cases where one of the term is rare and occurs in couple of fields; such documents trump a document which matches all the terms. Ideally i wish to have such a document (that matches all terms) to trump a document that matches only 9/10 terms but matches one of the rare terms twice. eg: *query1* field1:(a b c d) field2:(a b c d) Results of the above query looks good.
*query2* filed1:(a b c 5) field2:(a b c 5) result: doc1: {field1: b c 5 field2: b c 5} .... doc21: {field1: a b c 5 field: null} Results are almost good except that doc21 is trailing doc1. There are a few documents similar to doc1 and pushes doc21 to next page (I use default page size = 10) I understand that this is how tf-idf works. I tried to boost certain fields to solve this problem. But that breaks normal cases (query1). So, I set out to just solve the case where I wish to boost (or) augment a field with that information (as ratio of matched-terms/total-terms) *Ask:* Is it possible to get back the terms of the query and the matched state ? I tried - debug=query option (with the default select handler) - with terms in the debug response I could write a function query to know its match state Is this approach safe/performant for production use ? Is there a better approach to solve this problem ? Regards, Kumaresh