PrefixTermMatcher#

class PrefixTermMatcher(*args, **kwds)#

prefix_match | Perform (phrase) prefix term matching on specified fields, enforces 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 (Optional[bool])

  • slop (Optional[int])

  • text (Optional[str])

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