Sunday, September 7, 2008

Adding a search facility to your website

By Chris Maunder

Using the Microsoft Index Server to enable your readers to search your site

Introduction
Once a site starts growing a search facility is a necessity. There are a number of third party search engines that can be installed in your site, but for many purposes the Index Server that comes with IIS is more than adequate. What is the Index server? The online docs put it succinctly as follows:

Indexing Service is a Microsoft® Windows® 2000 service that indexes files on your disks and their properties as well as your Internet Information Services (IIS) Web files and properties. Indexing Service stores the resulting information in catalogs that you can efficiently search using a variety of queries.
The Index Server allows you to run queries against the service using ADO and OLE DB. This provides ease of use and flexibility in providing a search facility.

The Index Server Object
The index server is created like any other COM object on your server:

dim ixQuery ' Index Server query object.
set ixQuery = Server.CreateObject("ixsso.Query")
The object has a number of properties that can be set before running the query. The most useful are the Columns, SortBy, MaxRecords and Query properties.

Columns
The Columns property allows you to specify which fields are returned by the query. For a full list you should consult the online docs, but for the current example we will return the following:

More...

http://www.codeproject.com/KB/asp/indexserver.aspx

ASP.Net Feeds