Tag Archives: Solr

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

How to build a complex index

When I originally designed the way the new Collette website would utilize Solr, the concept was to build an index to support the tour search page. To do this meant we would have to do things differently from what Sitecore was giving us with their out-of-the-box indexes. Those indexes, core, master and web I consider to be simple indexes. Continue reading