Create search indexes

Overview

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:

  1. On the Sitefinity CMS main menu, choose Administration » Search indexes.
  2. Click Create a search index
    The Create a search index page opens.
  3. In Name input field, enter the name of the search index.
  4. 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
    • Events
    • 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.
    • Documents
      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
    • Products
    • 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.

  5.  (Optional) If you are working in a multisite environment, choose whether your search index contains information about all sites or just the current site.
  6. 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:

  1. Navigate to Administration » Search indexes.
  2. Click the index that you want to edit.
  3. 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.
  4. 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:

  1. In Sitefinity CMS backend, navigate to Administration » Settings » Advanced.
  2. Click the content item type, for which you want to configure the search index settings.
  3. Click Controls and click on the respective content item type.
  4. Click Views and the respective content item type.
  5. 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.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?