Primo's Did You Mean index is based on the Levenshtein distance, which is the distance between two words using a minimum number of single-character edits (such as insertions, deletions, or substitutions) to change a word into the other word. Primo builds the Did You Mean index (which has and edit distance of a single character) from the regular titles index. Ex Libris recommends that you update this index on a weekly basis using the Primo Scheduler in the Back Office.
Primo invokes the Did You Mean algorithm on single and multiple word queries and returns a single Did You Mean suggestion per query.
Changes to the Did You Mean configuration files have no effect on the results returned from remote searches, Primo Central, or any other deep search adaptor.
The Did You Mean Algorithm
A Did You Mean link does not automatically display in the Front End when the user performs a search. A threshold must be met before Primo invokes the Did You Mean function. Primo will display a Did You Mean suggestion only when a query returns less results than specified for the threshold, which is defined with the didyoumean_threshold/res_threshold parameter in the search_schema.xml file. The default threshold value is 50.
In addition to this threshold, Primo checks the query terms against a dictionary and invokes the Did You Mean function if a term is found to be incorrect. If the query is a phrase, the function replaces only incorrect terms in the Did You Mean suggestion.
The Did You Mean algorithm works separately on every term within the query.
If a search query returns less than 50 results, the Did You Mean algorithm performs the following:
Primo searches for a match in the Did You Mean index. Several candidates are checked and the highest-ranking result is used. The frequency of the term in the index is one of the factors in the ranking. If the corrected query returns enough results, it will be displayed.
Disabling the Did You Mean Feature
Primo provides the following methods to disable the Did You Mean feature:
- Do not create the Did You Mean index.
- Configure the following parameters in the Did You Mean section on the Advanced Configuration > Search Engine Configuration page and then deploy the Search Engine Configuration option on the Deploy All page:
- Set the Maximum Results for Did You Mean parameter to -1.
- Clear the Use Rank Threshold check box.
The above parameters can be defined per institution.