Reputation: 1066
I'am trying to us boost function for busting some results in a sitecore search. You can see the code from bellow:
var predicate = PredicateBuilder.True<SearchResultItem>();
predicate = predicate.Or(p => p.Content.Equals(text).Boost(10));
When I use .Boost(10) I got the following error:
'bool' does not contain a definition for 'Boost' and no extension method 'Boost' accepting a first argument of type 'bool' could be found
What did I have done wrong? Or should I use some specific library?
Upvotes: 0
Views: 80
Reputation: 2635
Put using Sitecore.ContentSearch.Linq;
in your code. The extension method resides there.
Upvotes: 1