N
N
Nurdaulet Maksutov2021-12-18 12:43:06
PHP
Nurdaulet Maksutov, 2021-12-18 12:43:06

Good php search by sqlite database?

There is a database (sqlite). And there are 25 thousand records. The name of the music and the text of the song for the telegram bot are stored. The bot itself is written in php. There search, type LIKE %%.

I looked at the logs there, people write the name of the music several times. Are there any normal search engines to work when there are minor errors in the query.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Danny Arty, 2021-12-18
@DanArst

In such cases, IMHO, you should implement a phonetic search. Here is an article on Habré .
The dmstring function using the Daitch - Mokotoff Soundex phonetic algorithm will modify the search query into code. Examples from a post on Habré:

dmstring('Арнольд Шварцнеггер') == dmstring('Arnold Schwarzenegger') == 096830 479465
dmstring('Орнольд Шворцнегир') == dmstring('Arnold Schwarzenegger') == 096830 479465

Those. given that the requests are written differently, the phonetic code of both is the same. Here you will search for this code.

R
Roman Mirilaczvili, 2021-12-19
@2ord

SQLite supports full text search.
Getting Started with SQLite Full-text Search

A
Andrey Rudakov, 2021-12-19
@DEMETRA-WORK

It is not recommended to implement full-text search on MySQL
. For this, ElasticSearch and the like are more suitable.
It is better to immediately study this technology, since then when there are a lot of records, the search will become slow.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question