Your problem is with creating a priority logical query, and for this type of query you need to go deeper into the Boolean search and now how the Boolean search is performed. In simple words, let me explain to you why the second result of the result is shown.
Once you have to first understand what Boolean means in programming? This means that either the condition is true or false i, e 0 - 1.
Now let me explain if a Boolean search is being performed? You gave two words. Let's search line by line in boolean mode. The search engine starts and searches line by line, where the first word is ever found, it makes the record true and gives a score of 1 for the lines in which the first word is found, and also prepares the number of words found in the line.
Now it moves the next word and performs the same process as the True record, and makes a list of records wherever the word is, and also prepares the number of words found in the line.
Now there are two lines of results that are available, and they are grouped and priority is given to words with the maximum number of words and lines, this is the main problem.
Example
First →> shared number. → Second → total. →> Final → line
Word →> Results → Word → → words →> Results → none → Answer
1 → → → → 2 → → → → 1 → → → →> 1 → → → → 1.33 → → 1 →> 1.33
0 → → → → 0 → → → → 2 → → → →> 2 → → → → 1.25 → → 2 →> 1.25
0 → → → → 0 → → → → 1 → → → →> 0 → → → → 1.25 → → 3 →> 1
While clubs with two result lists, when true is added with false, the result is true, as if you added 1 + 0 = 1, and the results should have a value greater than 1. Thus, taking away the relevance of the words found, it always found that the search engine shows the results in which a word was found.
The relevance queries are performed in two types or ignore ratings that are equal to one, but only calculations in records that score greater than 1. The second is to make such a query so that it never shows records equal to one, As in your case, you can so that the following things also get the correct results for two words:
SELECT *, ( (1.3 * (MATCH(title) AGAINST ('+term +term2' IN BOOLEAN MODE))) + (0.6 * (MATCH(text) AGAINST ('+term +term2' IN BOOLEAN MODE))) ) AS score FROM results WHERE ( MATCH(title, text) AGAINST ('+term +term2' IN BOOLEAN MODE) ) HAVING relevance > 0 ORDER BY relevance DESC;
I know that using the word HAVING makes the query slow, but there is no other solution available. Hope this solves your request.