This scenario shows how adding a relevance ranking module can change the order of the returned records.
This example, which is somewhat more realistically scaled, uses a wine data set. It demonstrates how relevance ranking can affect the results displayed to your users.
In this scenario, we use the thesaurus and relevance ranking features to enable end users’ access to Flavor results similar to the one they searched on, while still seeing exact matches first.
<THESAURUS> <THESAURUS_ENTRY> <THESAURUS_FORM>cab</THESAURUS_FORM> <THESAURUS_FORM>cabernet</THESAURUS_FORM> </THESAURUS_ENTRY> <THESAURUS_ENTRY> <THESAURUS_FORM>cinnamon</THESAURUS_FORM> <THESAURUS_FORM>spice</THESAURUS_FORM> <THESAURUS_FORM>nutmeg</THESAURUS_FORM> </THESAURUS_ENTRY> <THESAURUS_ENTRY> <THESAURUS_FORM>tangy</THESAURUS_FORM> <THESAURUS_FORM>tart</THESAURUS_FORM> <THESAURUS_FORM>sour</THESAURUS_FORM> <THESAURUS_FORM>vinegary</THESAURUS_FORM> </THESAURUS_ENTRY> <THESAURUS_ENTRY> <THESAURUS_FORM>dusty</THESAURUS_FORM> <THESAURUS_FORM>earthy</THESAURUS_FORM> </THESAURUS_ENTRY> </THESAURUS>
Before applying these thesaurus equivalencies, if we search on the Dusty flavor, 83 records are returned, and if we search on the Earthy flavor, 3,814 records are returned.
Wine (by order returned) | Relevant attribute |
---|---|
A Tribute Sonoma Mountain | Earthy |
Against the Wall California | Earthy |
Aglianico Irpinia Rubrato | Dusty |
Aglianico Sannio | Earthy |
Because the application is sorting on Name in ascending order, the Dusty and Earthy results are intermingled. That is, the first two results are for Earthy and the third is for Dusty, even though we searched on Dusty, because the two Earthy records came before the Dusty one when the records were sorted in alphabetical order.
Wine (by order returned) | Relevant attribute |
---|---|
Aglianico Irpinia Rubrato | Dusty |
Bandol Cuvee Speciale La Miguoa | Dusty |
Beaujolais-Villages Reserve du Chateau de Montmelas | Dusty |
Beauzeaux Winemaker’s Collection Napa Valley | Dusty |
With the Interpreted ranking strategy, the results are different. When we search on Dusty, we see the records that matched for Dusty sorted in alphabetical order, followed by those that matched for Earthy. The wine Aglianico Irpinia Rubrato, which was returned third in the previous example, is now returned first.