MariaDB FULLTEXT search with short / mandatory words
FULLTEXT is imperfect.  You are doing the 'right thing' to analyze the data it this way.  Now switch from &quot;abc&quot; and &quot;def&quot; to strings that are realistic in your dataset.
Here are a couple of tricks that I have used reasonably successfully.

Put a + in front of long words, don't put a + in front of short words.

Use this combo to check for things that need LIKE (or RLIKE) but desire the speed of FULLTEXT:
  WHERE MATCH(text) AGAINST ('abc def IN BOOLEAN MODE')
    AND text LIKE '%abc+def%'



That is, use FT to find rows with the &quot;words&quot;, then use LIKE to make sure they are adjacent and/or contain certain punctuation.