Configure the external search result portlet

The search center to display the returned results from external search engines, to configure the external search result portlet. One copy of the external search result portlet is on the search center results page and one copy of the portlet is defined when the product is installed. To get results from more than one external search engine, clone and configure this portlet and add it to the search center result page.

You must be logged in as Administrator to add an external search results portlet to the search center.

The search engine service to use must provide a web-interface and return the search result as either an RSS or Atom feed. For example the search result page which Google would return is HTML based and cannot be rendered within the External Search Result portlet.

The external search results portlet can only be added to the search center on the portal search page; It will not function anywhere else.

  1. Navigate to the Portal Administratoin -> Portlets page.

  2. Edit the value of the searchEngineUrl parameter.

      This value represents the URL of the third-party search engine that you want to be queried. You must include the ${searchTerms}in the value. During a search query, ${searchTerms} is replaced by the actual query.

      For example, you could query developerWorks using the following value for the searchEngineUrl parameter:

      http://www.ibm.com/developerworks/views/rss/customrssatom.jsp?zone_by=WebSphere&type_by=Articles&search_by=${searchTerms}

      In the developerWorks URL, there are two required fields, zone_by and type_by. Above, we defaulted them to WebSphere and Articles. If you enter the url above into a browser the other choices for these parameters are pretty clear.

      More examples include the following.

        Google News: http://news.google.com/news?output=rss&q=${searchTerms}

        Yahoo News: http://news.search.yahoo.com/news/rss?p=${searchTerms}&ei=UTF-8&eo=UTF-8

        flickr: http://www.flickr.com/services/feeds/photos_public.gne?tags=${searchTerms}&format=atom

  3. Optional. If you want a moreā€¦ link at the bottom of the results that links to the actual search engine page, enter a value for searchEngineFullPageUrl and use ${searchTerms} to represent the site user's query string as you did in the previous step.

      For example:

      http://www.ibm.com/developerworks/search/searchResults.jsp?searchSite=dW&searchScope=dW&query=${searchTerms}

You also need to modify the proxy configuration of the search center portlet.


Parent

Configure external searches


Modify the search center proxy configuration

To add external search engines or modify the existing search engine, modify the proxy configuration of the search center portlet. Out of the box, the search center portlet only allows connections to the URL of the default external search engine http://www.ibm.com/developerworks /views/rss/*.

This task is completed using Rational Application Developer.

To change proxy configuration, modify the proxy-config.xml file that is bundled with the portlet. You can do this a number of ways but the following instructions are for using Rational Application Developer.

  1. From the Rational Application Developer user interface click File -> Import.

  2. Browse to the installableApps directory (C:/IBM/PortalServer/installable/Apps) and select the searchCenter.war

  3. You should not add the searchCenter.war to an EAR file, so make sure add it to an Ear file is not checked.

  4. You should not include the listed jars, so verify option is not checked.

  5. Expand Web content -> WEB-INF and open proxy-config.xml.

  6. You can do either of the following:

    • Copy the <proxy:policy . . . > section for each URL. This option is the most secure option.

    • Change the URL to an * (asterisks). This option is less secure but only administrators can set the actual URLs.

      Ignore the errors in Rational Application Development and export the XML file. To prevent mistakes, export to the file to a temporary location such as C:/temp/searchCenter.war.

  7. Use the administration portlet to update the searchCenter.war. Click Administration -> web modules them find searchCenter.war and update it.

 


+

Search Tips   |   Advanced Search