Skip to main content

Search features

Abstract

Learn about the different features that Sitecore Search provides

You can create various user experiences using the Search API by passing different objects in your request. Here are some features that you can use to create search experiences:

A facet is a dynamic component that helps visitors quickly categorize and narrow down search results. Unlike filters, facets change based on a visitor's query. Facets are helpful when you have a large content inventory based on filters like type, reviews, and products, for example.

Sitecore Search provides two kinds of facets:

  • Term facets - facets for string attributes. These facets count the occurrences of each value. For example, color and brand are term facets. The color facet can have values of red, green, blue, yellow, and multi.

  • Histogram facets - facets for numeric attributes. These facets create a representation of frequency distribution for a set of ranges. For example, you can have a price facet with values of under $25, $25-$50, $50-$100, and above $100.

To request a facet when you call the Search and Recommendation API, add a facet object.

You can see sample requests that use the facet object in Using faceted search.

Use filters to limit the type of content and attributes you want returned. You can apply filters at two levels:

  • At a page level - this filter is applied to the entire page. Use this when you want Sitecore Search to search a subset of your content for search results. For example, you have a clothing store, and a visitor navigates from the main landing page to the men's shoes page. In the data request on page load, you use a page-level filter for men's shoes.

  • At a facet level - this filter is applied at the facet level. For example, a visitor selects facet values red and green. To honor the visitor's selection, pass a facet-level filter for red and green facet values.

To use filters, pass a filter object and, optionally, the filtering_options object. You can see sample requests in Using filters.

Use suggestions to auto-complete search queries, get predictive search results, and suggest relevant content to the user. For example, you have a cosmetics company, and a visitor searches for blue hair. You can add suggestions to auto complete this query to blue hair color', show links to articles like how to get midnight blue hair, and show products like semi-permanent hair-color.

To enable suggestions, add a suggestions object. You can see a sample request in Adding suggestions.

Enable personalization to customize results for the visitor. For example, you choose to personalize based on the title and type attributes. Sitecore Search uses the visitor's browsing history to show results with titles and types in which the visitor has shown interest.

To enable personalization, add a personalization object. You can see a sample request in Using personalization.

When you rank items, you ask Sitecore Search to increase the search score of certain items in the natural results set. Sitecore Search then boosts these because they have higher search scores.

When you rank content, you add a customized weight to a particular attribute. This increases the overall search score of items with that attribute. Sitecore Search moves items with a higher search score up the search results.

The following diagram shows how ranking works for a result set of six items:

How ranking works.

To rank content, add a ranking object. You can see a sample request in Using ranking

When you sort content, you ask Sitecore Search to arrange search results in ascending or descending order of some option.

For example, you have a result set with six movies. Each movie has a title and a year of release.

The following diagram shows how sorting works when you sort by title or by year of release:

How sorting works.

To sort, you must create a sorting option in the Customer Engagement Console (CEC). Then use the sort object and call the Search and Recommendation API. You can sort at the request level or sort at the facet value level.

You can enable semantic search for any request you make. Semantic search uses natural language processing and machine learning to consider query context and the relationship between words.

Semantic search is helpful when keyphrases have many words.

For example, consider the search keyphrase green sweaters. A keyword search might show you results like Women's green sweaters or How to wear green sweaters with jeans. A semantic search, on the other hand, might give you results like Festive Christmas wear and Where to buy ugly sweaters this season in addition to results for green sweaters. This is because semantic search looks at the words green and sweater and understands that the visitor is looking for Christmas-related clothes.

To enable semantic search, pass +semsearch as a value for the rfk_flags key. You can see a sample request in Using semantic search.