Developing Portlets and Integration Web Services: Crawlers and Search Services  

Developing Custom Search Services

The Plumtree Enterprise Web Development Kit (EDK) allows you to create remote search services and related configuration pages without parsing SOAP or accessing the portal API. The EDK Search API provides an abstraction from the necessary SOAP calls; you simply implement an object interface. For a complete listing of interfaces, classes, and methods, see the EDK API documentation.

The EDK's Plumtree.Remote.Search package/namespace includes the following interfaces:

In general, the portal calls these interfaces in the following order. See the definitions that follow for more information.

  1. IRemoteSearch.BasicSearch, using ISearchQuery, ISearchUser and ISearchContext as parameters.

  2. The ISearchResult object returned allows the 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.

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 (i.e., the specific preference type was not found). For details, see the EDK API documentation. This interface provides the following methods:

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 Plumtree Remote Client (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 search service code must handle pagination; the methods in the ISearchResult facilitate iteration over large numbers of search records.

ISearchRecord

The ISearchRecord interface allows you to manipulate the metadata for each search record. Only the title is required.

Best Practices

You should consider the following best practices for every search service:

Next: Deploying Custom Search Services