+

Search Tips   |   Advanced Search

Add External Search Results to the Search Center

Another type of scope is the remote search service scope which uses external search engines.

We 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.

There are two approaches for configuring external searches:

  • One approach is to define external scopes that allow the visitors to directly start external searches from the scope drop-down of the search box. The search results display in a new browser window.

  • The other approach is to define an external search engine that contributes results to the Search Center results page. Site visitors see the external search engine results from the Search Center page in the External Results portlet. The following procedure describes how you do this.

  1. Go to the Portal Administration > Portlet Management > Portlets page.

  2. Search for the string External.

    The portlet to modify is named External Search Results.

  3. Edit the value of the searchEngineUrl parameter.

    This value represents the URL of the third party search engine to be queried. include the ${searchTerms} in the value. During a search query, ${searchTerms} is replaced by the actual query. Example search engine URLs:

      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

  4. Optionally add a "More" link to the end of the External Search Results that links to the engine page...

      searchEngineFullPageUrl = engine URL plus ${searchTerms}

    For example:

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

  5. To save the changes, click OK twice.

  6. Adapt the proxy configuration file of the Search Center portlet...

    1. Edit...

        /wp_profile/installedApps/cell/PA_Search_Center.ear/searchCenter.war/WEB-INF/proxy-config.xml

    2. Specify the URL for the third party search engine in the proxy policy tag <proxy:policy>. For example, for Yahoo News, the proxy policy tag looks as follows:
      <proxy:policy url="http://news.search.yahoo.com/news/*" acf="none">
          <proxy:actions>
              <proxy:method>GET</proxy:method>
              <proxy:method>HEAD</proxy:method>
          </proxy:actions>
          <proxy:mime-types>
              <proxy:mime-type>text/xml*</proxy:mime-type>
              <proxy:mime-type>application/xml*</proxy:mime-type>
              <proxy:mime-type>application/atom+xml*</proxy:mime-type>
              <proxy:mime-type>application/rss+xml*</proxy:mime-type>
          </proxy:mime-types>
      </proxy:policy>

  7. Stop and restart the Search Center application. To do this, you access the WAS console and click Applications > WebSphere Enterprise Applications. Then we can stop and restart the Search Center application.


What to do next

To add results from additional external search engines, clone and configure additional External Search Result portlets, add them to the Search Center page and update the file proxy-config.xml accordingly.


Parent Search Center

Previous topic: Configure search collections and scopes

Next topic: Configure keywords for suggested links