Create search indexes
You use search indexes to define different sets of content to be searched, using the internal search of your website. To configure your website’s internal search, you must first define a search index, then drop the Search widget and Search results widget somewhere on your website.
Create a search index
To create a search index, perform the following:
- On the Sitefinity CMS main menu, choose Administration » Search indexes.
- Click Create a search index
The Create a search index page opens.
- In Name input field, enter the name of the search index.
- In Scope section, select which content types will be indexes.
For example, you can create a search index that contains all news. When a user enters a search word, it will be applied to all news items on your website.
You can index the following:
- News items
- Blog Posts
- Content Blocks
This checkbox is available only for releases up to 7.1 incl. For later releases, to index Content Blocks, use Static HTML checkbox.
Content block that are not displayed anywhere on a page appear as unclickable links. To avoid this, deselect Content Blocks and select Static HTML.
You can exclude from the search results only particular Content block widgets. You do this from the Advanced settings of the Content block widget that you want to exclude. For more information, see Content block widget.
The content of all published documents is indexed. The document formats that are supported for indexing are: TXT, HTML, RTF, DOCX (Office Open XML – the binary DOC format is not supported), and PDF.
- List Items
- Forum posts
- Any dynamic module items
- Static HTML in pages
The system searches the HTML of pages. This will index all content items that are visible on pages, including Content Blocks.
NOTE: The widgets in the Navigation widgets and the widgets in the Classifications widgets are excluded from the site search.
NOTE: You can control which pages to include in the internal search from the page’s properties. When you exclude a page from the site search, its content is not indexes and cannot be found using the internal search.
For more information, see Create a page.
- (Optional) If you are working in a multisite environment, choose whether your search index contains information about all sites or just the current site.
- When you are finished, click Create this search index.
If you have created the index after you have published an item, you must reindex.
You can do this on Search indexes page, by clicking the Actions link of the index and then clicking Reindex.
Edit a search index
You can edit the properties of a search index. For example, you may want to add a new dynamic type that you have created or you may want to exclude a type from the index.
To do this, perform the following:
- Navigate to Administration » Search indexes.
- Click the index that you want to edit.
- Select or deselect the types that you want include or exclude.
The types created after you have created the index will appear in the list.
- Save your changes.
For the changes to take effect, you must reindex the updated search index.
Configure search index settings for content items
You can customize the search index settings to perform search based on a specific field of any content item. For example, you can configure the search results to only include matches for titles and to ignore matches for content. Thus, you can narrow down search results generated for large content items (for example, Blogs or Forums) or for frequently used terms. To do this:
- In Sitefinity CMS backend, navigate to Administration » Settings » Advanced.
- Click the content item type, for which you want to configure the search index settings.
- Click Controls and click on the respective content item type.
- Click Views and the respective content item type.
- Click Backendlist and in the ExtendedSearchFields enter your desired search criteria, separated by comma.
Configure search index settings for dynamic modules
If you are searching in dynamic module items or custom fields created for any module, you must set the fields where you want the system to search.
You do this by expanding Advanced and entering the fields where to search, separated by commas.
For example, if you want to search your dynamic content types by Definition, enter Definition.
You can only search in text fields.
NOTE: You must also configure these fields in the Search results widget advanced configuration mode. For more information, see Search results widget.