Query blending
Background
Query blending generates and runs multiple variants of a query which are then blended into a single result set. Query blending can be performed based on a number of sources as defined in the -qsup
query processor option. This file defines the blending rules to be applied.
Query blending sources
Query blending sources are configured by setting the -qsup
query processor option.
A weighting (ranging from 0 to 1) is also defined when configuring the query blending sources.
Source | qsup option | Description |
---|---|---|
Spelling suggestions | SPEL | Blend with suggestions returned from the spelling suggestion system |
US/UK spelling differences | USUK | Blend with US/UK spelling variants (eg. authorise and authorize) |
Synonyms | SYNS | Blend with user-defined synonyms as defined in the blending.cfg . |
Word decompounding | LANG | (Experimental) Blend with decompounded word forms (mostly for German language sites) |
e.g.
-qsup=SPEL/0.9+USUK/0.4+SYNS/0.1+LANG/0.1
Synonyms query blending source
A blending.cfg can be created within a profile folder and used for the synonyms (SYNS
) blending source.
Presenting a message in the search interface
When using a Freemarker template the <@fb.CheckBlending>
macro can be used to provide information to the user that blending has occurred. This is included in the default template:
<#if (response.resultPacket.QSups)!?size gt 0>
<div class="alert alert-info">
<@fb.CheckBlending linkText="Search for <em>"+question.originalQuery+"</em> instead." tag="strong" />
</div>
</#if>
Data model
Supplemental queries as generated by query blending are returned in the data model within the response.resultPacket.QSups
element.