Q
Q
Quilfe2014-08-30 14:42:20
MySQL
Quilfe, 2014-08-30 14:42:20

Is there a facility for fuzzy searching through rows in a database (Postgres or MySQL)?

I am looking for some tool installed in the database (Postgres or MySQL) that allows fuzzy search, for example, to find records that differ from the entered string by no more than 2 (by the Levenshtein distance). It is desirable that an index be built on the server side, which would allow such a search to be carried out quickly.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
K
kolpak, 2014-09-09
@Quilfe

pg_trgm ?

A
Alexander, 2014-08-30
@syschel

Usually search engines are used. For example
sphinx (used on Habré ) solr Elasticsearch Xapian Whoosh

W
whats, 2014-11-21
@whats

Postgres has a built-in full-text search that can do this, which is no slower than the sphinx.

C
Carry, 2014-08-31
@carryx

such a search is also called n-gram search
I have been in mysql for a very long time (considering the search features, it was worth expecting)
There is an example in PostgreSQL - it seems
to me that Sphinx will be faster

X
xmoonlight, 2016-02-10
@xmoonlight

How to determine the similarity of two strings?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question