-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support fulltext search using indexes in PostgreSQL #10386
Comments
An example for index usage in PostgreSQL is in #8950 (comment) |
Can someone share why these extensions are necessary? I'm surprised that adding the index: CREATE INDEX book_content_index ON "Book" USING GIN (to_tsvector('english', "content")); Doesn't just work. In my testing: explain SELECT "public"."Book"."id", "public"."Book"."title", "public"."Book"."content" FROM "public"."Book" WHERE to_tsvector("public"."Book"."content") @@ to_tsquery('great') OFFSET 0 It looks like it still does a sequential scan (1-by-1):
|
I think it's because you are using The query should be EXPLAIN
SELECT
"public"."Book"."id",
"public"."Book"."title",
"public"."Book"."content"
FROM
"public"."Book"
WHERE
to_tsvector('english', "public"."Book"."content") @@ to_tsquery('great')
OFFSET 0 That's also why (here) I added a point about language being dynamic in |
It worked! Beautiful @AzSiAz! Took my query (above) from 9s to 280ms.
We'll take a look at your original issue, thanks again! |
Hello everyone 👋 We are starting design work to improve Prisma's support for Full Text Search (FTS)! If you would like to help, please tell us about your needs via a short FTS user research survey. Thank you! |
@floelhoeffel , I think Django ORM handles FTS very well. And Django is used by big companies, it can be good to get inspiration from its ORM code source. |
Any updates here? Or is there a timeline to when this FTS feature will be completed? |
Time line guys? Come on it’s been 2 years. Where can we find the timeline for indexes on fts |
Generally GIN indexes (and similar) can already be configured via |
Flipping my whole database to MySQL because of this. |
This requires some ts_vector magic.
The text was updated successfully, but these errors were encountered: