Not sure if this is possible, and thus far a series of creative google searches have yielded nothing, however...
I have decent size database with a column “article” that contains up to around a thousand word per row. Surprisingly doing an FTS on that index is very fast and am happy with the speed. What I would like to do is to return the match and surrounding text only not the entire content.
For example if I was searching for the word “daylight” across the index then I would expect to get all the rows where the “article” column contains the word “daylight” (all good so far), the problem is that in each of these rows the “article” column could be a thousand words long so times that by 100 results and that is a big return. It would be great if for each of those matches I could return that word and the previous x amount of chars and the following x amount of chars in the “article” column instead of all the content the column contains.
Is this possible in MySQL? If not what else could I use?