Add search functionality
Describes additional Optimizely Search & Navigation-based search functionality that you can add.
This step assumes that you have a working website with Optimizely Search & Navigation, and basic search functionality is installed.
You need to enable features like statistics, Best bets, and synonyms, since they are not enabled by default.
Statistics tracking and viewing
Search Statistics provides an API for tracking searches and retrieving their statistical data. The aggregated statistics are also used for features like spelling suggestions, and related queries.
If you are using Unified Search, add a Track statement to a search query to enable the accumulation of statistics.
The default number of returned search results is limited to 10. Using the
Take methods, you can override this and define the number of search results that should be returned in total, and on the search page with pagination.
Highlight search results
Highlighting of matching search keywords is helpful when evaluating search results. Highlights can be requested as part of projection expressions passed to the
Select method. You can also use Unified Search to register a highlighted excerpt for a specific document type.
Search in blocks
Blocks are smaller content items which can be added to a page, and reused on the website. Since blocks must be shown in page context, they do not have a URL and are not indexed by default. However, there are methods to achieve content area indexing, and to control the indexing of specific block types.
Filters and facets
Search requests are made up of queries and filters, where filtering is applied to narrow down search results. Facets are used for presenting aggregated data based on a search query. When searching a product catalog, you can for instance let the website visitor restrict results based on product types or price ranges. Facets can be used in combination with filters.
Best bets allow search administrators to promote selected content from the Optimizely Search & Navigation admin view. Bets bets appear at the top of the search results, as higher boosting is applied to them. You can add best bets through the
ApplyBestBets extension method using Unified Search, or by applying the method to indexed arbitrary types.
Synonyms are useful when you want the search to cover more phrases and return more relevant search hits. Also, visitors may use different terms to describe the same content. Add synonyms to search results via the
UsingSynonyms extension method.
A diacritic character is a symbol added to a letter, to change the sound-values of that letter, for example å, ä, ö. When submitting a free text search that contains diacritic characters, Optimizely Search & Navigation results include both the diacritic and non-diacritic versions of the same character. For instance, the free text search 'Ånge' returns Ange, Änge, etc. You can configure the search to return results that include only the submitted diacritic characters.
- When the Optimizely Search & Navigation index is created, include the language that includes the diacritic character (for example, Swedish).
- Add that language to the search query. For example:
Updated 29 days ago