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.
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
- Drag and drop the Search box widget on a page.
- In the upper-right corner of the widget, click the Edit button to open the designer of the Search box widget.
- 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.
Under Where to display search results?, click the Select a page button.
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.
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.
You can specify additional properties of the Search box widget by clicking the Advanced button in the designer. You can configure the following:
Enter true, so that Sitefinity CMS disables listed suggestions while typing in the search box.
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.