{"id":279,"date":"2021-11-21T17:27:59","date_gmt":"2021-11-21T17:27:59","guid":{"rendered":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/?p=279"},"modified":"2021-11-22T09:53:54","modified_gmt":"2021-11-22T09:53:54","slug":"match-against-in-boolean-mode","status":"publish","type":"post","link":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/2021\/11\/21\/match-against-in-boolean-mode\/","title":{"rendered":"MATCH&#8230;AGAINST in Boolean mode"},"content":{"rendered":"\n<p>If you wish to give your MATCH\u2026AGAINST queries even more power, use Boolean mode. This changes the effect of the standard FULLTEXT query so that it searches for any combination of search words, instead of requiring all search words to be in the text. The presence of a single word in a column causes the search to return the row. Boolean mode also allows you to preface search words with a + or &#8211; sign to indicate<br>whether they must be included or excluded. If normal Boolean mode says, \u201cAny of these words will do,\u201d a plus sign means, \u201cThis word must be present; otherwise, don\u2019t return the row.\u201d A minus sign means, \u201cThis word must not be present; its presence disqualifies the row from being returned.\u201d<\/p>\n\n\n\n<p>The first asks for all rows containing the word suosikkia and not the word Aro to be returned. The second uses double quotes to request that all rows containing the exact phrase origin of be returned.<\/p>\n\n\n\n<p>SELECT author,title FROM classics<br>WHERE MATCH(author,title)<br>AGAINST(&#8216;+suosikkia -Aro&#8217; IN BOOLEAN MODE);<br>SELECT author,title FROM classics<br>WHERE MATCH(author,title)<br>AGAINST(&#8216;kaikki parhaat&#8217; IN BOOLEAN MODE);<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you wish to give your MATCH\u2026AGAINST queries even more power, use Boolean mode. This changes the effect of the standard FULLTEXT query so that it searches for any combination of search words, instead of requiring all search words to be in the text. The presence of a single word in a column causes the &hellip; <a href=\"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/2021\/11\/21\/match-against-in-boolean-mode\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">MATCH&#8230;AGAINST in Boolean mode<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/279"}],"collection":[{"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=279"}],"version-history":[{"count":2,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/279\/revisions"}],"predecessor-version":[{"id":309,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/279\/revisions\/309"}],"wp:attachment":[{"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=279"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=279"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=279"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}