Tag Archives: Search Provider


You cannot underestimate the importance of boosting your relevancy searches. As you can see below in the code snippet, applying a boost to your query is relatively easy. The boost method itself takes a double, which indicates how much boost you wish to apply to that condition. This ultimately affects the the sort order when the query is returned from the search provider layer. One thing to keep in mind when doing a relevancy search is that you do not want to apply sorting to the search query. Continue reading

Predicate Builder

In many of the Sitecore 7 Hangouts and various presentations, they show how to query either Solr or Lucene using a simple POCO (Plain Old CSharp Object) object. This is a great approach to querying. It allows us to use an object orientated approach and has changed the way we go about accessing data from our indexes, similar to what the Custom Item Generator did for us some years back in how we access an item’s fields. The question is, how do you iterate over the parameters in a querystring (#q/activitylevel=Level 2&price=3000&continentnames=Europe,Asia) and match the key to a property on your POCO object? How do you dynamically build an index query to represent the many layers of possible search clauses? This is where the predicate builder becomes valuable. Continue reading