I want to give score for a term match only once, not for a number of occurrence.
Ex - Search Query - Parle G Biscuits
Document 1 - Parle G Biscuits
Document 2 - Parle G Biscuits. I can eat 10 packets of Parle G Biscuits anytime.
Document 3 - Parle G Biscuits V2
I want to rank documents as Doc 1 > Doc 3 > Doc 2
Default answer from Solr - Doc 2 > Doc 1 > Doc 3
This is happening because the string is found twice in the longer string. If I could just somehow stop giving score for double occurrence, I will get the desired results because Document 2 and 3 will get slightly penalized for large string length.
How can I modify Solr to work in given fashion ?
Thanks !