|
||||||||||
| 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 ObjectClass(es). |
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 - the Language that the query string will be interpreted in, for example "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
- Throws:
java.lang.IllegalArgumentException - if the 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 - an array of Fields to retrieve
java.lang.IllegalArgumentException - if any of the fields are not retrievable
public void setDocFoldersToSearch(int[] folders,
boolean includeSubfolders)
folders - an array of doc folder idsincludeSubfolders - Whether to search subfolders
java.lang.IllegalStateException - if includeSubfolders is set differently for doc and admin folders
java.lang.IllegalArgumentException - if any of the folder IDs are negative
public void setAdminFoldersToSearch(int[] folders,
boolean includeSubfolders)
folders - an array of admin folder idsincludeSubfolders - Whether to search subfolders
java.lang.IllegalStateException - if includeSubfolders is set differently for doc and admin folders
java.lang.IllegalArgumentException - if any of the folder IDs are negativepublic void setObjectTypesToSearch(ObjectClass[] classes)
ObjectClass(es).
If this method is not called, all supported ObjectClass(es) will be searched.
Supported ObjectClasses are Documents, Doc Folders, Users, UserGroups and Communities.
classes - an array of ObjectClasses to search
java.lang.IllegalArgumentException - if any 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 - the first result to return, for example "0". The first result is zero-based.maxResults - the maximum number of results to return at a time
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 - the Field by which to order resultspublic void setOrderAscending(boolean ascending)
true).
Note: If resultsOrderBy is a date field, and ascending is set to true,
the results will be returned earlist first.
ascending - false to return results in descending orderpublic void setQuery(IFilterClause filterClause)
setQuery().
setQuery in interface ISearchRequestfilterClause - the 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: At least three characters must be present between wildcard characters: *ad* is invalid.
Note: And, or, not, and near are considered operators in the search string, rather than terms.
Note: 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 - the 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 ©2008 Oracle® Corporation. All Rights Reserved.