solrsitecoresolr-boost

Query Field Boosting issue in solr when boosted term is present in more than 1 field


I am having 4 fields in solr. For ex. Field1, Field2, Field3 and Field4.

My boost sequence is like field1^10, field2^8, field3^7 field4^6.

Now if I search for a keyword marketing lets say q=(Field1:("marketing")^10 OR Field2:("marketing")^8 OR Field3:("marketing")^7 OR Field4:("marketing")^6).

Requirement: Now according to requirement, marketing present in field1 should appear first and so on which is working fine.

Problem: But there is one record where marketing is appearing in Field3 and Field4 and it is appearing 2nd in result while record containing marketing in Field2 is appearing 3rd in result which is probably because of scoring mechanism.

Solution I need: I want to show records in the order of boost applied in that field no matter if it is found in multiple field i.e. the record having marketing in field2 should always appear 2nd in result.


Solution

  • Response given by @MatsLindh in the comments is the proper solution :

    You can however try to increase your boosts to have a much larger difference between the different levels - field1^100000, field2^10000, field3^1000 field4^100 - that way, given the same content, two later fields will not add up to a larger boost than the ones before it.

    Note: Be aware that the scores will be affected by more than just the boost (such as the number of occurences, etc.).