Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project



Basic Search Query Rules


Basic Rules For Querying A Search Catalog
To query the Search catalog you need to use the Query object that exists in the MSSearch ActiveX component.

But first you need to decide how you want to search and what to search for. The query language is very powerful and allows standard keyword searches and additional column searches.

Search Types
Searches can be combined in the following ways:

  • Boolean Operators
    Allows the use of AND, NOT and OR to specify which terms should or should not exist in the search results, i.e. tutorial AND guru will find those documents that contain both of the words 'tutorial' and 'guru'.
     
  • Proximity Operator
    Using the NEAR operator allows terms to be found that are within 50 words of each other. This in effect is similar to the AND operator, i.e. tutorial NEAR guru will find those documents where the word 'tutorial' is within 50 words of 'guru'.
     
  • Vector Space Queries
    Allows a weighted list of words or phrases to be queried. The rank of each result indicates how well the page matches the query. The pages returned may not actually meet every term in your query so results should be sorted by rank. For example the query *pie, apple[50], cherry[10], pumpkin[400] will return those documents that contain any words that end 'pie' and will show a preference to 'pumpkin', 'apple' and then 'cherry'.

Searchable Columns
The Query object is flexible enough to allow you to not only search the full text of a document but also to search specific columns within the catalog. The catalogs contain many standard columns that can be searched. When Search adds a document to its catalog, it includes the full text of the document and any properties specified in the catalog schema, such as the document’s title, file size and author. This is particularly useful for Microsoft Office documents.

When Search finds a <META> tag within a web document it automatically creates a new column in the catalog to reflect that name. This is added to the catalog as an indexed column and can be queried.

You can define your own columns by editing the file 'Data\Search\Config\DEFINECOLUMNS.TXT'. This can be found within the installation directory of Microsoft Site Server.

To search a specific text column you need to use the following syntax:

       @column_name query_term

For example to find all documents that contain the word 'money' the following query is used:

       @DocTitle money

For a full list of standard supported columns, check out the Column List.

Basic Rules for Querying Text Columns
Many of the catalog columns contain text values. The following rules should be followed when querying text columns:

  • Consecutive words are treated as a phrase. This means that they must appear in the same order within a matching document.
     
  • Queries are not case sensitive, 'JASON' will match 'jason' or 'JaSoN'.
     
  • Any word can be searched for. However noise words such as 'the', 'an' or single letters and numbers are ignored during a search unless they are part of a quoted phrase.
     
  • Any words that are defined in the noise word list are treated as placeholders in phrase and proximity queries. For example, searching for "Word for Windows" would result in a match for “Word for Windows” and “Word and Windows” because 'for' is a noise word.
     
  • Punctuation marks, such as the period (.), colon (:), semicolon (;), and comma (,), are treated as word breaks and are ignored during a search.
     
  • Special characters, such as &, |, ^, #, @, $, (, ), must be enclosed in quotation marks (").
     
  • To search for a word or phrase containing quotation marks, enclose the entire phrase in quotation marks, and then double the quotation marks around the word or words you want to surround with quotes. For example, “World-Wide Web or ““Web”” searches for World-Wide Web or “Web.”

This covers the basic rules of how to build up a query to search a catalog. The next step involves setting properties of the Query object to specify how the search should operate.

 
  1 2 3 4 5 6 7 8
 
   
Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information
knoxville photographer
knoxville wedding photographer