Skip to content
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

PostgreSQL built in functions instead of Elasticsearch? #1

Open
jhannah opened this issue Aug 1, 2018 · 1 comment
Open

PostgreSQL built in functions instead of Elasticsearch? #1

jhannah opened this issue Aug 1, 2018 · 1 comment

Comments

@jhannah
Copy link
Member

jhannah commented Aug 1, 2018

aleclarsen wrote: I'm not sure how fast you need it to be and what your feature requirements are, but assuming you just want to find records with fuzzy matching, I've had a lot of luck with Postgres's builtin functions.
https://www.postgresql.org/docs/current/static/fuzzystrmatch.html#AEN177521
https://www.postgresql.org/docs/current/static/pgtrgm.html
https://www.postgresql.org/docs/current/static/textsearch-intro.html

I think for that you want to add a trigram column with a gin index
That's not even fuzzy. You just want words that start with the same thing

@alecdotninja
Copy link

Again, I don't really know anything about the requirements, but here is a SQLFiddle with an example using the data that @jhannah mentioned in MWDC.

http://sqlfiddle.com/#!17/4c56c/2/0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants