14

MySQL provides FULLTEXT indexes, that can be retrieved with the MATCH (col1,col2,...) AGAINST (expr [search_modifier]) construct. There are several Full-Text Search variants, one of them (and the default one) is the Natural Language Full-Text Search.

So what is the maximal possible value of the MATCH ('...' IN NATURAL LANGUAGE MODE)?


Example:

This query

SELECT
    courses.id,
    courses.title,
    MATCH (coursedata.title) AGAINST ('Basketball') AS relevance
FROM
    courses
JOIN
    coursedata ON coursedata.id = courses.coursedata_id
WHERE
    MATCH (coursedata.title) AGAINST ('Basketball') > 0

returns a result table with column relevance, where we're storing the relevance value of coursedata.title rows for 'Basketball'. Or the relevance value of 'Basketball' for coursedata.title rows? Anyway, we're storing there the output of the MATCH(...) function. In my case I'm geting values from 0 to 3.695953130722046.

automatix
  • 14,018
  • 26
  • 105
  • 230
  • You may have a real question here, but as it stands the question is too vague to be addressed. Consider editing it to more clearly ask a specific question. – Pieter Geerkens Apr 20 '13 at 03:58
  • 1
    Every couple of years I try to Google the answer to this and I never get anywhere. My guess is that there is no theoretical maximum, since it is generally related to the number of matches found, as well as the length of the column(s) being searched and the length of the search expression. It's too bad, because if it was guaranteed to be between 0 and 100 (with 100 being a perfect match) then the number would be meaningful on an absolute scale. – kmoser Nov 28 '16 at 07:48

1 Answers1

1

There is not really a small limit for the possibilities of your query output. So instead of reaching that huge limit, you will freeze down your MySQL / your network.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
gyurix
  • 1,106
  • 9
  • 23