Skip to content

Enable FTS5 Porter stemmer for skill search #43

@Aaronontheweb

Description

@Aaronontheweb

Problem

The current FTS5 full-text search does not apply stemming, so queries like "closed deals" return zero results even though close-deal exists with description "Mark a Phobos or Support deal as won..."

Tested against live instance with Netclaw.SkillClient:

Query Results
"closed deals" None
"close deal" close-deal
"close" close-deal
"closing" Likely none (untested, same root)

Users naturally search with inflected forms ("closed", "closing", "deals") that don't exact-match the indexed tokens.

Proposal

Enable the FTS5 Porter tokenizer on the skills_fts virtual table. This normalizes tokens to their root form, so "closed", "closing", "close" all match.

Change in DatabaseInitializer.cs — the FTS5 table creation:

-- Before
CREATE VIRTUAL TABLE IF NOT EXISTS skills_fts USING fts5(name, description, category);

-- After
CREATE VIRTUAL TABLE IF NOT EXISTS skills_fts USING fts5(name, description, category, tokenize='porter unicode61');

The porter unicode61 tokenizer applies Porter stemming on top of Unicode tokenization. This is a one-line change but requires rebuilding the FTS table (drop + recreate, or a migration).

Impact

This would make skill discovery significantly more natural for both human users and LLM agents searching the feed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions