This topic explains how to create related queries in Optimizely Search & Navigation .
How it works
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, the majority of 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 is the aggregation of consecutive queries. In order for "Did you mean?" to work, the following conditions must exist.
- The queries should occur within 60 seconds of each other.
- After the first query was submitted, there was no click in the results list. See Complication if not tracking clicks.
- The queries are not identical.
- All terms in the second query occur in at least one indexed document.
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.
Last updated: Oct 31, 2016