Query Language

In MSSearch there are two basic query predicates:

  • CONTAINS. Has features for matching words, matching inflectional forms of words, searches using wildcards, and proximity searches. This makes the CONTAINS predicate well suited for finding documents that contain phrases that are "exact" matches to the search terms, or that match them very closely. You can also use attribute weighting in a CONTAINS predicate. This specifies the importance of the columns where you find the search term.
  • FREETEXT. Has features for finding documents containing combinations of the search terms spread throughout the column. FREETEXT uses the thesaurus and invokes a stemmer on the query text. The result is that the query is run for all permutations of the inflected forms for individual words and phrases in the query text. You can use the FREETEXT predicate to perform exact matches, like the CONTAINS predicate, by placing the query phrase in quotation marks.

For more information about query predicates, see Chapter 24, Analyzing the Default Query for the Dashboard Site. From a multilingual perspective, you can specify the language of a document by adding the LCID as the last item inside the parenthesis in the query clause for either query predicate:

 CONTAINS | FREETEXT ( [ <column_identifier> , ] '<content_search_condition>' [, LCID ] ) 

If the query clause does not contain the LCID, MSSearch interprets the language in the following priority:

  • Browser Language. In a majority of the cases, the best option is to use the language of the browser. When querying from Internet Explorer, it is important that you activate the "Language Auto-Select" option. To activate this in Internet Explorer, on the View menu, point to Encoding, and then click Auto-Select. This causes Internet Explorer to pass the locale to MSSearch as part of the query.
  • Server Default Locale. If the query language is not passed through LCID or through the browser, MSSearch attempts to use the default locale of the server where the query is performed. The same rules apply as when creating an index. The locale for the server must include an associated word breaker in order to correctly process the query.
  • Neutral Word breaker. As a last resort, MSSearch uses the neutral word breaker to interpret the query. In a majority of cases, this is the least desirable situation. In general, it is better to use a known language.

In any situation, in order to get predictable results, you must ensure that MSSearch uses the same linguistic resources when creating an index and when users conduct search queries.



Microsoft Sharepoint Portal Server 2001 Resource Kit
Microsoft SharePoint(TM) Portal Server 2001 Resource Kit (Examples & Explanations Series)
ISBN: 0735615624
EAN: 2147483647
Year: 2001
Pages: 231

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net