<p>MySQL uses <a href="https://dev.mysql.com/doc/refman/8.0/en/fulltext-stopwords.html#fulltext-stopwords-stopwords-for-myisam-search-indexes" rel="nofollow noreferrer">a list of stopwords</a> when performing full-text searches. As you can see, <em>about</em> and <em>still</em> are in there... At the top of the page they say:</p>

<blockquote>
  <p>False hits or misses might occur for stopword lookups...</p>
</blockquote>

<p>I think this is the issue here. One way to get around it in your case is to add the below in your <code>config/general.php</code> (<a href="https://docs.craftcms.com/v3/config/config-settings.html#defaultsearchtermoptions" rel="nofollow noreferrer">docs</a>):</p>

<pre><code>'defaultSearchTermOptions' =&gt; [
    'subLeft' =&gt; true,
],
</code></pre>

<p>If the above helps, another thing you can try is to change the storage engine your <code>searchindex</code> table from MyISAM to InnoDB. That would allow you to remove what you've added in your <code>config/general.php</code> but would require you to have at least MySQL v5.6+.</p>

CC BY-SA 4.0
2020-01-05T17:45:03.630Z
MildlyGeeky in the discord server suggested defaultSearchTermOptions too. I tried that and saw no change, but this time it seems to fix it, so I guess you're right.

Thank you!
user2157969
CC BY-SA 4.0
2020-01-05T10:59:51.120Z
2020-01-05T10:59:51.120Z
Oli
<p>When I search for titles of entries in the Craft control panel, I get odd results:</p>

<p>I have an entry called <strong><em>Fake Story about the Economy</em></strong>. </p>

<p>If I search for that exact title, I get no results.</p>

<p>If I search for <strong><em>Fake Story about</em></strong>, I get no results.</p>

<p>If I search for <strong><em>Fake Story</em></strong>, the entry <strong><em>Fake Story about the Economy</em></strong> is returned.</p>

<p>If I search for <strong><em>Fake Story the Economy</em></strong>, the entry <strong><em>Fake Story about the Economy</em></strong> is returned.</p>

<p>The results are similar for other entries in that channel. For example, I have an entry called <strong><em>Is it still business as usual?</em></strong>. The only way I can find it is if I leave out the word <em>still</em> when I type it (<strong><em>Is it business as usual?</em></strong>).</p>

<p>Other channels seem to be working fine.</p>

<p>This is of course affecting my ability to build a working search form on the front end as well.</p>

<p>Craft 3.3.19</p>

<p>Thanks for any help.</p>

<craft3><search>
Craft's control panel search function returning inconsistent results
# Craft's control panel search function returning inconsistent results

(Asked by: username_0 on 2020-01-04)

When I search for titles of entries in the Craft control panel, I get odd results:

I have an entry called ***Fake Story about the Economy***.

If I search for that exact title, I get no results.

If I search for ***Fake Story about***, I get no results.

If I search for ***Fake Story***, the entry ***Fake Story about the Economy*** is returned.

If I search for ***Fake Story the Economy***, the entry ***Fake Story about the Economy*** is returned.

The results are similar for other entries in that channel. For example, I have an entry called ***Is it still business as usual?***. The only way I can find it is if I leave out the word *still* when I type it (***Is it business as usual?***).

Other channels seem to be working fine.

This is of course affecting my ability to build a working search form on the front end as well.

Craft 3.3.19

Thanks for any help.

**Tags:** craft3, search


---

## 1 answers

### Answer by username_1 on 2020-01-05. Score: 2 | Accepted answer

MySQL uses a list of stopwords when performing full-text searches. As you can see, about and still are in there... At the top of the page they say:

False hits or misses might occur for stopword lookups...

I think this is the issue here. One way to get around it in your case is to add the below in your config/general.php (docs):
'defaultSearchTermOptions' => [
    'subLeft' => true,
],

If the above helps, another thing you can try is to change the storage engine your searchindex table from MyISAM to InnoDB. That would allow you to remove what you've added in your config/general.php but would require you to have at least MySQL v5.6+.

> **Comments:**
> **username_0**: MildlyGeeky in the discord server suggested defaultSearchTermOptions too. I tried that and saw no change, but this time it seems to fix it, so I guess you're right.  Thank you!  

---

