We are ready with the preview build. Please note that this build is intended only to preview the support for Windows Azure search feature and should not be used in any projects that are in production or under active development. This build does not contain other upcoming features, the only difference with Sitefinity 7.2 is the support for Azure Search. In order to run the preview build you will need a valid Sitefinity 7.2 license. Further information on what's included in the preview build can be found below:
Support for Azure Search
This feature allows the use of Sitefinity Search in Windows Azure cloud service deployments. However the feature can also be utilized in other deployment scenario - for example VPS or Load Balanced environment. In order for the Sitefinity Search to be running on Windows Azure, an instance of Azure Search must be created. Details about creating such service can be found on the azure website: http://azure.microsoft.com/en-us/services/search/
After the search service has been set there are few settings that need to be considered:
- service name
- API key ( admin key )
These two properties will be needed for Sitefinity to connect to the Azure Search and fetch / push data to the cloud service.
In Sitefinity we have introduced a new basic settings section which allows choosing of the following options:
If AzureSearchService is chosen, there will be options to enter the URL / IP address where data will be sent and also API key. In both fields, the data should be corresponding with the data from the Azure Search service that was previously created.
After the changes are successfully saved, a search index can be created, which will exist in the cloud.
Under the hood
For the Azure Search we use 3rd party SDK, built to provide usable API for the Azure Search calls. The SDK is called RedDog.Search. The SDK and its API are open source. We plan repacing the RedDog.Search SDK once Windows Azure releases officially supported SDK for Azure Search.
The search result contains 2 results if we search for thread or post.
As the exceptions are not handled (yet) there might be YSODs (e.g. if there is an Azure connection error).
You could check Error.log file for possible problems.
Introductions to Sitefinity Search API - ISearchService
This is the interface of the application service (in contrast to a web service) in Sitefinity responsible for full-text search capabilities of the system.The default implementation, coming with Sitefinity out-of-the-box is based on Lucene.Net and keeps the search indexes on the disk.
By implementing this interface and replacing (using ObjectFactory.RegisterType) the default implementation with a your custom one, you can make Sitefintiy talk to a different search backend, like ElasticSearch, Apache Solr, SharePoint Search, etc.
Sitefinity calls the UpdateIndex method of the registered (your) implementation on each item creation/modificaion, providing a collection of IDocument instances to be added/updated into the index.
Sitefinity calls the Search methods of the registered implementation each time the user uses the built-in search box widget. If you ensure that the built-in search box and search results widget are not used in your site you can skip implementing those and use your custom widgets to directly query the search backend of your choice.
The Search method takes ISearchQuery as a parameter. In the default implementation the query is created and it's ISearchGroup groups are built using IQueryBuilder's BuildQuery method. You can add/remove groups to the query once its built.
ISearchGroup - Contains ISearchTerm and ISearchGroup enumerations. When building the search expression, the goup's Operator is used between the terms/groups.
ISearchTerm - Describes a search term with it's Field and Value.
Filtering by dates
MySearchResults : SearchResults
MySearcher : SearchResults.ISearcher
.control = control;
var control =
var service = Telerik.Sitefinity.Services.ServiceBus.ResolveService<ISearchService>();
var queryBuilder = ObjectFactory.Resolve<IQueryBuilder>();
var searchQuery = queryBuilder.BuildQuery(query, control.SearchFields);
searchQuery.IndexName = catalogue;
searchQuery.Skip = skip;
searchQuery.Take = take;
searchQuery.HighlightedFields = control.HighlightedFields;
// Contains the default filter - by current language
var currentFilter = searchQuery.Filter;
var myDatesFilter =
myDatesFilter.Operator = QueryOperator.And;
// Here we add a clause, that only results for the last 10 days will be displayed
, DateTime.UtcNow.AddDays(-10), FilterOperator.Greater));
// Persist the language filter, if exists
searchQuery.Filter = myDatesFilter;
IResultSet result = service.Search(searchQuery);
hitCount = result.HitCount;
How to get the preview
You can download the preview build from here.
A sandbox is also available here: http://azuresearchpreview.cloudapp.net/.