简体   繁体   中英

Implementing search in web application

I am implementing an eCommerce application using ASP.Net. I would like to know if custom Google search is sufficient enough or if we plan to go implement our search functionality.. how do we go about doing it?

Ideas and Suggestions and best practices are most welcome.

Regards,
Abdel Olakara

If you don't plan on using Google Search then you really have 2 options:

  1. If you are using SQL Server you can put all of your site text into ntext or varbinary fields so that it is search-able. Then if you have files like PDFs etc you can put the files into a table as varbinary and create a Full Text Catalog to search them. For PDFs you will need to have iFilter installed, it is part of the free Adobe Reader package. There are other iFilters. Check out http://www.ifilter.org/ for more info on them.
  2. If you are using asp.net hosted on a windows server you can use the Windows Indexing Service and put any of the data that you want into text file or any other file format. You might still need iFilters for those formats.

I would suggest option 1 if you don't go with Google. It can be a little more complex but option 2 can have the issue that everything starts to look like it is being saved in a giant heap. You can also do some combination of 1 and 2.

You might like to look at Lucene.NET http://lucene.apache.org/lucene.net/

I have spent many years implementing search engines and using an established 3rd Party tool like Lucene will save you a lot of heartache. There are many, many gotchas and edge cases with searching. These have been dealt with to a large degree in Lucene.

As I read it, Custom Google Search is about searching web pages in your site. Contrast this with searching database contents such as lists of products or reviews of items.

What are your requirements? My guess is that when I go to an eCommerce site (eg. Amazon or something such as Trip Advisor) I want to search content that is stored in databases. So I'm doubtful that this particular Google capability fits my expectations of eCommerce.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM