HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunitySubmit a ticketLog In
GitHubNuGetDev CommunitySubmit a ticket

Related queries

Describes how to create related queries in Optimizely Search & Navigation .

You can use related queries to help visitors find relevant content based on a search query. For example, if someone enters Optimizely is grate,DidYouMean returns Optimizely is great because previously, most people who entered Optimizely is grate and got no results, then entered Optimizely is great and got results.

To get related queries for a search query, use the DidYouMean method of StatisticsClient in namespace:

var results = client.Statistics().DidYouMean("Beethoven");

The "Did you mean?" feature aggregates consecutive queries. For "Did you mean?" to work, the following conditions must exist.

  • The queries should occur within 60 seconds of each other.
  • After submitting the first query, there was no click in the results list.


    Complication if not tracking clicks

    The second condition above involves tracking clicks. If you do not track clicks, that requirement is always true so might present accuracy issues. However, if you are using unified search and Track() for tracking, click tracking is done automatically.

  • The queries are not identical.
  • Terms in the second query occur in at least one indexed document.