Skip to content

Search: find other word forms without a manual prefix #92

Done

Description

@neoromantic

The search index uses the unicode61 tokenizer without stemming, so квартира doesn't find квартиру and meeting doesn't find meetings. After #84, a prefix (квартир*) works by hand, but users and agents have to know to use it.

Options to compare on the #80 benchmark (index size, write rate, query time, result quality on Russian and English):

  1. Add a prefix to each plain word automatically (--forms, or by default), maybe with FTS5 prefix= indexes to keep it fast.
  2. A second trigram index for substring search in any language; bigger index.
  3. Stem the text in tg before indexing (the index is contentless, so it can hold stemmed tokens) with a Russian and English stemmer in JavaScript, and stem the query the same way.

Done when the benchmark compares the options, one is picked in docs/storage.md, and tg messages search finds other word forms of a Russian and an English word in an e2e test. Depends on #80 and on background migrations (#89) for the index rebuild.

Activity

  1. added
    enhancement
    on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions