Monday, September 29, 2008

OpenSearch Integration for Lotus Connections

View Comments

200809262042.jpgA while ago, I noticed that one of our competitors uses OpenSearch to provide quick, easy integration with the browser. You see, any page that implements this specification will automatically show up in browsers such as Mozilla Firefox v2+ and Internet Explorer 7 (see the screenshot). Searching social data from the browser is very powerful because it encourages adoption. If a search doesn't return the expected results, all a user has to do, is change the search engine in the browser and re-submit. Easy. Simple.

Not to be outdone, I decided to read the specification and see how complicated it would be to add this to Lotus Connections.

Turns out, it's a 15 minute task! Basically, you create one XML file for each search capability you want to provide. As an example, I created 6:

Each file looks roughly like this. If you want to use them on your deployment, simply change the host name as shown in the screenshot below. If you want to add more, simply do the search you want to provide and then copy the URL format to the template section.


To add this to Lotus Connections, follow this simple process:

  1. Copy the files above to <DOC_ROOT>/search ( e.g. /opt/IBM/HTTPServer/htdocs/en_US/search or C:\IBM\HTTPServer\htdocs\en_US\search)
  2. Go to <WAS_PROFILE_ROOT/installedApps/<CELL_NAME>/Activities.ear/oawebui.war/WEB-INF/jsps/html_prototype/fragments/mainpage
  3. Save a backup of setupajax.jsp
  4. Open setupajax.jsp with your favorite text editor
  5. Add the following lines inside the <HEAD> section of the file

    <link rel="search" type="application/opensearchdescription+xml" title="Search Profiles by Name" href="/search/searchProfilesName.xml">
    <link rel="search" type="application/opensearchdescription+xml" title="Search Profiles by Tag" href="/search/searchProfilesTag.xml">
    <link rel="search" type="application/opensearchdescription+xml" title="Search Activities" href="/search/searchActivities.xml">
    <link rel="search" type="application/opensearchdescription+xml" title="Search Blogs" href="/search/searchBlogs.xml">
    <link rel="search" type="application/opensearchdescription+xml" title="Search Communities" href="/search/searchCommunities.xml">
    <link rel="search" type="application/opensearchdescription+xml" title="Search Dogear" href="/search/searchDogear.xml">

  6. Save and close the file
  7. Repeat steps 3-6 for the following files:
    • Blogs.ear/blogs.war/themes/blog/_header.vm (and for each theme)
    • Communities.ear/tango.web.ui.war/WEB-INF/jsps/html/tiles/frameworkHeader.jsp
    • Dogear.ear/dogear.webui.war/h3/jsp/main/h3.jsp
    • Profiles.ear/peoplepages.war/WEB-INF/jsps/html/tiles/frameworkHeader.jsp
    • Homepage.ear/dboard.war/web/jsp/main.jsp

And there you have it! You may want to change the code above just a bit so that, for example:

  • when you are in Profiles only the Profiles search shows up
  • when you are in Blogs, only the Blogs search shows up
  • etc...

That's left as an exercise to the reader.... For now, follow these simple steps and you can start searching across Lotus Connections from your browser!!

blog comments powered by Disqus