MySQL Boolean Full-Text Searches: Change Default Operator to "and"

(no operator)

By default (when neither + nor - is specified) the word is optional


How can I change this behavior to:

(no operator)

All words are required -> logical AND search


Example:

https://dev.mysql.com/doc/refman/5.0/en/fulltext-boolean.html

SELECT * FROM articles WHERE MATCH (title) AGAINST ('MySQL Tricks' IN BOOLEAN MODE);

should only find id 4,

Thanks,

Answers


SELECT * FROM articles
    WHERE MATCH (title) AGAINST ('+MySQL +Tricks' IN BOOLEAN MODE);

Note the + prefix on each word that is 'required'. The '+' is not a 'binary operator'.


Need Your Help

Determining the type of Matrix in OpenCV

c++ image-processing opencv matrix

I'm trying to index a 3 channel image in opencv.

How to Reload the wicked pdf.rb which is present in app-> config-> initializer-> wicked_pdf.rb file, without restarting the server in rails 2

ruby-on-rails wkhtmltopdf ruby-on-rails-2 wicked-pdf

I have made changes in one of my plugin to customize the header and footer for pdf reports, so I am changing the contents of file wicked_pdf.rb to