Answer the question
In order to leave comments, you need to log in
How to implement a good full-text search on the site?
Now the site uses the following search code code:
OrgModel::whereRaw(
"MATCH(name_org,description,tags) AGAINST(? IN BOOLEAN MODE)",
array($string)
)
Answer the question
In order to leave comments, you need to log in
Read the query language help.
In this case, a search with quotation marks "shop #9" will give an exact match.
This can be sewn into the request, or you can write a hint to the user.
But you will not get a good search from the basic functionality.
If you need a simple search string, then probably the laziest option is Yandex.Search. At least everything is ok with morphology. The only problem is that it searches only for the indexed one.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question