PDA

View Full Version : generating page abstract for Mysql boolean search



Chris
08-02-2006, 01:08 PM
Anyone have an idea how to do this?

On a non-boolean search you can use the SQL SUBSTRING fuction to return the text around the phrase. But with boolean searches a phrase could match an entry where the words in the phrase aren't together or in the same order so you have nothing to match against with the substring function.

Chris
08-02-2006, 02:11 PM
I have a work around, but it isn't very efficient. I basically count the number of words, do custom sql statements to make a synopsis for each individual word (up to 4), and then tie them all back together.