Best Practices from Oracle Development's A‑Team

Adding browser search engines in WebCenter Content


In a post I made a few years ago, I described how you can add WebCenter Content (UCM at the time) search to the browser's search engines.  I think this is a handy shortcut if you find yourself performing searches often enough in WCC.

Main Article

Well, in the PS5 release, this was actually included as a new feature.  You need to enable the DesktopIntegrationSuite component in order to access it.  Once you do, go to the My Content Server -> My Downloads link.  There you will see the 'Add browser search' link.

Add Browser Search

Once clicked, an OpenSearchDescription XML file is produced which each modern browser supports for adding in the search engine.

Search bar

The one piece that's missing is something I mentioned in my earlier post: forcing authentication.  If you haven't logged into the server, your search will be performed anonymously and you will only get back content that is available to the guest role.  To make sure the search is performed as your user, the extra parameter Auth=Internet can be passed to the server to cause the server to challenge your request and force a login if needed.  Because the definition of the search engine URL is defined within the DesktopIntegrationSuite component, a new custom component can be added to override this.  Basically, the new component must override the dis_search_plugin resource and modify the Url locations.  Below is an example:

&lt;@dynamichtml dis_search_plugin@&gt;  &lt;?xml version="1.0" encoding="UTF-8"?&gt;  &lt;OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"  xmlns:moz="http://www.mozilla.org/2006/browser/search/"&gt;  &lt;ShortName&gt;&lt;$if DIS_SearchPluginTitle$&gt;&lt;$DIS_SearchPluginTitle$&gt;&lt;$else$&gt;Oracle WebCenter Content Server Search&lt;$endif$&gt;&lt;/ShortName&gt;  &lt;Description&gt;&lt;$lc("wwDISSearchPluginDescription")$&gt;&lt;/Description&gt;  &lt;Url type="text/html" method="get" template="&lt;$xml(HttpBrowserFullCgiPath &amp; "?IdcService=DESKTOP_BROWSER_SEARCH&amp;Auth=Internet&amp;MiniSearchText={searchTerms}")$&gt;" /&gt;  &lt;$iconlocation=strReplace(HttpBrowserFullCgiPath,HttpCgiPath,"") &amp; HttpImagesRoot &amp; "desktopintegrationsuite/dis_search_plugin.ico"$&gt;  &lt;Image height="16" width="16" type="image/x-icon"&gt;&lt;$iconlocation$&gt;&lt;/Image&gt;  &lt;Developer&gt;Oracle Corporation&lt;/Developer&gt;  &lt;InputEncoding&gt;UTF-8&lt;/InputEncoding&gt;  &lt;moz:SearchForm&gt;&lt;$xml(HttpBrowserFullCgiPath &amp; "?IdcService=DESKTOP_BROWSER_SEARCH&amp;<strong>Auth=Internet</strong>&amp;MiniSearchText=")$&gt;&lt;/moz:SearchForm&gt;  &lt;/OpenSearchDescription&gt;  &lt;$setContentType("application/xml")$&gt;  &lt;$setHttpHeader("Content-Disposition","inline; filename=search_plugin.xml")$&gt;  &lt;$setHttpHeader("Cache-Control", "public")$&gt;  &lt;@end@&gt;

I've included a a sample component that does just that.

UPDATE (Jan 15, 2013)

In addition to enabling the component, there is also a configuration preference that must be enabled.   After enabling the Desktop Integration Suite component,  go to the 'advanced component manager'.  Go to the bottom to the 'Update Component Configuration' list and select DesktopIntegrationSuite and click Update.  The first entry is to 'Enable web browser search plug-in'.  Check that and click Update.

DIS Configuration

If you've already restarted to enable the DIS component, you do not need to restart for this configuration to take effect.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha

Recent Content