Site Search using Microsoft
Indexing Services (Index Server)
(Windows 2000 Server, Windows Server 2003)
[klicken
Sie hier für die deutsche Version]
Companion Search scripts:
-
ASP Search for Index Server
- ASP.NET Search for Index Server
About Microsoft Indexing Services (Index Server):
Formerly known as Index Server, Microsoft Index Service allows
the contents of files to be indexed to enable free-text searching.
What that means to the Intranet Developer is that you can have
an Intranet with in excess of 2000 documents and allow your users
to quickly find those most relevant to them. Consider searching
your company network for documents containing "Product"
and "Cost Sheet" and you can immediately see the benefits
of a facility such as this.
What you need before you start:
You
will need to set up an area for storing Catalogs. In this example,
the Inetpub directory is located on the D: drive on the web server
known as SYS3. Therefore, a sub-directory under this called Catalogs.
is a good idea to get started. Also bear in mind that you may
be hosting more than one site that requires indexing so a sub-directory
under Catalogs. called '<name_of_site>' is good practice
for any well organized Web administrator.
Further Information:
To find out more about Microsoft Indexing Service, visit the
following site:
http://msdn.microsoft.com/en-us/library/ms689644.aspx

1. Where to find the Indexing Service Console:
Click on 'Start', 'Programs', 'Administrative Tools'
and then 'Computer Management' (shown above in Fig.1).
If the Indexing Service is not installed, follow the
tutorial here to install it.

2. Creating an Indexing Service for your Site:
The Computer Management console contains configuration
options for a range of tools including both the Indexing
Service and Internet Information Services. Click on
'Indexing Service' under 'Services and Applications'
(Fig.2).

3. Creating a new Catalog:
Right-click on 'Indexing Service' and select 'New' and
'Catalog' from the list that appears. You will be presented
with the Dialogue box shown above in Fig.3 (above).
Give the catalog a name that other Administrators can
understand. In this case 'intranet', the same as that
used for the IIS configuration.
The 'Location' is the location of the catalog, NOT the
location of the site. You can put the catalog anywhere
you like, this particular one is going in a subdirectory
called 'intranet' under 'catalog' (I have already added
these directories, see 'What you need before you Start'
at the top of this document).
Press 'OK' to continue, note that the server will inform
you that the 'Catalog will remain off-line until service
is restarted'. This is fine, you will restart the service
later.

4. Configuring your Catalog:
All you have created so far is a catalog, now you have
to tell the server what your new catalog is for. Right-click
on the name of your new catalog (in this case 'intranet')
and select properties. You will be presented with the
dialogue shown below.

5. Linking your Catalog to a web
site:
If you link your catalog to a web site ("WWW Server"
as shown above), the Indexing Service will automatically
add the correct directories to your catalog and you
can skip section 6 below. This means that all content
within the site will be available to search.
If you prefer to manually specify which
directories are indexed, you should skip this section
and go straight to section 6.
To link your catalog to a web site, click
on the 'Tracking' tab and change the 'WWW Server:' to
the name of the site you want to index. Leave all the
other settings as they are.
You may also need to take a look at the
"Generation" tab and ensure that "Generate
Abstracts" is checked (you may have to uncheck
"Inherit above settings from Service" first).

6. Adding (or Excluding) Directories
to/from your Catalog:
If you have not linked your Catalog to a Web Site (Step
5 above), you will need to manually add the directories
you wish to search. You can add as many as you like
and these can be either local directories or UNC shares.
To add a directory, expand your Catalog
in the left-hand pane and right-click on "Directories".
Select "New" and "Directory". Then,
simply browse to the directory you wish to add.
To exclude a directory, simply check "No"
for the "Include in Index?" option. This is
particularly useful if you have added a directory and
need to exclude one of it's subdirectories.
Repeat this process for all required directories.
Note: If you opt for this method, the
Indexing Service will not create "Virtual Paths"
and you may find that document links are broken on your
search page. This problem does not apply to ASP
Search for Index Server or ASP.NET
Search for Index Server as they both automatically
detect and parse document links.

7. Generating Abstracts:
Abstracts (also known as Characterizations) contain
the first 320 printable characters of each document
within the search Catalog. These are useful in providing
a sample of the document contents within the search
results without users having to open the document itself.
The Indexing Service does not generate Abstracts by
default. To turn this feature on, you will need to select
the "Generation" tab and check the "Generate
abstracts" checkbox as shown above.
Note: You may need to uncheck the "Inherit above
settings from Service" to do this.

8. Start Cataloging:
Now that you have correctly configured your Indexing
Service you need to begin cataloging the contents of
your site. To do this you must first right-click on
'Indexing Service' and select 'Stop'. Alternatively,
you can just click on the black 'Stop' button in the
toolbar at the top of the dialogue box. Leave the Indexer
for a second and then repeat the process, this time
clicking on 'Start' (or clicking on the play button
in the task-bar).
The Indexing Service will be restarted and you should
see the document count rising slowly (as shown in Fig.6
above).

9. Checking your index is working correctly:
To check that your Indexing Service is running correctly
you need to submit a test query. Microsoft provide the
administrator with a simple way of doing this.
Click on the + icon next to the name of your Indexing
Service (in this case 'intranet'), then click on 'Query
the Catalog'. The 'Indexing Service Query Form' appears
in the right-hand window (as shown above in Fig.8)
Enter a simple query and press submit, choose something
that's likely to be present in a large number of documents
(such as the name of your company). Information is also
a good word to use as it appears somewhere in almost
all document groups.
Check to see whether the search has returned the expected
results (see below).

10. The working search results:
Having submitted the query, the expected results are
returned (Fig.9). This confirms that the indexing service
has started and is working correctly.

11. The completed dialog box:
Your completed dialogue box should look something like
Fig.9. The "Total Docs" indicated at 1816
sounds about right for our Intranet and so it's safe
to assume that it's stopped Cataloging and everything
is working as required.
If you need your index to kept fully up to date at
all times, or if you find that the Indexing Service
is handling a particularly large amount of queries -
you may need to tune your performance settings. To learn
how to do this, take a look at the "Indexing Service
Performance Tuning Tutorial" here.
The next stage is to add a search facility to your site...
you can either write one yourself or get a "Ready
made" script/application using either of the links
below...