1

This example shows that only one fulltext index is needed. http://www.vionblog.com/mysql-full-text-search-with-multiple-words/

Here's the example:

ALTER TABLE products ADD FULLTEXT(title, sdescription, ldescription)

SELECT *,
MATCH(`title`) AGAINST ('+iphone +case +4s' IN BOOLEAN MODE) * 10 as rel1,
MATCH(`sdescription`) AGAINST ('+iphone +case +4s' IN BOOLEAN MODE) * 3 as rel2,
MATCH(`ldescription`) AGAINST ('+iphone +case +4s' IN BOOLEAN MODE) as rel3,
FROM products
WHERE MATCH (title, sdescription, ldescription) 
  AGAINST ('+iphone +case +4s' IN BOOLEAN MODE)
ORDER BY (rel1)+(rel2)+(rel3) DESC;

And this answer suggests that three fulltext indexes are needed to do the same. How can I manipulate MySQL fulltext search relevance to make one field more 'valuable' than another?

I want to make one column more valuable than others like it's been done in the above query. I'm confused how many indexes are needed for that, one or three?

Community
  • 1
  • 1
user3082321
  • 654
  • 5
  • 12

0 Answers0