0

Extending my previous question

We have a requirement to order search results based on the number of occurrence of the search term (wildcard and substring) in a list of fields(not all the fields).

Ex :

item1 - Title<Field> : test test testtesttesttest
item2 - Title<Field> : test test test

The default solr score is higher for item2, but as per our business case, item2 should be on top as it has the highest occurence of the search term. We need the similar implementation for multiple fields and decide the result order based on the sum of occurence of the term in a list of fields.

We have tried boosting by qf parameter with edismax and writing a custom order by with

sort = sum(termfreq(field1,"test"),termfreq(field22,"test"),termfreq(field3,"test")) desc

. But the result is same and item2 is always on top.

Let me know, we have any solution from solr out of the box or any custom sitecore query implementation to obtain such custom result order.

Sitecore 9.3 Solr 8.1.1

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.