网站的搜索功能 [英] Search Feature of a website

查看:85
本文介绍了网站的搜索功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我迫切需要一些帮助来实现Web应用程序的搜索功能.信息存储在数据库中,如果搜索条件与数据库中的记录行匹配,则应该可以在gridview中显示这些行.示例代码或帮助

谢谢

Hi I urgently need some help in implementing the search feature for a web application.The information is stored in database and if the search criteria matches the records row in the database I should be able be display those rows in a gridview.Any sample code or help

Thanks

推荐答案



实际上,搜索功能并不限于从所有列中搜索数据.如果您的数据库很小,那就很好.但是当您拥有数万亿的数据并且想要搜索特定的字符串时,可能会花费更多的时间.

示例之一是:如果我有搜索字符串"c#linq",而您在数据库中有一些记录.您将结果记录显示在网格中.现在第二天再次,我需要搜索相同的字符串,并且用户必须等待相似的时间.因为它不应该发生.

我认为以下是您需要考虑的一些重点
1)一旦表中有更多结果集(此表将存储行索引/表信息),就可以存储搜索结果并给它们定级.您可以在该排名的基础上删除多余的搜索字符串.
2)您需要使用 SOUNDX [扩展搜索方法 [
Hi,

Actually searching functionality is not limited to search for your data from all column. if you have small database then it''s fine. but when you have trillions of data and you would like to search for particular string it may take more time.

One of the example is : if i have search string "c# linq", and your have some records in your database. you display the result records in grid. Now next day again i need to search for the same string, and user have to wait for similar time. as it should not happen.

I think below are some major points that you need to consider
1) Store your search result and give them rating, once you have more resultsets in your table(this table will store rowindex/table information.) you can remove extra search string on bases of that ranking.
2) you need to use SOUNDX[^] for similar searching.
3) You can also implement Extended search method[^](similar in your Stored procedure)
4) Use indexing to improve performance.
5) Get only desired records from database. if you have pagesize 10 in your datagrid then you can fetch only 10 records for every call. do not return all resultset.

If you implement some or all of the above features then you have powerful searching engine for your site. there are more features can be implemented but initially you can use above very quickly.

Best luck
Thanks
-Amit Gajjar


这篇关于网站的搜索功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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