Skip to content
Cody Gray edited this page Sep 5, 2024 · 3 revisions

Q: Why is search broken?

A: It's not.

A change was made to the MS search, changing its behavior.

In the past, if one searched aaa bbb, MS would return posts containing exactly aaa bbb. However, we are now using FULLTEXT index, and MS will return posts containing word aaa or bbb. Think of it like Google: When you Google best spam in stackexchange, Google may return best spam posted on stackexchange. If a post only contains the word aaab but neither aaa nor bbb, it will not be returned, even though aaab contains aaa.

Furthermore, there is a limitation of MySQL. A significant proportion of our corpus of posts includes special characters and non-ASCII text (in particular, CJK [Chinese, Japanese, Korean] text). MySQL is unable to parse these in a FULLTEXT index, which is what search uses for the "body" field by default.

Q: What's the LIKE checkbox for?

A: See above answer.

The LIKE checkbox is there if you want the old MS search behaviour back. You can use this to ask MySQL to use a LIKE operator instead of searching by FULLTEXT index. When you are validating a watch/blacklist rule, you should probably check this (or the "regex" checkbox). Bear in mind that your search query will execute significantly more slowly.