I've got some code that's generating a predicate for Solr search as follows:
foreach (string query in querySplit) {
contentPredicate = contentPredicate.Or(item => item.DocumentTitle.Matches(query)).Boost(10.0f);
contentPredicate = contentPredicate.Or(item => item.Body.Matches(query).Boost(5.0f));
}
When I look at the query that results from this in the log, I see the following:
70460 10:47:13 INFO Solr Query - ?q=((((alltemplates_sm:(72220db715134422bcd8e74fdbb0a900) AND (-_name:("__Standard Values") *:*)) AND (-_name:($name) *:*)) AND (document_title_t:/advisory/ OR (body_t:/advisory/)^5))&start=0&rows=10&fq=_indexname:(sitecore_master_index)
So I see the boost on the Body field, but not on the DocumentTitle field. I've tried a lower boost value on DocumentTitle, but it's not picking it up in any circumstance. DocumentTitle is a single-line text field, and Body is a rich text field. These are using the out-of-box definitions for the fields, no computed fields. Why would the boost not be applied to certain fields?
contentPredicate = contentPredicate.Or(item => item.DocumentTitle.Matches(query).Boost(10.0f))
.