The Index Server Utility object has five methods that Visual InterDev developers can use when working with the Index Server Query object:
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) %>