M
M
Messi2018-09-26 17:44:57
MySQL
Messi, 2018-09-26 17:44:57

Implementing full text search?

Hello! Tell me, please, if someone has a similar experience in completing the task:
There is a site with a database of a couple of thousand records. It is necessary to implement a search throughout the site (by title, description).
How to implement it correctly in yii2 + mysql?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
G
grinat, 2018-09-26
@FitTech

Yes, for 2k rows, you can safely use https://dev.mysql.com/doc/refman/8.0/en/fulltext-s... the only thing is that it is slightly inadequate. But this concerns any engine for full-text search, without a file they do not always adequately work out. If you take elastic, then you need to keep in mind that starting from the 5th version, in my opinion, they have changed their api a lot and googled examples will not work, and their documentation is not very good. Svinks has been stupidly outdated for a long time, dragging him is like writing in php4

G
good_beginer, 2018-09-26
@good_beginer

Let's start with the fact that the search is not on the site, but on the database, the structure is like this... you make a query to the database, but instead of fittings you insert different $ vars, which then, through the post\get, take over what is written in the search line and display the result, this is the simplest scenario of all possible but in my opinion quite effective, if I understand you correctly

D
Dmitry, 2018-09-26
@slo_nik

Good afternoon.
times .
Two .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question