Microsoft Indexing Service
EPiServer CMS 5 R2 SP1
Document last saved:
This document describes how to configure EPiServer CMS 5 to search in files using Microsoft® Indexing Service.
Table of Contents
- What is Indexing Service?
- How to Configure Microsoft Indexing Service with EPiServer CMS 5
- Disable Indexing of ASP.NET Files
Indexing Service is based on catalogs (Indexing Service's term for the index and related files) and directories. A catalog in Indexing Service is like a search root, where you make queries. It can contain one or more directories on separate locations. Every search page in EPiServer CMS 5 has a setting that determines the catalog to perform file searches in. You may have seen that search pages also have a setting for scope in EPiServer CMS 5. You should set this option to a directory within your catalog, if you want to restrict the search to only some directories (optional). Indexing Service is only needed if you wish to make files referenced by EPiServer.Web.Hosting.VirtualPathNativeProvider searchable. Files referenced by a EPiServer.Web.Hosting.VirtualPathVersioningProvider are indexed internaly by EPiServer CMS and should not be indexed by Indexing Service.
How to Configure Microsoft Indexing Service with EPiServer CMS 5
Follow the instructions below to configure Microsoft Indexing Service with EPiServer CMS 5 .
- Open Computer Management from Administrative Tools. Double-click Services to access the Indexing Service.
- There are by default two catalogs in the indexing service. The default search page in EPiServer CMS 5 has a property that defines the catalog in indexing service that should be used. If this is not defined, the Web catalog will be used.
- You should create a new catalog for the EPiServer CMS site that uses the EPiServer.Web.Hosting.VirtualPathNativeProvider. Right-click Indexing Service, click New and then Catalog. Enter a name for the site and a location where information about the catalog should be stored. This location does not have to be the same as the site you want to use the catalog for. A warning that the catalog will not be indexed before you restart the indexing service will appear but ignore this for now.
- Add each directory referenced by EPiServer.Web.Hosting.VirtualPathNativeProvider by right-clicking the new catalog and click New and then Directory. Enter the full path for your physical directory (the value of the VirtualPathNativeProvider's physicalPath attribute).
- You must stop and start the indexing service to enabled indexing. Right-click Indexing Service in the explorer tree and click Stop. All the values in the right window should now disappear, and there should only be information in the Catalog and Location columns. Start the service again. You should see updated values for the new catalog. Indexing the new catalog may take a while, depending on the amount of documents contained in it. Status about the progress can be seen in the information window.
- To make the files indexed by Indexing Service searchable from EPiServer CMS you need to use an EPiServer.Web.WebControls.SearchDataSource control and set the MainCatalog and (optionally) MainScope attributes to point to the relevant Indexing Service catalog. MainCatalog should be set to the name of the Indexing Service catalog and MainScope may be set to a subfolder of the catalog (for example "/subfolder") to limit the search.
- You should now be able to search for documents in your upload directory. If you do not get any results, check if the Indexing Service has completed indexing the catalog (see step 5).
Tip You can query the catalog directly in the indexing service administration interface.
Indexing Service has a bad habit of indexing ASP.NET temporary files that will result in access-denied problems. Microsoft has a knowledge base article describing both the problem and the solution. See http://support.microsoft.com/default.aspx?scid=kb;en-us;329065&Product=aspnet for more information.