开发者

how to implement internal website search in asp.net

开发者 https://www.devze.com 2023-01-23 12:11 出处:网络
I did lot of R & D to implement website internal search in asp.net. I have found a good article in code project

I did lot of R & D to implement website internal search in asp.net.

I have found a good article in code project http://www.codeproject.com/KB/applications/SearchDotnet.aspx

It has some limitations

Search with special characters is not working. Pdf and word documents are not searching. Not able to high light the searched text. If I am implementing this in master page then child title is not displayed in result page. Requirement:

I need to implement search result should be like this http://www.google.com/search?q=开发者_StackOverflow社区internal+search+in+asp.net&sourceid=ie7&rls=com.microsoft:en-US&ie=utf8&oe=utf8

In description the search text must be highlighted.

Note: I need to implement this with coding not any 3rd party tool (I know lots of 3rd party website which do free hosting but they will post there adds and logo). Moreover i dont want to use any database for this internal searching

Please suggested and provide me some good links.


You could look at using Lucene.Net (http://lucene.apache.org/lucene.net/) to index your site. This is a tool but it is open source and requires you to do some of the work so I'm not sure if this meets your criteria or not.

For an example of how it works you can try searching on their site:)


Given your requirements there aren't too many options.

The only one I can think of is using Microsoft Indexing Service. Here is an example for using that to search a website in .net https://web.archive.org/web/20211020134956/https://www.4guysfromrolla.com/articles/033005-1.aspx

If you have content in a database you could use Microsoft Full Text Indexing to create a search table and go from there.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号