Displaying "Google like" search results
- by RanM
Working in ASP.NET (VB), I am trying to develop a simple search results page for my website.
The process is as follows:
(1) The site's user enters a search phrase;
(2) The search results page searched the site's database, and returns the page title as a link, and a short snippet from each search "hit", with the search phrase highlighted.
I already have the search part done, and also the "highlighted" part done (using Regex). However, I want to be able to return a short snippet of text, which include the search phrase (a few words before the search phrase, a few after). Something like:
Page Title [as a link]
... yada yada yada search phrase yada yada yada...