Querying for Document Contents

This test drive shows you how to make simple content queries, using the standard sample form installed by Index Server.

To open the sample form
  1. From the Taskbar, click Start, point to Programs, point to Windows NT 4.0 Option Pack, point to Microsoft Index Server, and click Index Server Sample Query Form.
  2. Your computer’s browser displays the Sample ASP Search Form.

  3. In the left frame, click HTM/IDQ Sample.
  4. The Sample HTM/IDQ/HTX Search Form appears.

This section contains

Constructing Basic Queries

The following test drive shows you how to search for text and acquaints you with how results are displayed.

 

To query for content
  1. On the Sample HTM/IDQ/HTX Search Form in the box under the words Enter your query below, type IIS and Internet.
  2. Click Go.
  3. This query looks for all documents containing the acronym IIS and the word Internet. The word and is interpreted as a Boolean operator by default. The browser posts the query to IIS and Index Server. The query is executed, and the results are returned in a Web page. If more than 10 hits are returned, hits 1 through 10 are listed on the first page. The query hits are ranked in descending order, based on the quality of the match.

    Scroll through the list. Note that the query returns both Microsoft Word and HTML documents. Also note that the query generates a document abstract, or summary. This particular set of forms and scripts returns a number of property values including the title, abstract, and document paths. Also, this query returns some standard file-system properties, such as file size and last modification date.

  4. Click the Next 10 Documents button, at either the top or bottom of the results page.
  5. The number 10 is the number of documents on the next page. This button actually executes another query and asks for the next group of documents. Note that Index Server keeps track of which documents are shown on the page, the current page number, and total page count returned by the query (bottom left). This information is displayed with HTML formatting and values substituted for variables in the .htx file that formats the results.

  6. Choose any of the documents, and click Show Highlights (condensed).
  7. The screen displays the contents of the document and highlighted words that matched your query. There are two different highlighting modes: condensed and full text. Condensed mode is handy for viewing highlights in long documents or documents with few hits because you do not have to download and view the entire document. Full text mode returns the entire text of the document with all the hits highlighted.

  8. Click the browser’s Back button to return to the query results page.
  9. Select Show Highlights on some other documents, especially the sample Microsoft Word document (Ixserver.doc).
  10. Note that the document’s contents are displayed and that the hits are highlighted regardless of the document’s format. Highlighting works for all index document types.

  11. After viewing some more documents, click the New Query link at the top or bottom of the page.
  12. The Sample HTM/IDQ/HTX Search Form reappears.

Querying Documents in Different Formats

You can query documents in formats other than HTML or Microsoft Word. For example, in the next test drive you will query a Microsoft Excel file and a Microsoft PowerPoint file.

 

To query documents in different formats
  1. On the Sample HTM/IDQ/HTX Search Form, delete any text in the Enter your query below box.
  2. In the Enter your query below box, type net revenues, and click the Go button.
  3. This query returns a Microsoft® Excel spreadsheet (Ixserver.xls), which contains the word income. You can view hits within Microsoft Excel documents by selecting Show Highlights (condensed) or Show Highlights (full text).

  4. Click New Query to go back to the query form.
  5. In the Enter your query below box, type search services.
  6. This query returns a Microsoft® Word document and a Microsoft® PowerPoint® presentation (Ixserver.ppt), both which contain the phrase search services. As with the Microsoft Excel spreadsheet, you can view hits by selecting Show Highlights (condensed) or Show Highlights (full text).

Querying with a Sentence

In addition to searching for a word or a phrase, you can also search with a sentence. This kind of search is called a free-text query.

 

To search with a sentence
  1. Click New Query.
  2. In the Enter your query below box, type Does the Microsoft Corporation projection template show net revenues?
  3. Under the Enter your query below box, select Search for any combination of words entered above.
  4. Click the Go button.

Index Server returns the sample file called Microsoft Corporation Projection Template (Ixserver.xls). Open this file and look to make sure you find the phrase net revenues. For details about making free-text queries, see Free-Text Queries.

Ranking the Results

The previous test drives showed you the basics of querying documents and finding the results. But now this test drive shows you other things to look for on the query results page.

 

To control how results are ranked
  1. Click New Query.
  2. In the Enter your query below box, type IIS and NT Server, and click the Go button.
  3. Note the order in which the documents appear.

  4. Click New Query, and search for IIS near NT Server.
  5. Many of the same documents are returned, but they are ranked differently. The NEAR Boolean operator ranks matches higher as the words IIS and NT Server appear closer together in the document. This results in a different ranking from the AND operation.


© 1997 by Microsoft Corporation. All rights reserved.