|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Interface to add restrictions to an ISearchRequest.
IPortalSearchRequest is created from the ISearchFactory interface.
See Search Examples.
| Method Summary | |
void |
setAdminFoldersToSearch(int[] folders,
boolean includeSubfolders)
Restricts the set of admin folders searched to the specified admin folders. |
void |
setDocFoldersToSearch(int[] folders,
boolean includeSubfolders)
Restricts the set of doc folders searched to the specified doc folders. |
void |
setFieldsToReturn(Field[] properties)
Sets the Fields to return. |
void |
setLanguage(java.lang.String language,
boolean limitByLocale)
Sets the language that the query string will be interpreted in. |
void |
setObjectTypesToSearch(ObjectClass[] classes)
Restricts the search to the specified ObjectClasses. |
void |
setOrderAscending(boolean ascending)
Sets the results to be returned in ascending or descending order. |
void |
setQuery(IFilterClause filterClause)
Sets the query associated with this request. |
void |
setQuery(java.lang.String queryString,
IFilterClause filterClause)
Sets the query associated with this request. |
void |
setResultsCount(int firstResult,
int maxResults)
Sets the first result (where to start) and maxResults (how many results to return). |
void |
setResultsOrderBy(Field field)
Orders the results by the specified Field. |
void |
setUseBestBets(boolean useBestBets)
Sets whether to use Best Bets. |
| Methods inherited from interface com.plumtree.remote.prc.search.ISearchRequest |
execute, setQuery |
| Method Detail |
public void setLanguage(java.lang.String language,
boolean limitByLocale)
language - Language that the query string will be interpreted in, e.g. "en" or "fr".
The language code must be at least two characters in length
The list of languages is listed in SearchLocales.xml, which is located in
$PT_HOME\ptsearchlib\5.0\settings\configlimitByLocale - true to limit the search request to the search user's locale
java.lang.IllegalArgumentException - if language is less than two characterspublic void setFieldsToReturn(Field[] properties)
Fields to return.
Fields must be retrievable.
By default, PlumtreeField.URL, PlumtreeField.TEXT_EXCERPT, PortalField.OBJECT_ID, PlumtreeField.NAME,
PortalField.CLASS_ID, PlumtreeField.CREATED, PlumtreeField.LAST_MODIFIED, PlumtreeField.ICON_URL,
and PlumtreeField.RANK will be retrieved.
Adding these fields in properties will have no effect.
properties - array of Fields to retrieve
java.lang.IllegalArgumentException - if any of the fields are not retrievable
public void setDocFoldersToSearch(int[] folders,
boolean includeSubfolders)
folders - array of doc folder idsincludeSubfolders - whether to search subfolders
java.lang.IllegalStateException - if includeSubfolders is set differently for doc vs admin folders
java.lang.IllegalArgumentException - if any of the folder IDs are negative
public void setAdminFoldersToSearch(int[] folders,
boolean includeSubfolders)
folders - array of admin folder idsincludeSubfolders - whether to search subfolders
java.lang.IllegalStateException - if includeSubfolders is set differently for doc vs admin folders
java.lang.IllegalArgumentException - if any of the folder IDs are negativepublic void setObjectTypesToSearch(ObjectClass[] classes)
ObjectClasses.
If this method is not called, all supported ObjectClasses will be searched.
Supported ObjectClasses are Documents, Doc Folders, Users, and Communities.
classes - array of ObjectClasses to search
java.lang.IllegalArgumentException - if unsupported ObjectClasses are includedpublic void setUseBestBets(boolean useBestBets)
useBestBets - whether to return special results
java.lang.IllegalStateException - if used with an IFilterClause
public void setResultsCount(int firstResult,
int maxResults)
firstResult - first result to return, e.g. 0. The first result is 0 based and not 1 based.maxResults - maximum number of results to return at a time, e.g. 10
java.lang.IllegalArgumentException - if firstResult or maxResults are negativepublic void setResultsOrderBy(Field field)
Field.
If Field is not a numeric or date field, the results will be returned in rank order.
field - Field to order results bypublic void setOrderAscending(boolean ascending)
true).
Note that is resultsOrderBy is a date field, and asending is set to true,
the results will be returned earlist first.
ascending - set to false to return results in descending orderpublic void setQuery(IFilterClause filterClause)
setQuery().
setQuery in interface ISearchRequestfilterClause - IFilterClause created from ISearchFactory
java.lang.IllegalStateException - if used in conjunction with BestBets
public void setQuery(java.lang.String queryString,
IFilterClause filterClause)
ISearchResponse will match both the query string and filter clause.
The search string is a case-insensitive collection of terms and operators which
documents must match in order to be returned from search. For example, a search for
'dog cat' would return documents containing 'dog', 'cat', or both.
If double quotes are present, as in '"dog cat"', the phrase 'dog cat' must be present.
Note that at least three characters must be present between wildcard characters: *ad* is invalid.
Note that and, or, not, and near are considered operators in the search string, rather than terms.
Note that when they appear in quoted strings, and, or, not, and near are treated as search terms.
See search syntax for more examples.
Note: this overrides any query previously set by a call to any
version of setQuery().
setQuery in interface ISearchRequestqueryString - String to searchfilterClause - IFilterClause created from ISearchFactory
java.lang.IllegalStateException - if used in conjunction with BestBets
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright ©2007 BEA Systems, Inc. All Rights Reserved.