NAG Logo
Numerical Algorithms Group

You can search for any word or phrase on our Web site by typing the word or phrase into the query form and clicking the button to execute search. The search returns a list of files that contain the word or phrase no matter where they appear in the text.

Tips for Searching

At its simplest, a query can be just a word or a phrase. But with the tips on this page, you can expand the focus of your query to give you more complete results. These tips will get you started with basic query language of Microsoft Index Server.

  • Queries are case-insensitive, so you can type your query in uppercase or lowercase.
  • You can search for any word except for those in the exception list (for English, this includes a, an, and, as, and other common words), which are ignored during a search.
  • Words in the exception list are treated as placeholders in phrase and proximity queries. For example, if you searched for "Word for Windows", the results could give you "Word for Windows" and "Word and Windows", because for is a noise word and appears in the exception list.
  • Punctuation marks such as the period (.), colon (:), semicolon (;), and comma (,) are ignored during a search.
  • To use specially treated characters such as &, |, ^, #, @, $, (, ), in a query, enclose your query in quotation marks (").
  • Search with the keyword NEAR, rather than AND, for words close to each other. For example, both of these queries, system and manager and system near manager, look for the words system and manager on the same page. But with NEAR, the returned pages are ranked in order of proximity: The closer together the words are, the higher the rank of that page.
  • Refine your queries with the AND NOT keywords to exclude certain text from your search. For example, if you want to find all instances of surfing but not surfing the Net, write the following query:
    surfing AND NOT the Net
  • Add the OR keyword to find all instances of either one word or another, for example:
    Abbott OR Costello
    This query finds all pages that mention Abbott or Costello or both.
  • Put quotation marks around keywords if you want Index Server to take them literally. For instance, if you type the following query:
    "system near manager"
    Index Server will literally look for the complete phrase system near manager. But if you type the same query without the quotation marks:
    system near manager
    Index Server searches all documents for the words system and manager.
  • 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".

These hints will get you started, but for more complex queries and more examples, see the MSDN web site. The following information is taken from that site.

Content Queries

Content queries search text-type properties of documents. Content queries process the textual content of a sequence of words in one of two ways. A series of words such as "Web server administrator" can be treated as a phrase, where the proximity of words and the word order is significant (no intervening words, and words must appear in a specific order). Alternatively, the words can be treated independently, ignoring the order and proximity of the words.

To handle both cases, phrase and non-phrase (free-text) interpretation of textual content, Dialect 2 has two modes for content queries: phrase and freetext. It uses the two following text interpretation tags.

{phrase} text {/phrase}
{freetext} text {/freetext} 

The {phrase} tag specifies the use of the phrase mode, and the text within the tags is considered to be a single entity. The search engine treats the word sequence and position as significant. The {freetext} tag specifies the use of free-text mode, where the word sequence and position are insignificant, and which includes word stemming. The {phrase} and {freetext} tags are mutually exclusive and cannot be embedded or nested. The default mode of Dialect 2, if no tag is used, is free-text mode. (In Dialect 1, the default mode is phrase mode.) To indicate free-text mode in the short form, either leave off any enclosing quote marks around the text or use the dollar sign ($) with the Contents property.

The following table summarizes the text modes and their long and short forms.

Text Mode Long Form Short Form
phrase {phrase} text {/phrase} " text "
freetext {freetext} text {/freetext} text
–Or–
$contents text

The following table illustrates examples of the use of text modes in content queries.

To Search For Example Results
Documents that match a phrase. {phrase} big red truck {/phrase}
–Or–
"big red truck"
Documents that contain the phrase big red truck.
Documents that match terms. {freetext} Why is the sky blue? {/freetext}
–Or–
Why is the sky blue?
–Or–
$contents Why is the sky blue?
Documents about the blue sky, ranked by estimated relevance.


CONTAINS Operator

The CONTAINS operator indicates a search for any of the specified words or phrases within a particular property. If no operator is specified, the CONTAINS operator is assumed. The CONTAINS operator contrasts with the relational operator "equals to" (=), which requires a match of the specified words or phrases and only those words or phrases. The CONTAINS operator is available only in its English spelling.

The following examples illustrate the use of the CONTAINS operator.

To Search For Example Results
Documents that contain any of the terms. {prop name=Contents} Contains {freetext} big red truck {/freetext}
–Or–
$Contents contains big red truck
–Or–
$Contents big red truck
Documents whose contents property contains the terms big, red, or truck.
Documents that contain a phrase. {prop name=All} Contains {phrase} big red truck {/phrase}{/prop}
–Or–
@All contains "big red truck"
–Or–
@All "big red truck"
Documents with any property that contains the phrase big red truck.
© The Numerical Algorithms Group 2008
Privacy Policy | Trademarks

© Numerical Algorithms Group

Visit NAG on the web at:

www.nag.co.uk (Europe and ROW)
www.nag.com (North America)
www.nag-j.co.jp (Japan)

http://nag.com/Advisory/Query_Syntax_Help.asp