Search

Episerver Search is in the global menu in the Episerver edit view, and the templates are available in the Episerver sample sites.

Search in Episerver

Episerver Search is integrated with the CMS, and the functionality is based on the Lucene search engine, part of the Episerver Framework. Search in Episerver Commerce also is based on Lucene, but Commerce Manager (the back-end part of Commerce) has its own pluggable search provider API. See the Episerver Commerce Developer Guide for information about Commerce-specific search.

You also can use Episerver Find, which is a cloud-ready extension that lets you build advanced customized search features based on your content model.

Built-in search features

The built-in search in Episerver CMS has the following features.

Full-text search of text in content and files

Specify whether you want the results to use exact matching, such as getting a match on plant when you type plan in the search field. To find terms that match a submitted string plus additional characters, add a wildcard, such as plan*.

Build a property-based search, searching for instance for pages with a property set to something specific.

Use categories in CMS to build a property-based search, filtering on categories set for the content.

Global search

Search across all content types such as pages, blocks, files, videos and images, product content in a Commerce product catalog, and community content. Built-in filtering limits the search results to the type of content.

Note: You do not get search results on content in blocks added in a content area in a template. Usually, this is not a problem because blocks are often used to promote content in a specific source page, which are found when performing the search.

Static facets

Facets are a type of filtering or grouping, where you present groups (facets) of content to limit the search after getting the first query from the user. You can search on categories and content types, and define which category and type facets you want to filter.

Event-driven indexing

Automatically add items to the search index, such as when you upload a file or publish a page, instead of crawling the entire HTML content of the site, and ensuring better site performance.

Index any type of content

Index any type of content, including content from external systems, using the search web service and an open protocol based on Atom. The index is located in your server domain, and your search feature has direct access to these through the local API.

Access-based search result filtering

Search results are filtered by access rights, ensuring that users see only content to which they have access.

Pluggable search interface

You can replace the built-in Lucene indexing with another index without changing the code on the client, which uses the same API when searching.

Instant search

The most important related information appears as you type the search phrase, and becomes more specific as you type more characters.

Implementation

The built-in SearchDataSource control performs multiple types of search in page and file information and content.

You can sort, filter, and configure the output using properties on the web control. Built-in filters cover the most common filtering options. You also can create your own custom filtering methods for more complex filtering.

See Episerver World to download and install sample sites for CMS and Commerce that show search functionality using the Episerver SearchDataSource control.

For even more control of the outcome when implementing a search solution, you also can work directly towards the ContentSearchHandler, or create your own custom queries. Some configuration and development efforts are needed.

See the Search sections in the Episerver CMS and Commerce SDKs, for information and examples about configuring and implementing product-specific search features.

Default search configuration

Episerver search is index-based and is by default using the built-in full-text search feature. When you install the CMS, an index is created and added to the site folder structure. The Episerver Indexing Service then indexes files and documents for the versioned virtual path provider for the website.

Note: The indexing service must be running for the website search to provide search results.

The full-text search in Episerver comes with a set of default values, which usually do not need to be changed. To find out how it works, the full-text search client and service are described in the following topics:

Limitations

The built-in search provides powerful possibilities when properly set up and configured. However, you should consider the following limitations when implementing Episerver Search.

The built-in search does not index blocks in content areas. Often these blocks contain linked references to other content and, therefore, do not need to be indexed. If you need to index actual block content, the built-in full-text search cannot deliver this.

In a load-balanced environment, the supported scenario is to install the search service on one of the machines, and configure that machine in the search settings for other machines.

If you have advanced or specific requirements, try Episerver Find for your search solution (which requires a separate license).

Search queries in CMS

The following options are available when implementing search queries in CMS:

EPiServer.Core.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.

Custom Queries

You can build your own queries to ask the Episerver Search Index by grouping together different queries to find what you are looking for. You can use the following CMS-specific queries: