The Index Server Utility Object

The Index Server Utility object has five methods that Visual InterDev developers can use when working with the Index Server Query object:

  • AddScopeToQuery
  • GetArrayElement
  • ISOToLocaleID
  • LocaleIDToISO
  • TruncateToWhitespace

The AddScopeToQuery method adds a scope restriction to a query. This restricts a search to a particular virtual or physical path within the Index Server catalog. The syntax is

AddScopeToQuery QueryObj, Path[ , Depth] 

An example might be

ObjUtil.AddScopeToQuery objQuery, "/extranet", "deep" 

The depth specifies whether the search includes subdirectories (deep) or not (shallow).

Another useful method of the Utility object is the TruncateToWhitespace method. This is useful when you are displaying a lengthy property such as a description. By using the TruncateToWhitespace method you can truncate the string without cutting off any characters. The following example shows how this is achieved:

<% Response.Write _     objUtil.TruncateToWhitespace(RS("Characterization"), 200) %> 



Programming Microsoft Visual InterDev 6. 0
Programming Microsoft Visual InterDev 6.0
ISBN: 1572318147
EAN: 2147483647
Year: 2005
Pages: 143

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