Query forms allow users to search your Web site for documents that meet the criteria they specify. Index Server provides several features that you can incorporate into a query form to enhance the query process, improve result reporting, and track usage.
Query Scope
A query range specifies the set of documents to be searched by the query engine. The range typically indicated by a directory path on a storage volume such as D:docs.
Content Query Restrictions
The content query restrictions narrow the focus of a query by describing what type of textual content to search.
Property Query Restrictions
The property query constraints specify the file attributes included in the search. These features can include file size, creation and modification dates, file names, and authors.
Hit Highlighting
The hit-highlighting feature shows you the specific portions, if any, of the document that satisfies your query. To view the hit highlights, click Show Highlights (condensed) or Show Highlights (full text) located under each result abstract. With this feature enabled, you can view an HTML page containing a list of the hits, with those words that make up the hit displayed in red italic text.
Query Logging
IIS logs all traffic between the client and server. Standard IIS logging picks up query information such as the querying Internet Protocol (IP) address and the queries processed by the server.
Index Server interacts with IIS so that you can search a Web site for information through a query form embedded on a Web page.
Sample Query Form
Included with Index Server is a sample query form that can be used to search the indexed files. These sample forms can be made available to Web site users or they can serve as examples of how to develop customized query forms. The sample query form can be found by pointing to Start, Programs, Windows NT Option Pack, Microsoft Index Server, and then clicking Index Server Sample Query Form.
Query Form Elements
The Basic query form is comprised of several elements:
- HTML File : This file displays a Web page where the user enters the query parameters. It also displays the results set returned by Index Server.
- Internet Data Query (IDQ) File : The IDQ file (a file with an .idq extension) is the intermediate form of the user's search request that Index Server will run to search the index.
- HTML Extension File (HTX) : The HTX file (a file with an .htx extension) is an HTML file containing query results set data. This data is then added to an HTML page and sent to the Web browser to be displayed.
Note Index Server also uses another file type, .htx, as a template for formatting the hit-highlight page. The contents of the .htx with the .htx file is formatted as a Web page and sent to the Web browser.
In addition to creating basic query forms, you can use Active Server Pages (ASP) and SQL with Microsoft ActiveX Data Objects (ADO) to create query forms.
ASP Queries
You can also build query forms with ASP, which allow you to capture the power and flexibility of ActiveX scripting. Queries created with .asp files enable you to capitalize on scripting languages such as Microsoft® Visual Basic® Scripting Edition (VBScript) and Microsoft® JScript™ to add flexibility in displaying query results.
Note Creating query forms with ASP is more flexible and powerful than other solutions. However, if your site receives large numbers of simultaneous queries, you should create query forms with .idq, .htx, and .htm files (rather than .asp files) for the quickest response time.
SQL Queries
Index Server provides an alternative method of issuing queries on an indexed file system. Instead of using Index Server's standard forms, you can write SQL queries in applications that use ADO. In your .asp files, use the SQL Extensions to form the query, ADO to retrieve the data, and a scripting language such as VBScript to display the data.
Note If Index Server performance becomes an issue, use the basic query forms. ASP queries and SQL queries require more processing power to execute.