MS Index Server UsageThere are a couple steps involved in having your site automatically indexed and searchable using Index Server.
Add descriptive tags to your searchable pages When you create pages for your site, You should include "meta" tags within your HTML documents to increase the amount of information given to the index server for indexing your pages -- these can be created in Front Page, or inserted manually in your document as follows: <meta
name="Author" content="Joe Q. Public"> This
way, even if a search parameter (such as the author, or an accurate
description of the content) is not included directly in the text
of the html page, it will be referenced as such in the index. Making sure Your Site is Indexed Contact Superb Technical Support and ask them to index your site. Once they have confirmed this, you are ready to try your search page. In this section, we will outline a basic HTML form search page. Sample code can be found below: for page under your web root -- /search/index.htm (it would be physically in d:\home\username\public_html\search\index.htm) <---start sample code---> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="Author" content="Your Name here"> <meta name="Description" content="What the page is about"> <meta name="Subject" content="Search page"> <title><This is a Search Page!!></title> </head> <body> <h1>Search our web site</h1> <!-- the form action tells the page where to put the information --> <!-- gathered from the html form --> <form action="query.idq" method="GET"> <!-- The are supplied as hidden parameters, so that you control --> <!-- the scope and parameters of the search. These are in the form of --> <!-- variables that are passed on to the query page --> <input type="hidden" name="CiMaxRecordsPerPage" value="10"> <input type="hidden" name="CiScope" value=/docs> <input type="hidden" name="TemplateName" value="query"> <input type="hidden" name="CiSort" value="rank[d]"> <input type="hidden" name="HTMLQueryForm" value=/search/index.htm> <!-- now the actual form where the query is input, and the buttons--> Enter your query below: <input type="text" size="55" maxlength="100" name="UserRestriction"> <BR> <input type="SUBMIT" value="SEARCH"> <input type="RESET" value="CLEAR"> </body> </html> <---end sample code---> The hidden fields above aren't required to be hidden if you wish to allow the user to set sort order, number of items returned, etc. What they are doing is passing along the values as variables that will come into play in either the query or the formatting of the results
This file is the actual query file. It would be under your web root at -- /search/query.idq (it would be physically in d:\home\username\public_html\search\query.idq) <---start sample code---> [Query] CiCatalog=d:\home\username\public_html CiColumns = filename, size, rank, characterization, vpath, DocTitle, write CiFlags=DEEP CiScope=%CiScope% CiRestriction=(%UserRestriction%) & #vpath "*.htm" &! #vpath "\_vti_" CiMaxRecordsInResultSet=300 CiMaxRecordsPerPage=%CiMaxRecordsPerPage% CiTemplate=/Scripts/%TemplateName%.htx CiSort=%CiSort% CiForceUseCi=true <---end sample code--->
Creating an HTML Template file Now that you have made your query, you need to display the results. You do this by passing the results to an HTML Template File (.htx), which was specified in your .idq file by the CiTemplate parameter. In our example, your file would be under your web root at -- /scripts/query.htx (it would be physically in d:\home\username\public_html\scripts\query.htx) This is in the scripts directory sheerly for instructions sake -- if you had your permissions set to the tightest (so that the .htm files were ONLY read, you could put this in a scripts folder where things had execute permissions, as the htx file actually has to "run"). But you could change the path and have it in your search folder instead. The code for this is rather lengthy, so it can be referenced . There are comments throughout the code, and you can change what it does and how it works by modifying the code (including graphics, etc -- the default code has a reference to an MS graphic -- you probably will want to include another one). |