IDK Interfaces for Federated Search Service Development
The IDK's Plumtree.Remote.Search package/namespace includes
a set of interfaces to support federated search service development.
The IDK's Plumtree.Remote.Search package/namespace includes the
following interfaces:
- IRemoteSearch
- ISearchQuery
- ISearchUser
- ISearchContext
- ISearchRecord
- ISearchResult
In general, the portal calls these interfaces in the
following order. See the definitions that follow for more information.
- IRemoteSearch.BasicSearch, using ISearchQuery, ISearchUser and ISearchContext as parameters.
- The ISearchResult object returned allows the federated search service to iterate through
the search results and return them to the user. The service calls ISearchResult.GetSearchResultList to retrieve an ISearchRecord for each record returned. ISearchRecord allows you to retrieve the title, description, file URL and image
URL and set the title, description, file URL and image URL to be returned
to the portal.
The sections below provide helpful information on the
interfaces used to implement a federated search service For a complete
listing of interfaces, classes, and methods, see the IDK API
documentation.
IRemoteSearch
The IRemoteSearch interface allows the portal
to initiate a query over a back-end directory structure. BasicSearch allows you to pass in an ISearchQuery that defines the query to be performed. You can also pass in a ISearchUser and ISearchContext for access
to the PRC.
ISearchQuery
The ISearchQuery interface defines the search
query to be performed by the portal. Using ISearchQuery, you can define the scope of the query and provide user preferences
and user information to be used for authentication or user-level access
control. SearchException allows you to provide
useful error messages (for example, the specific preference type that
was not found). For details, see the IDK API documentation. This interface
provides the following methods:
- GetMaxReturn determines the maximum number of records to return per page.
- GetNumberToSkip returns the number of records that will be skipped: where the search
will start. For example, the search could start at record 30.
- GetSearchInfo returns any related administrative preferences set for the associated
Federated Search object in the portal.
- GetSearchResult returns an ISearchResult object that allows the
federated search service to access the results returned by IRemoteSearch.
- GetSearchString returns the query string passed to the portal.
- GetUserInfo returns any User Information settings sent to the federated search
service. To access User Information, you must configure the specific
settings you need in the Web Service editor on the User Information
page.
- GetUserPrefs returns any user settings sent to the federated search service.
To access user settings, you must configure the specific settings
you need in the Web Service editor on the Preferences page.
ISearchUser
The ISearchUser interface can be used to access
the current user's portal object ID and locale, and to obtain the
login token for the current session with the portal to access the
PRC.
ISearchContext
The ISearchContext interface can be used to
access the portal UUID and SOAP service endpoint URI to implement
the PRC.
ISearchResult
The ISearchResult interface allows you to retrieve
the results returned from a search query and return the results to
the portal. The federated search service code must handle pagination;
the methods in the ISearchResult facilitate iteration
over large numbers of search records.
- Get/SetNumberSkipped returns the number of records that were skipped: where the search
started. For example, the search could start at record 30.
- Get/SetSearchResultList returns a SearchRecord array of search results.
- Get/SetTotalNumberofHits returns the total number of search records.
- Is/SetDescriptionEncoded determines whether or not the description for the search results
is HTMLencoded.
ISearchRecord
The ISearchRecord interface allows you to manipulate
the metadata for each search record. Only the title is required.
- Get/SetTitle returns the title for the search record (required).
- Get/SetDescription returns the description for the search record. If the description
should be HTMLencoded, use ISearchResult.SetDescriptionEncoded.
- Get/SetOpenDocumentURL returns the URL that will retrieve the document. This URL must be
accessible over the web or through the gateway. If the document is
gatewayed, make sure to configure the Web Service object with the
appropriate gateway URLs.
- Get/SetImageURL returns the URL to the image that will be displayed with the search
record.