Search box widget

You use the Search box widget to enable users to search for content on your website. Once you drop the widget on a page, a text box for entering search keywords is displayed.

PREREQUISITES: You created at least one search index. For more information, see Administration: Create search indexes.

You can use the predefined widget templates, or, optionally, customize the default widget template or create a new template for the Search box widget. For more information, see Overview: Widget templates.

Configure the Search box widget

  1. Drag and drop the Search box widget on a page.
  2. In the upper-right corner of the widget, click the Edit button to open the designer of the Search box widget.
  3. Expand the Where to search? dropdown menu and select the search index you want to use for this search box.
    The search index is a predefined set of search content. For example, you can create a search index that contains all news. When a user enters a search word, it is applied to all news items on your website.

    NOTE: You can manage search indexes in Administration » Search indexes.

  4. Under Where to display search results?, click the Select a page button.

  5. From the list of pages, select a page and click Done selecting.

    NOTE: You can select the page on which the search box is located, as well as any other page. You can also change the selected page later on.

    IMPORTANT: You must add the Search results widget to the page that will display the search results.

  6. Click Save.

  7. To apply styling to the Search box widget, expand More options and set Style and CSS classes. CSS classes are applied to the <div> element that contains the Search box widget.
    In case you created predefined styles, you can use the Style dropdown menu, which lists your predefined styles. For more information about predefined styles, see Add predefined styles.

Advanced options

You can specify additional properties of the Search box widget by clicking the Advanced button in the designer. You can configure the following:

  • DisableSuggestions
    Enter true, so that Sitefinity CMS disables listed suggestions while typing in the search box.
  • SuggestionFields
    Lists the fields to be used in the search suggestions. You must include these fields in the search index.

Boost search results

PREREQUISITES: You see the Boost search results section in Advanced settings of the widget only when you are using Azure Search.

You use the Boost search results section to configure additional parameters for Azure Search:

  • Scoring profile
    Scoring profiles are part of the search index and consist of weighted fields, functions, and parameters. 
    Use scoring profiles to boost search results by customizing the way different fields are ranked.
  • Scoring parameters
    Scoring parameters are part of the scoring functions within a scoring profile that are boosted by tags. You don't have to configure them for other functions. 
    Add scoring parameters to boost content to appear higher in the search results by specifying the parameter's name and value. Use the following syntax: <Tags parameter name>:<value1>,<value2>; <Tags parameter name 2>:<value1>,<value2>

You manage the scoring profiles and parameters in the Azure portal.
For more information, see Add scoring profiles to a search index.

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?