This document describes how to work with search queries in EPiServer CMS. By default, EPiServer CMS uses the Lucene Search Engine, supporting full-text search indexing and ranked search results. The search engine itself is based on the ASP.NET provider model meaning you can write your own providers to search servers.
The following options are available when implementing search queries in CMS:
SearchDataSource can provide PageData objects to your data bound controls in your page templates.
SDK entry for SearchDataSource: EPiServer.Web.WebControls.SearchDataSource
The ContentSearchHandler is a CMS-specific search handler that handles common scenarios when searching for content. It has methods like GetSearchResults and GetContent to simplify the development process.
SDK entry for ContentSearchHandler: EPiServer.Core.ContentSearchHandler
For more advanced search scenarios you have the possibility to build your own queries to ask the EPiServer Search Index. This can be done by grouping together different queries to find whatever you are looking for. You can use the following CMS-specific queries:
- ContentCategoryQuery when searching for categories
- ContentQuery when searching for content
- UnifiedDirectoryQuery when searching for unified directories
- UnifiedFileQuery when searching for unified files
For detailed information about search features of the EPiServer platform (for example, other queries available), see the Search section in EPiServer Framework SDK.