Posts

Showing posts from July, 2018

Building Sitecore Content Search Queryable using Rules engine

Image
Recently i have built a custom search module which uses Sitecore Content Search API that would let you define the search criteria directly from content editor, where you would be able to select which index, start locations, Templates that you want the results to filter on from the content tree i also wanted to add fields filter, like filter on checkbox, date, Single-line Text fields etc. I had an idea to build this Fields filter using Sitecore Rule Engine since it seemed like a good fit here! Imagine you would be able to build a filter like: Where [Field Name] is equal [String Value] That would be nice, right? So i started digging into rules conditions and see how can i make this possible, And came to my surprise that Sitecore have built a predefined set of conditions to do just the job! Using this Query builder rule [ /sitecore/system/Settings/Rules/Search Query Builder ] you will be able to see the set of conditions for Search query where you can build your filter,