Aqualogic Interaction API  
 

IPTSQueryRequest Members

IPTSQueryRequest overview

Public Instance Methods

execute Runs the search and returns results in an IPTSQueryResponse object. This call does not return until the request has finished or timed out. See the documentation for the individual exception types for more information about each possible error condition. If the request times out, a partial result set may be returned. Call IPTSQueryResponse.queryTimedOut to find out whether this is the case.
getFieldsToReturn Returns fields that will be included as part of each IPTSResult when the search query is executed; counterpart of setFieldsToReturn.
getFirstResultIndex Returns the current first result index. For example, if you have requested results 11 through 20, this value will be 11.
getLanguage Returns the 2-character locale code, such as "en", for the language that will be used to parse text queries.
getMaxGroupCount Get the maximum number of result groups (clusters) that can be returned, if setResultsGroupBy has been called. Does not include the "all others" group.
getQuery Get the current search query for this request; counterpart of setQuery. Does not include any restrictions added by calling restrictTo or restrictToAnyOf.
getQueryTimeout Returns the search server's query processing timeout for this request. See setQueryTimeout.
getRequiredAccessLevel Get the access level that the current user must have for items returned by the query request.
getResultsGroupByField 
getResultsOrderByAscending Returns whether results will be in ascending or descending order of the order-by field (see getResultsOrderByField).
getResultsOrderByField Returns the field that will be used for ordering results; counterpart of setResultsOrderBy.
getReturnedCount Returns the currently requested number of returned results. For example, if you have requested results 11 through 20, this value will be 10.
getReturnMatchingExcerpts Returns whether the search server will return excerpts from fields that matched the query. See setReturnMatchingExcerpts for more details.
getUseShortConnectionTimeout Returns true if the search server will use a short (30 second) timeout when waiting for a connection to the search server. See setUseShortConnectionTimeout for more information.
restrictTo Restrict this query request to a subsection of the search index. Results must satisfy the specified IPTSQuery restriction, in addition to the original query passed to setQuery. restriction is usually a container within one of the Plumtree applications. See the factory methods in IPTSPortalCollection, IPTSCollabCollection, and IPTSContentCollection). However, any other IPTSQuery may also be used as the restriction in this call. The restriction is ANDed with the query passed to setQuery when the query request is executed. Alternatively, advanced users may ignore this method, and simply include these restrictions as part of an IPTSQuery tree that is passed to setQuery. Calls to this method override any previous call to restrictTo.
restrictToAnyOf Restrict this query request to specified subsections of the search index. Results must satisfy at least one of the restrictions specified here, as well as the original query passed to setQuery. restrictions are usually containers within the Plumtree applications. See the factory methods in IPTSPortalCollection, IPTSCollabCollection, and IPTSContentCollection). However, any other IPTSQuery may also be used as a restriction in this call. The restrictions passed to this method are ORed together, and then the composite is ANDed with the query passed to setQuery when the query request is executed. Alternatively, advanced users may ignore this method, and simply include these restrictions as part of an IPTSQuery tree that is passed to setQuery. Calls to this method override any previous call to restrictTo.
setFieldsToReturn Specify fields to return along with each result. By default, no fields are guaranteed to be returned, so it is important to call this method before calling execute This call overrides any previous calls to setFieldsToReturn, i.e. it replaces, instead of adding to, the set specified by a previous call.
setLanguage Set the language in which all text queries associated with this request will be parsed. The default is the current user's language, or the portalwide default.
setQueryOverloaded. Use the provided String as the search query for this request. The default search fields are searched (see IPTSSearchableCollection.TextQueryDefault); these are usually the title, description, and full-text content fields. An admin can edit this list of fields via the UI, or the default may be changed on-the-fly by calling setTextQueryDefaultFields. The thesaurus, spell correction, and Best Bets are not used. This call replaces any previous queries set by any call to setQuery.
setQueryTimeout Set the search server's query processing timeout for this request. After the timeout elapses, the server will stop processing the query and return whatever results it has accumulated so far. This should be regarded as an execution time target, not as a strict upper bound.
setRequiredAccessLevel Set the access level that the current user must have for items returned by the query request. By default, the user must have READ level access. This access level does not apply to Collab items, since Collab uses a different security model. Any Collab item visible to the current user can be returned if it matches the query and restrictions, regardless of the access level set via this method.
setResultsCount Set the desired number of results and number to skip. For example, to request results 11 through 20, call setResultsCount(11, 10). The default is to return the first ten results.
setResultsGroupByOverloaded. Set field for results clustering (grouping). A maximum of 10 groups are returned, plus the "all others" group. For the portal "object type" categorization, use field IPTSPlumtreeCollection.CategorizableObjectType. For the portal's "folder" categorization, use field IPTSPortalCollection.FolderPath. Any other searchable and retrievable string field may also be used for clustering. In this case, the search server will find the most common terms (words) in the field (within your set of search results). Each group will correspond to one of these common terms, and will contain search results that have the term in the field. Note that a single search result may appear in multiple groups. For a simple example, suppose that the Name field is used, and documents "Cats Dogs" and "Cats Mice" match the query. The first group will be "Cats" and contain both results. "Dogs" and "Mice" will be the other group, and will each contain one result.
setResultsOrderBy 
setReturnMatchingExcerpts Set whether to return excerpts from fields that matched the query. If this method is called with argument false, then IPTSResult.getFieldExcerpts will return no value, nor will field IPTSPlumtreeCollection.Excerpt. In some cases, this shortens search server query processing time. Default is true, and usually does not need to be changed.
setSearchServerLogInfo Set information to be logged as part of the search server's on-disk logs during the query request. (This information is not logged to PTSpy.) When execute is called, the IXPDictionary is enumerated and XPConvert.ToString is called on each key and value. These string keys and values are logged in the search server log file in the form <key>value</key>. The key must be a single alphanumeric token conforming to [A-Za-z][A-Za-z0-9_]*.
setTextQueryDefaultFields Set the list of fields that text queries search, by default. See IPTSSearchableCollection.TextQueryDefault for more information. All fields within the list must be of type PTSFieldType.STRING.
setUseShortConnectionTimeout Set whether to use a short or long timeout when waiting for a connection to the search server. If shortConnectionTimeout is true, use a "short" 30-second timeout; otherwise use a "long" 10-minute timeout (the default). Note that setQueryTimeout sets the timeout for query processing within the search server itself, while setUseShortConnectionTimeout sets the timeout for establishing a connection to the search server.
useIndexServerForQueries Tells this IPTSQueryRequest to run all subsequent queries against the index search server, rather than the query search server. This is used for certain administration tasks where changes to the index should be reflected in search results immediately. Most users will not need to call this method. In deployments with only one search server (used as both the query and index server) this method has no effect.

See Also

IPTSQueryRequest Interface | com.plumtree.server.search Namespace