Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.plumtree.remote.prc.search
Interface IPortalSearchRequest

All Superinterfaces:
  ISearchRequest

public interface IPortalSearchRequest
extends ISearchRequest

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 `Field`s 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 `ObjectClasse`s.
`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

### setLanguage

    public void setLanguage(java.lang.String language,
                            boolean limitByLocale)

  Sets the language that the query string will be interpreted in.

  Parameters:
    `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\config
    `limitByLocale` - true to limit the search request to the search user's locale
  Throws:
    `java.lang.IllegalArgumentException` - if language is less than two characters

### setFieldsToReturn

    public void setFieldsToReturn(Field[] properties)

  Sets the `Field`s 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.

  Parameters:
    `properties` - array of `Field`s to retrieve
  Throws:
    `java.lang.IllegalArgumentException` - if any of the fields are not retrievable

### setDocFoldersToSearch

    public void setDocFoldersToSearch(int[] folders,
                                      boolean includeSubfolders)

  Restricts the set of doc folders searched to the specified doc folders. This method does not restrict the set of admin folders searched. If this method is not called, all doc folders will be searched.

  Parameters:
    `folders` - array of doc folder ids
    `includeSubfolders` - whether to search subfolders
  Throws:
    `java.lang.IllegalStateException` - if includeSubfolders is set differently for doc vs admin folders
    `java.lang.IllegalArgumentException` - if any of the folder IDs are negative

### setAdminFoldersToSearch

    public void setAdminFoldersToSearch(int[] folders,
                                        boolean includeSubfolders)

  Restricts the set of admin folders searched to the specified admin folders. This method does not restrict the set of doc folders searched. If this method is not called, all admin folders will be searched.

  Parameters:
    `folders` - array of admin folder ids
    `includeSubfolders` - whether to search subfolders
  Throws:
    `java.lang.IllegalStateException` - if includeSubfolders is set differently for doc vs admin folders
    `java.lang.IllegalArgumentException` - if any of the folder IDs are negative

### setObjectTypesToSearch

    public void setObjectTypesToSearch(ObjectClass[] classes)

  Restricts the search to the specified `ObjectClasse`s. If this method is not called, all supported `ObjectClasse`s will be searched. Supported `ObjectClass`es are Documents, Doc Folders, Users, and Communities.

  Parameters:
    `classes` - array of `ObjectClass`es to search
  Throws:
    `java.lang.IllegalArgumentException` - if unsupported `ObjectClasse`s are included

### setUseBestBets

    public void setUseBestBets(boolean useBestBets)

  Sets whether to use Best Bets. Best Bets are search results that are mapped to a particular search item by a search administrator.

  Parameters:
    `useBestBets` - whether to return special results
  Throws:
    `java.lang.IllegalStateException` - if used with an `IFilterClause`

### setResultsCount

    public void setResultsCount(int firstResult,
                                int maxResults)

  Sets the first result (where to start) and maxResults (how many results to return). If this method is not called, firstResult will default to 0 and maxResults to 10.

  Parameters:
    `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
  Throws:
    `java.lang.IllegalArgumentException` - if firstResult or maxResults are negative

### setResultsOrderBy

    public void setResultsOrderBy(Field field)

  Orders the results by the specified `Field`. If `Field` is not a numeric or date field, the results will be returned in rank order.

  Parameters:
    `field` - `Field` to order results by

### setOrderAscending

    public void setOrderAscending(boolean ascending)

  Sets the results to be returned in ascending or descending order. Default is ascending order (`true`). Note that is resultsOrderBy is a date field, and asending is set to true, the results will be returned earlist first.

  Parameters:
    `ascending` - set to `false` to return results in descending order

### setQuery

    public void setQuery(IFilterClause filterClause)

  Sets the query associated with this request. Note: this overrides any query previously set by a call to any version of `setQuery()`.

  Specified by:
    `setQuery` in interface `ISearchRequest`
  Parameters:
    `filterClause` - `IFilterClause` created from `ISearchFactory`
  Throws:
    `java.lang.IllegalStateException` - if used in conjunction with BestBets

### setQuery

    public void setQuery(java.lang.String queryString,
                         IFilterClause filterClause)

  Sets the query associated with this request. The returned `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()`.

  Specified by:
    `setQuery` in interface `ISearchRequest`
  Parameters:
    `queryString` - `String` to search
    `filterClause` - `IFilterClause` created from `ISearchFactory`
  Throws:
    `java.lang.IllegalStateException` - if used in conjunction with BestBets

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

For additional information on the IDK, including tutorials, blogs, code samples and more,see the AquaLogic User Interaction Developer Center on BEA dev2dev.

Copyright ©2007 BEA Systems, Inc. All Rights Reserved.