You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is a known fact that using LIKE and ILIKE queries all of rows are scanned in the table. Compared to using Trigram (pg extension) instead of sequentially scanning all of the rows in the document, only the gin index is scanned which is at least 100X faster.
We are in much need of a performant full text search and I would be happy to implement it if some maintainer can share some clues on which classes to look into.
It is a known fact that using LIKE and ILIKE queries all of rows are scanned in the table. Compared to using Trigram (pg extension) instead of sequentially scanning all of the rows in the document, only the gin index is scanned which is at least 100X faster.
https://mazeez.dev/posts/pg-trgm-similarity-search-and-fast-like
Related to this is Ransack
*_matches
(and others) which internally uses these LIKE queries https://activerecord-hackery.github.io/ransack/getting-started/search-matches/So my question is, is there a way to override the Ransack matchers to use Similarity function
similarity('your-search-term')
instead ofLIKE
?The text was updated successfully, but these errors were encountered: