Module: Huginn::Searchable::Fuzzy

Defined in:
lib/huginn/searchable/fuzzy.rb

Overview

Builds an Arel predicate for a single searchable column.

Strategy chain (driven by Huginn.configuration.search_strategy):

:pg_trgm   -> trigram similarity (%) OR unaccent+ILIKE (best for typos).
            Both branches are supported by a gin_trgm_ops GIN index
            on UNACCENT(col); the index is used only when it exists.
:full_text -> PostgreSQL full text search: to_tsvector(col) @@
            plainto_tsquery(term), so morphological variants match;
            needs the IMMUTABLE fts_function wrapper and a GIN
            tsvector index. Effective with a single strategy or
            combined with :pg_trgm (OR).
:unaccent  -> unaccent + ILIKE (case/accents insensitive)
:simple    -> plain LIKE

Defined Under Namespace

Modules: Unaccentable Classes: FullText, Simple, Trigram, Unaccent