I would like to use the position / index found in Match ... Against the full-text search in mysql to return the text before and after the match in the field. Is it possible? In all the examples I've seen, Match ... Against returns the score in select instead of the location or position in the text field in which the search is being performed.
SELECT random_field, MATCH ($search_fields) AGAINST ('".mysql_real_escape_string(trim($keywords))."' IN BOOLEAN MODE) AS score FROM indexed_sites WHERE MATCH ($search_fields) AGAINST ('".mysql_real_escape_string($keywords)."' IN BOOLEAN MODE) ORDER BY score DESC;
This will give me a field and an estimate ... but I would like the index / position to be evaluated instead (or along).
source share