We have a requirement to order search results based on the number of occurrence of the search term in a list of fields(not all the fields). We tried the below query in sort, but this does not provide the correct sort order.
sum(termfreq(field1,"searchQuery"), termfreq(field2,"searchQuery")<and other fields>)
We have tried using the "score" from solr but its not providing correct result based on the number of occurrence of the search term in the required fields.
Is there anything available out of the box form solr for this requirement or any other function available from solr other than termfreq ?
Sitecore 9.3 Solr 8.1.1