I use a SQL Full Text query that finds search_query in Product_desc,
Something like this:

SELECT Product_id, Product_desc
FROM Products WHERE CONTAINS(Product_desc,'#search_query#')

What if I don't want to select the complete Product_Desc field, but only
portions of it?
By only portions I mean - Text that is most relevent to the search
query. Overall - I want to output 3-4 sentences that have as much
keywords (from the search_query) As possible, just like Google does to
its search results. I.e: a search for "science fiction" will yield:

..THE ULTIMATE |SCIENCE FICTION| WEB GUIDE..
...ALMOST SIX THOUSAND LINKS TO WEB |SCIENCE FICTION|...
...Here you can find definitions and RESOURCES of |"Science Fiction"|
...

Help, anyone?

Michael.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to