MarseyWorld/sql/20221002-body-tsvector.sql

4 lines
193 B
MySQL
Raw Normal View History

2022-10-02 08:55:39 +00:00
ALTER TABLE public.comments ADD COLUMN body_ts tsvector
GENERATED ALWAYS AS (to_tsvector('english', body)) STORED;
CREATE INDEX comments_body_ts_idx ON public.comments USING GIN (body_ts);