如何建立在C#中的搜索引擎 [英] How to build a search engine in C#

查看:136
本文介绍了如何建立在C#中的搜索引擎的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想建立在ASP.NET MVC的Web应用程序,需要建立一个pretty复杂的搜索功能。当用户输入搜索词我想搜索各种数据源,包括文件,数据库中的表,网页网址,而某些API如Facebook。任何提示,教程和提示会大大AP preciated。

I am trying to build a web application in ASP.NET MVC and need build a pretty complex search feature. When a user enters a search term I want to search a variety of data sources which include documents, tables in the database, webpage urls and some APIs like facebook. Any tips, tutorials and hints would be greatly appreciated.

推荐答案

你的问题建议你可能不刨去从头开始实现整体功能,因此这里有一些,你会发现有用的链接。

Your question suggests that you're probably not planing to implement the whole feature from scratch, so here are some links that you may find useful.


  • 一(最简单的)选择是使用第三方搜索引擎(如谷歌自定义搜索但兵大概也有类似的API)。这允许你使用谷歌进行搜索(只)页面,并显示一个定制的方式的结果。该limiation是,它只能搜索一些(链接)页面显示的数据。

  • One (the easiest) option would be to use a third-party search engine (e.g. Google Custom Search, but Bing probably has a similar API). This allows you to search (only) your page using Google and display the results in a customized way. The limiation is that it searches only data displayed on some (linked) pages.

一个更复杂的方法是使用一个实现你的索引(基于你给它的数据),一些.NET库。一个流行的库,例如 Lucene.Net 。在这种情况下,你给它的数据要精确搜索(从网页,数据库内容等相关内容),所以你正在搜索什么更多的控制权(但它是一个多一点的工作)。

A more sophisticated approach is to use some .NET library that implements indexing for you (based on the data you give it). A popular library is for example Lucene.Net. In this case, you give it the data you want to search explicitly (relevant content from web pages, database content, etc.), so you have more control of what is being searched (but it is a bit more work).

这篇关于如何建立在C#中的搜索引擎的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆