Managing query rules

A query rule is a set of conditions and actions that help meet the user's search intent. Query rules allow you to promote or highlight certain types of result based on keywords, phrases, or content types. You can define query rules for a tenant, a site collection, or a site, and they can be applied to one or more result sources.

To create a promoted result query rule, perform the following steps:

  1. Navigate to the Manage Query Rules page for a site, site collection, or tenant:
  • For either a site collection or a site, navigate to the site, click the gear icon, select Site information, select Site Settings, and select View all site settings. Locate either Search Query Rules (site collection) or Query Rules (site).
  • For a tenant, this link is located on the Search Administration page (https://admin.microsoft.com | Admin centers | SharePoint | Classic Features | Search). Depending on your tenant, the Search Administration page may require different user interface steps.

You can skip the user interface navigation steps and go directly to https://<tenant>-admin.sharepoint.com/_layouts/15/searchadmin/TA_SearchAdministration.aspx, where <tenant> is your default tenant name.

  1. Select a result source for the new query rule from the dropdown labeled Select a Result Source:

  1. Click New Query Rule.
  2. On the Add Query Rule page, enter a name for the query rule.
  1. Click to expand the Context area.
  2. In the Context section, select a result source. By default, the result source that you chose in the dropdown earlier is selected, but you can add more result sources or modify the ones that are already present. You can change it to all result sources by selecting All sources, or you can add additional results sources by clicking Add Source.
  3. In the Context section, you can also choose to restrict the query rule to a category by selecting Add category.
  4. In the Context section, you can restrict the query rule to a user segment by selecting Add User Segment.
  5. In the Query Conditions section, configure a condition.
  6. In the Actions area, specify the action to take. In this case, we're going to promote a result (in previous versions of SharePoint, this was called Best Bets). Click Add Promoted Result and specify a name for the result in the Title field. Select Render the URL as a banner instead of as a hyperlink and click Save:

  1. If you want to apply this rule for a limited amount of time, expand Publishing and select start and stop dates.
  2. Click Save.

The next time a user conducts a search that matches your query rule, the promoted result will appear at the top. In this case, we created a promoted result based on the keyword blog. To see the promoted result, you can go to a site, perform a search, and set the scope to All, as shown in the following screenshot:

Now that you've learned how to manage query results and sources, we'll tackle search schema.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.66.206