V
V
Vadim Ivanenko2015-05-18 17:00:37
Algorithms
Vadim Ivanenko, 2015-05-18 17:00:37

What search and comparison logic should be used for auto-completion and how to optimize the database?

I create two API services:
1) Administrative-territorial unit (region, city, street)
2) Directory of organizations (user's place of work). The Organization table has the structure {reduction, fullname}
They are used in the Web application. The user needs an asynchronous auto-completion feature when filling in the appropriate fields.
Currently LIKE (substring entry) is used.
What behavior would be more convenient for the user and how to implement it?
Maybe split the input substring on spaces, punctuation marks, and look for an occurrence of each element of the substring...
What is the best way to do this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
_
_ _, 2015-05-18
@supra7sky

It is best to use a special tool like Sphinx or ElasticSearch

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question