Search in Mysql with FULLTEXT IN BOOLEAN MODE including keyword operators?

Asked

Viewed 329 times

0

How to make in BD Mysql, in an Innodb table with two fields indexed by FULLTEXT, a search is performed through the MATCH query (column1, column2) AGAINST('keyword' IN BOOLEAN MODE) including even the operators that are in the word to be searched?

Understand:

SELECT * FROM languages WHERE MATCH (title, body) AGAINST ('C++' IN BOOLEAN MODE);

Remembering that the sign of + is one of the operators that can be used in the word to be searched IN BOOLEAN MODE, as -, <, >, @, among others to obtain more extended results.

Therefore, the query of our above example fails, due to the word being C++, which is actually interpreted as a letter followed by two operators (C++).

I would like the search to ignore the operators but to perform the search with them IN BOOLEAN MODE, can not be IN NATURAL LANGUAGE, unless the natural language mode can bring even the 50% that are discarded from the search, that is, bring the result with all existing values as in boolean mode, without ignoring words that are too repetitive.

To complete the information and who knows how to elucidate other new ways to resolve the issue, the programming language that will implement the research process will be PHP and the word that should be searched will be loaded into a variable via POST (AJAX) after completing the user search field. Any other path that leads to the same result is also welcome!

  • Ingrid, I understand that it’s annoying sometimes to ask a question and not get answers (I have some like that too), but avoid adding comments off-topic in the body of the question. See it as an opportunity to improve your question, reread it, see if you can understand the text clearly yourself, and if you are sure that everything is fine, all that remains is to wait. Sometimes it’s not the question that’s bad, it’s because no one who mastered her subject could have seen her yet. Plus, patience, an hour someone answers you :)

  • @Diegof thank you for helping me! You did well to remove my last issue in the question, I’m really very anxious for the answer =)

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.