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.

To create search indexes:
  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, you select which content 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 search indexes

You can edit a search index and it gets automatically reindexed. 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.
  5. The search index is updated and automatically reindexed. 

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’s 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.

Was this article helpful?