Querying with Numeric Property Operators

With the Advanced ASP Query form, you can formulate some numeric property queries with numeric comparison operators. You can also search for documents with certain size ranges by posting numeric queries against the file Size property.

To query against file size

Exercise 1

  1. On the Simple Content Query form, in the Other query samples drop down list, select the Advanced ASP Query Form, and click the Go button.
  2. The Sample Query form appears.

  3. In the Enter your query below box, type World Wide Web.
  4. In the Where File Size is list box, click Greater than.
  5. In the list box next to the Greater than list box, select 10K bytes.
  6. Click the Execute button.
  7. This query searches for all files larger than 10,000 bytes that contain the phrase World Wide Web.

  8. Click the Clear button.

Exercise 2

  1. In the Sample Query form, type Windows NT in the Enter your query below box.
  2. Select Less than and 100K bytes in the drop-down list boxes.
  3. Click Execute Query.
  4. Because this type of query can often return thousands of documents, this set of query forms and scripts does not count the total number of documents returned. It merely shows you the next and previous pages of hits. This can be changed by reprogramming the logic used in the query script files.

  5. After executing the query and reviewing the results, click the Clear button.

Exercise 3

  1. Open the Advquery.asp file in your preferred text editor.
  2. Search for RecordsPerPage.
  3. Change the value from 10 to 100, and save the file.
  4. The line of code should now look like this:

    
    RecordsPerPage = 100
    
  5. With the Sample Query form still showing in your browser, click your browser's Refresh button.
  6. In the Enter your query below box, type Windows NT.
  7. Select Less than and 100K bytes in the list boxes.
  8. Click the Execute button.
  9. Index server will re-execute the query, but this time it will put up to 100 query results on every returned page.

  10. When you have finished viewing the results, click the Clear button.

© 1997 by Microsoft Corporation. All rights reserved.