[questions][feat] add text search (#412)
parent
7589e9b078
commit
f70caba3f2
@ -0,0 +1,8 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "QuestionsQuestion" ADD COLUMN "contentSearch" TSVECTOR
|
||||
GENERATED ALWAYS AS
|
||||
to_tsvector('english', coalesce(content, ''))
|
||||
STORED;
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "QuestionsQuestion_contentSearch_idx" ON "QuestionsQuestion" USING GIN("textSearch");
|
Loading…
Reference in new issue