diff options
| author | PrivateGER <privateger@privateger.me> | 2025-02-19 14:55:50 +0100 |
|---|---|---|
| committer | PrivateGER <privateger@privateger.me> | 2025-02-19 14:55:50 +0100 |
| commit | d82c8e8e971d1e563dd93c6f8dea6edcba2337ae (patch) | |
| tree | d2ee64e4cb9698de4aeb9b271cf5977fd566ff77 /.config | |
| parent | merge: Add separate redis for rate limit (!908) (diff) | |
| download | sharkey-d82c8e8e971d1e563dd93c6f8dea6edcba2337ae.tar.gz sharkey-d82c8e8e971d1e563dd93c6f8dea6edcba2337ae.tar.bz2 sharkey-d82c8e8e971d1e563dd93c6f8dea6edcba2337ae.zip | |
Implement tsvector search support
Diffstat (limited to '.config')
| -rw-r--r-- | .config/example.yml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/.config/example.yml b/.config/example.yml index 07c613f62d..297f794324 100644 --- a/.config/example.yml +++ b/.config/example.yml @@ -222,6 +222,14 @@ fulltextSearch: # You need to install pgroonga and configure it as a PostgreSQL extension. # In addition to the above, you need to create a pgroonga index on the text column of the note table. # see: https://pgroonga.github.io/tutorial/ + # - tsvector + # Use Postgres tsvectors. + # You need to create a generated column and index on the note table to use this, followed by an ANALYZE on the table. Beware, this will take a while to be created and the database will remain locked during this process. + # This also enables advanced search syntax, see documentation of websearch_to_tsquery: https://www.postgresql.org/docs/current/textsearch-controls.html#TEXTSEARCH-PARSING-QUERIES + # Support for non-English languages is currently rather poor and will be improved once post languages become a feature. + # ALTER TABLE note ADD COLUMN tsvector_embedding tsvector GENERATED ALWAYS AS ( to_tsvector('english', COALESCE(text, '') || ' ' || COALESCE(cw, '') || ' ' || COALESCE(name, ''))) STORED; + # CREATE INDEX vector_idx ON note USING GIN (tsvector_embedding); + # ANALYZE note; # - meilisearch # Use Meilisearch. # You need to install Meilisearch and configure. |