Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

  1. See the searchContent method in https://github.com/Jasig/SimpleContentPortlet/tree/master/src/main/java/org/jasig/portlet/cms/mvc/portlet/SearchContentController.java
  2. Here is where the work happens, EventRequest.getEvent() returns a SearchRequest
  3. SearchRequest specified the search terms that were specified, your portlet should use these to do its searching
  4. If there is a hit create a SearchResults object, copy over the queryId, set the windowId, for each result create a SearchResult and set title/summary.  Set the type to a string relevant to your portlet.  The type is used to determine which tab to display the results on (as determined by map "searchTabs" in bean https://github.com/Jasig/uPortal/blob/master/uportal-war/src/main/resources/properties/contexts/servicesContext.xml)For prioritizing results for the ajax search-as-you-type response (see xxx in bean https://github.com/Jasig/uPortal/blob/master/uportal-war/src/main/resources/properties/contexts/servicesContext.xml)
  5. Call EventResponse.setEvent to send the results back to the search portlet
  6. This example is Spring 3.x specific but it can be doing using the plain-old portlet 2 APIs as well

...

Info
iconfalse
titleAdditional References
 Configuring Search

List of Apereo Portlets Already Integrated with the uPortal Search API

PortletSearch Results Type value
Calendarv2.1.3-M3: Calendar, pre v2.1.3-M3: null
Simple Content Management Portletv1.0.8: Portlet Content, pre v1.0.8: null
Contacts Portletcontact
Warning
iconfalse
titleHaving problems with these instructions?

Please send us feedback at uportal-user@lists.ja-sig.org