Adding third-party search options to the search controlAdded by IBM on February 11, 2013 | Version 1 (Original)
|You can extend the search control in IBM® Connections to include options from third-party search engines by configuring settings in the LotusConnections-config.xml file.
Before you begin
To edit configuration files, you must use the wsadmin client. See Starting the wsadmin client
for information about how to start the wsadmin command-line tool.
About this task
When you configure settings for additional search options in the LotusConnections-config.xml
file, those options are made available to users from the Search drop-down menu, allowing them to search content from the sources described in the configuration file. When a user selects a third-party search engine from the Search menu and enters a query term, the results of the search display on a third-party search results page.
To add a third-party option to the IBM
Connections search control, complete the following steps.
Parent topic: Managing the Search application
Applying common configuration property changes
- Use the wsadmin client to access and check out the IBM Connections configuration files.
- Enter the following command to access the IBM Connections configuration file: execfile("connectionsConfig.py")
If prompted to specify a service to connect to, type 1 to pick the first node in the list. Most commands can run on any node. If the command writes or reads information to or from a file using a local file path, you must pick the node where the file is stored. This information is not used by the wsadmin client when you are making configuration changes.
- Enter the following command to check out the IBM Connections configuration files:
- working_directory is the temporary working directory to which the configuration XML and XSD files are copied and are stored while you make changes to them. Use forward slashes to separate directories in the file path, even if you are using the Microsoft® Windows® operating system.
AIX® and Linux® only: The directory must grant write permissions or the command does not run successfully.
- cell_name is the name of the WebSphere® Application Server cell hosting the IBM Connections application. This argument is case-sensitive, so type it with care. If you do not know the cell name, type the following command while in the wsadmin command processor:print AdminControl.getCell()
- AIX or Linux:LCConfigService.checkOutConfig("/opt/temp","foo01Cell01")
- Microsoft Windows:LCConfigService.checkOutConfig("c:/temp","foo01Cell01")
- Navigate to the temporary working directory that you specified in the previous step, and then open the LotusConnections-config.xml file in a text editor.
- Define the additional search option as a child element of the serviceName="search" element by adding a <sloc:searchScope> element that contains the details of the third-party service.
<sloc:serviceReference bootstrapHost="" bootstrapPort="" clusterName="cluster" enabled="true" serviceName="search" ssl_enabled="true">
<sloc:static href="http://myserver.example.com:9081" ssl_href="https://myserver.example.com:9444"/>
<!-- Add third Party Search Options here -->
<sloc:searchScope scopeName="Yahoo" enabled="true" isGlobal="true">
<sloc:static href="http://search.yahoo.com/search?q=" ssl_href="http://search.yahoo.com/search?q="/>
<!-- Third party Search options added-->
- <sloc:searchApplicationURL> defines the URL to the third-party search application. When a user selects the third-party search engine from the Search menu and enters a search term, that search query term is appended to this URL.
Ensure that the URL that you define will use the search query terms that are passed to the URL. Pointing to a base URL, such as www.yahoo.com, does not work. Refer to the external documentation for the third-party search engine to find the correct URL to use. For example, the correct URL for searching using the Yahoo search engine is "http://search.yahoo.com/search?q=".
- <sloc:searchScopeIconClass> specifies the CSS class for an icon that identifies the third-party search option in the Search drop-down menu. The value of <sloc:searchScopeIconClass> must always be set to lconnSprite lconnSprite-iconThirdParty16.
For the new search engine to display in the search control, ensure that the enabled parameter is set to true for the <sloc:serviceReference> and <sloc:searchScope> elements. The isGlobal parameter for the <sloc:searchScope> element must also be set to true.
- To point to a Search option that is locally available on the same URL as the IBM Connections server, use the <sloc:hrefPathPrefix> tag instead of the <sloc:href> tag.
<sloc:searchScope scopeName="myPlaces" enabled="true" isGlobal="false">
In this case the isGlobal parameter is set to false because the example is for a local search.
- Save your changes and then close the LotusConnections-config.xml file.
- After making changes, you must check the configuration files back in, and you must do so during the same wsadmin session in which you checked them out for the changes to take effect. See Applying common configuration property changes for information about how to apply your changes.