Search indexes
Overview
You use search indexes to define the content types to be searched by your website visitors through the internal search of your website. For example, you can create a search index that contains all news and when a website visitor enters a search word, it will be applied to all News items on your website.
To configure the internal site search, you must first create a search index and then drop the Search box and Search results widgets somewhere on your page.
NOTE: Sitefinity NextGen supports the Elasticsearch service for all customer projects out of the box.
Note that for the Technical Preview release, the Search facets feature and Search facets widget are not available.
Create a search index
To create a search index, perform the following:
- In your Sitefinity backend, navigate to Administration » Search indexes.
- Click Create a search index.
The Create a search index page opens.
- In Name input field, enter a name for the search index.
- In Index content types... section, specify which content types to index:
- All content types - this is the default option
- Selected content types - expand all available content types by clicking
(Select content types) and proceed with your selection:
- 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.
- Documents
The content of all published documents will be indexed. The document formats that are supported for indexing are: TXT, HTML, RTF, DOCX, and PDF.
- Images
- Custom content types, which you have created in the Content model editor, also appear in this list.
For more information, see Create and edit content types.
When you have finished selecting individual content types, click Use selected.
- (Optional) In the Advanced settings section, you include additional fields of custom content types for indexing in the following way:
- In Field name, enter the name for the additional field.
- In Type dropdown box, select the type of the additional field.
- Click
(Add) to include more fields for indexing, if needed.
NOTE: When you create a new search index, the following fields are included in the search index by default:
- Content
- Title
- PublicationDate
- LastModified
If you want to index additional fields besides the default ones, include them as
Additional fields for indexing. For more information, see
Add fields to a content type.
- Click Create this index.
If you have created the search index after you have published a content type/item, you must reindex.
To do this, on the Search indexes page, click the Actions menu of the search index and then click Reindex.
Edit a search index
You can edit the properties of existing search indexes. For example, you may want to perform a site search based on certain fields of any content type. Thus, you can narrow down your search results generated for large content items.
To update a search index, perform the following:
- In your Sitefinity backend, navigate to Administration » Search indexes.
- Click the index that you want to edit.
- On the Search index properties page, update the index properties in the same way as described in the Create a search index section above.
- Save your changes.
For the changes to take effect, you must reindex the updated search index.