How to apply boosting to Sitecore predicate builder
I have a custom search page using predicate builder. By default, my results do not appear to be using boost values as defined in Sitecore and I would like them to. I am looking at this guide as an example. My code looks very similar to the first example in that guide: results = queryable.CoveoBoost(item => item.TemplateId == new ID(IDstring), 200).ToList();
When I load the site I get the error "Unsupported expression node type: MemberAccess within type constructor parameter." The queryable variable does not seem to be the problem, as I can use it without issue without that boost statement, and using statements like skip and take. The queryable is formed using the Sitecore PredicateBuilder class.
I am also looking at this stack overflow post and it seems to suggest that I might need to add a condition to the predicate instead of applying the boost right to the queryable. Can anyone point out where I'm going wrong here?
The "CoveoBoost" extension will use Coveo's boosting, which is different from the boosting values in Sitecore.
Open the Coveo.SearchProvider.config file and look for the node EnableSitecoreBoosting. Depending on the version on which you are, it should be defined normally under the
< EnableSitecoreBoosting > true < /EnableSitecoreBoosting >