Create search indexes

Overview

You use search indexes to define different sets of content to be searched by your website visitors through the internal search of the website. For example, you can create a search index that contains all news and when a user enters a search word, it will be applied to all news items on your website.

Create a search index

To create a search index, perform the following:
  1. In Sitefinity CMS backend, navigate to Administration » Search indexes.
  2. Click Create a search index.
    The Create a search index page opens.
  3. In Name input field, enter a name for the search index.
  4. In Index content types... section, specify which content types to index.
    The default option is All content types.
    If you choose the Selected content types option, expand all content types by clicking Plus button (Select content types) and then proceed with your selection.
    1. Select the relevant content types:
      • Blog Posts
      • Blogs
      • 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.
      • Events
      • Images
      • List Items
      • Lists
      • News 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.
      • Videos
      • Any dynamic content types
    2. Click Use selected.

    NOTE: The Navigation widgets and the Classifications widgets are excluded from the site search.

    NOTE: You can control which pages to include in the internal search from the page 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 pages.
    You can also control whether top-level libraries are included or excluded from the site search - through the Library properties page. For more information, see Document and file libraries.

  5. If you are working in a multisite environment, in Index content from... section, select one of the following options:
    • All sites
    • This site only (the default option)
    • Selected sites - you specify these sites in the following way:
      1. Click Plus button (Select sites) to expand all possible sites and then make your selection.
      2. Click Use selected.
  6. (Optional) In the Advanced settings section, you include additional fields for indexing in the following way:
    1. In Field name, enter a name for the additional field.
    2. In Type dropdown box, select the type of the additional field.

      NOTE: Specifying the correct type is optional when using Lucene and Elasticsearch services but mandatory when using Azure Search. For information how to determine the type corresponding to Azure Search data type correctly, see Search index fields and supported data types.

    3. Click Plus button (Add)  to add more fields for indexing, if needed.
    IMPORTANT: When you add a new search index, Sitefinity CMS creates by default the following fields:
    • Content
    • ContentType
    • Id
    • IdentityField
    • Language
    • LastModified
    • Link
    • OriginalItemId
    • PipeId
    • Provider
    • PublicationDate
    • Summary
    • Title

    Do not add any of these fields as Additional fields for indexing, because you will get a duplicate field exception and will not be able to index.

  7. When you are finished, click Create this index.

If you have created the search index after you have published a content item, you must reindex.
You can do this on Search indexes page, by clicking the Actions link of the index and then clicking Reindex. You can reindex multiple search indexes simultaneously and for each one, a separate progress bar appears on top of the screen.

Edit a search index

You can edit the properties of a search index. For example, you may want to add a new dynamic content type that you have created or you may want to exclude a content type from the index. 

To edit a search index, perform the following:

  1. In Sitefinity CMS backend, navigate to Administration » Search indexes.
  2. Click the index that you want to edit.
  3. On the Search index properties page, update the index properties in the same way as described in the Create a search index section above (steps 3-6).
  4. Save your changes.

For the changes to take effect, you must reindex the updated search index.

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 can only search in text fields.
To do this, expand Advanced settings and add these fields as Additional fields for indexing:

  1. In Field name, enter a name for the additional field.
  2. In Type dropdown box, select the type of the additional field.

    EXAMPLE: If you want to search your dynamic content types by Definition, enter Definition as the Field name and select Short text as the corresponding Type.

    NOTE: Specifying the correct type is optional when using Lucene and Elasticsearch services but mandatory when using Azure Search. For information how to determine the type corresponding to Azure Search data type correctly, see Search index fields and supported data types.

  3. Optionally, click Plus button (Add)  to add more fields for indexing.

NOTE: You must also configure these fields in the Search results widget advanced configuration mode. For more information, see Search results widget.

Additional resources

ARTICLES

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?