Displaying "Google like" search results
Posted
by RanM
on Stack Overflow
See other posts from Stack Overflow
or by RanM
Published on 2010-05-02T11:57:20Z
Indexed on
2010/05/02
12:07 UTC
Read the original article
Hit count: 216
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...
© Stack Overflow or respective owner