Plugin: Query language - wildcard (truncation) support

Purpose

Use this plugin when you need to support wildcards (e.g. pic*) in your search.

This plugin can be used to add limited wildcard (truncation) support to user queries. It allows you to use the asterisk operator on the right-hand side (only) of words in a query. Each word that is followed by an asterisk will be internally expanded into a set of words that start with indicated word.

Funnelback has a deprecated truncation operator (*), which provided support for wildcards in queries when the search was configured to run in term at a time mode (when you have -daat=0 or -service_volume=low set as a query processor option). This plugin should be used instead of the deprecated query processing mode as many newer features within Funnelback do not work with the deprecated term at a time mode.

When to use this plugin

Use this plugin when you need to provide wildcard support in queries.

Once enabled, queries such as Dan* Smith or aus* directory pol* are accepted.

This provides an efficient way of supporting wildcards - however the expanded query won’t return all the matching results (compared to if a full expansion of the wildcard was performed). There is a fine balancing act between performance and completeness of the search result set and the goal of a web search engine such as Funnelback has always been to return a set of relevant results. This set isn’t necessarily complete as shortcuts are taken to determine relevant results quickly.

Details

This plugin uses the auto-completion service to expand any words that are followed by an asterisk operator in a query, with the maximum number of query terms to use for expansion value limiting the size of the expansion for each term.

The expanded queries can be seen by viewing the JSON or XML output and looking at the query/queryAsProcessed/queryRaw/querySystemRaw/queryCleaned values from the response packet. Expansions are injected into the querySystemRaw element.

Usage

Enable the plugin

  1. Select Plugins from the side navigation pane and click on the Query language - wildcard (truncation) support tile.

  2. From the Location section, select the results page to which you would like to enable this plugin from the Select a results page select list.

The plugin will take effect as soon as you finish running through the plugin setup steps.

Configuration settings

The configuration settings section is where you do most of the configuration for your plugin. The settings enable you to control how the plugin behaves.

The configuration key names below are only used if you are configuring this plugin manually. The configuration keys are set in the results page configuration to configure the plugin. When setting the keys manually you need to type in (or copy and paste) the key name and value.

Maximum number of query terms to use for expansion

Configuration key

plugin.query-wildcard-support.config.partial_query_expansion_index

Data type

integer

Default value

5

Required

This setting is optional

Use the first n suggestions returned from the index for the expanded query.

This plugin calls the auto-completion API to receive a set of suggestions to use for the expanded query.

Setting this to a higher value will result in a larger set of words to query (and potentially more search results). However, this may result in slower query response times.

Examples

This example shows how to increase the 'fuzziness' of the expansion, allowing each wildcard occurrence to be replaced with up to 6 terms.

To achieve this configure the plugin with:

Configuration key Value

Maximum number of query terms to use for expansion

6

Change log

[1.1.1]

Changed

  • Fixed a bug where the query returns nothing if the auto-completion indexes are missing.

[1.1.0]

Changed

  • Updated to the latest version plugin framework (Funnelback shared v16.20) to enable integration with the new plugin management dashboard.

[1.0.1]

Changed

  • Updated to use a custom isNumeric method as the org.jsoup.helper.StringUtil class was marked for internal use only in Jsoup v1.12.1.