What is the maximum possible value range of MATCH ('...' IN NATURAL LANGUAGE MODE) in MySQL?
Asked Answered
M

1

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.

Mcconaghy answered 20/4, 2013 at 0:54 Comment(2)
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.Pink
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.Gonorrhea
T
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.

Tong answered 21/2, 2017 at 12:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.