Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The reason why row 1 does not come back is that negative action (like exclude) overtakes positive action (like include). <s>It common practice in security for example, where <code>DENIED</code> permission has priority over <code>ALLOW</code> or <code>GRANT</code> permission action.</s></p> <p>From MySQL <a href="http://dev.mysql.com/doc//refman/5.5/en/fulltext-boolean.html" rel="nofollow">12.9.2. Boolean Full-Text Searches</a>:</p> <blockquote> <p>Note: The - operator acts only to exclude rows that are otherwise matched by other search terms. Thus, a boolean-mode search that contains only terms preceded by - returns an empty result. It does not return “all rows except those containing any of the excluded terms.”</p> </blockquote> <p>Hence any query like:</p> <pre><code> ... AGAINST('+Any_string -"any_string"' IN BOOLEAN MODE) </code></pre> <p>will yield nothing. </p> <p>UPDATE</p> <p><code>-"non auto"</code> blocks "auto" from appearing in search results, because <code>non</code> is a stopword and is excluded from search string. Another reason for this word to be excluded from search in <code>BOOLEAN MODE</code> is that it is too short:</p> <blockquote> <p>If the phrase contains no words that are in the index, the result is empty. For example, if all words are either stopwords or shorter than the minimum length of indexed words, the result is empty. </p> </blockquote> <p><strong>UPDATE 2</strong></p> <p>I would stick to my explaination above. Although it is not something yuo would expect. It looks as double quotes with minus sign as in <code>-"term1 term2"</code> are interpreted as <code>()</code> - parentheses, not doubble qoutes.</p> <p>This query returns nothing, although I expect to see rows like <code>2011-12 Fleer Retro auto jordan non</code> and <code>1999 jordan non auto</code>. It has nothing to do with stopwords.</p> <pre><code>SELECT auction_id,`name` FROM auctions WHERE MATCH(`name`) AGAINST('+jordan +auto -"jordan auto"' IN BOOLEAN MODE); </code></pre> <p>Also there is a <strong>related bug</strong> #36384: <a href="http://bugs.mysql.com/bug.php?id=36384" rel="nofollow">Full-Text required (+) operator bug</a>. It supports my hypothesis, that parsing of full-text search expressions may not work as expected.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload