Sitecore 7 + Lucene: Query-Time Boosting: how? -
for items of template, our users can indicate item should shown on top of list.
for this, have added field in index "showontop".
now when searching items of template (to build list page), have these "showontop" items returned on top of other items.
this field should not affect other site search (general search).
we think possible applying query-time boosting these documents. but, how can achieve this?
to boosting @ query-time use boost(value) method (using search predicate sounds might doing advanced searching added flexibility of predicates might come in handy) -
var querypredicate = predicatebuilder.true<searchresult>(); querypredicate = querypredicate.and(i => i.headline.contains(model.query).boost(50));
Comments
Post a Comment