Skip to content

Implement stemmers - #22

Merged
piki merged 2 commits into
mainfrom
feature/stemming
Oct 7, 2026
Merged

piki merged 2 commits into
mainfrom
feature/stemming

Conversation

@piki

@piki piki commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

This implements the stemmer feature from TIN v1.0.4. Remember to DROP EXTENSION tin CASCASDE ; CREATE EXTENSION tin, or at least update the extension and rebuild all your full-text indexes.

tin=# CREATE INDEX docs_body_tin ON docs USING tin (body) WITH (stemmer = 'en');
CREATE INDEX
tin=# select * from docs;
 id |  body
----+---------
  1 | mold
  2 | moldy
  3 | Molding
  4 | beer
  5 | run
  6 | runs
  7 | Running
(7 rows)

tin=# select * from docs where body ==> 'molDy';
 id | body
----+-------
  2 | moldy
(1 row)

tin=# select * from docs where body ==> 'molded';
 id |  body
----+---------
  1 | mold
  3 | Molding

Closes #16

piki added 2 commits October 6, 2026 17:57
This commit hooks `get_relation_info_hook` to decorate any string literals
on the right side of `==>`, even in `ANY(...)`, with information about the
index so stemming matches, `tin.score`, and `tin.highlight` know which
index to use.
@piki
piki added this pull request to stack #24 October 7, 2026 04:23
@piki
piki merged commit 4c195f5 into main Oct 7, 2026
4 checks passed
@piki
piki deleted the feature/stemming branch October 7, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support the stemmer index option

2 participants