PrefixTermMatcher#

class PrefixTermMatcher#

prefix_match | Perform (phrase) prefix term matching on the specified fields, enforce phrase matching considering term-order (optionally) and phrase-slop. Can be also used as a simple implementation of typeahead functionality on text fields.

pydantic model PluginConfig#
Fields:
  • fields (str)

  • in_order (bool | None)

  • min_token_length (int)

  • slop (int | None)

  • text (str | None)

PluginConfig.plugin_name: ClassVar[str] = 'prefix_match'#

Used to register and reference the plugin within a query.

field PluginConfig.text: Optional[str] = ''#

Text to be used for fuzzy search

field PluginConfig.in_order: Optional[bool] = True#

If text terms have to be matched in-order or not

field PluginConfig.slop: Optional[int] = 1#

Specifies the amount of unrelated terms that are allowed to be found within the matched terms (phrase slop / term proximity).

field PluginConfig.fields: str = 'body'#

Comma separated list of searchable fields

field PluginConfig.min_token_length: int = 2#

Only query tokens which are longer than ‘min_token_length’ are considered for prefix matching