Rules Engine Lucene Queries Pt I

During the course of the Sitecore installations (versions 6.2 – 7.2) I have been involved with, I have been asked to allow users to be able to select the results of their data for themselves. In later versions Sitecore have achieved this using the newer Search dialogs. I will come out and state that I haven’t really found the search dialogs too helpful as a user myself, and that I don’t see the content editors using them all that much either.

It has struck me since I first began using Sitecore that the rules engine could be an obvious potential solution to this issue. The basis being that you create a ‘query’ item, this item is then used as a datasource / basis item for your renderings (or sublayouts in older installations). I also considered the idea of combining the rules engine with Lucene / Solr in order to retrieve results based on the selection the user makes – after all, that’s what we are kinda doing as developers in any case.

I first started messing with the rules engine – shown in this post Searching with the rules engine in Sitecore. This was great and really started to show the potential. I also realised quickly that users would need to be able to test their queries from within the engine, so after a little work, I settled on a dialog that looked like this:

Rules Queries

Just for fun – the core engine that drives this is using a simple visitor pattern and could be utilised for other data – I am currently also experimenting with my mongo L2 cache with extended linking 😀

In the next post, I will describe how to use the results of your rules queries in renderings / sublayouts or other tasks.

EDIT: For those who dont know, you can find Rules Queries for Sitecore here on Github

Related Articles

Advertisements

2 thoughts on “Rules Engine Lucene Queries Pt I

  1. Pingback: Using Sitecore Rules Queries in Code | cardinalcore

  2. Pingback: Rules Queries Pt III – What can we use rules queries for ? | cardinalcore

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s