Home
Running one-off tasks
The SearchService MBean provides commands that allow you to create an indexing optimize task that is scheduled to run once and only once, 30 seconds after being called.
To use SearchService administrative commands, use wsadmin. See Start the wsadmin client for information about how to start the wsadmin command line tool.
Notes
To run one-off search tasks...
- If the time between issuing these commands is less than the polling interval for the search scheduler, then tasks might not execute in the same order as the order in which the commands were issued.
- You should wait at least the duration of the poll interval after issuing the following commands before issuing another one of the commands:
- indexNow()
- indexNowWithOptimization()
- optimizeNow()
- Open a command window and start the wsadmin command-line tool.
- After the wsadmin command environment has initialized, use one of the following commands to initialize the search environment and start the search script interpreter:
- Stand-alone deployment:
execfile("searchAdmin.py")
- Network deployment:
execfile("WAS_HOME/profiles/Dmgr01/config/bin_lc_admin/searchAdmin.py")
When asked to select a server, you can select any server.
- Use the following commands to list the tasks defined in the Home page database:
SearchService commands for running one-off tasks
Option Description SearchService.indexNow(String featureNames) Creates a one-off task that indexes the specified services 30 seconds after being called.This command takes a single argument:
- featureNames. The name (or names) of the IBM Lotus Connections feature to be indexed when the task is triggered. This argument is a string value. To index multiple features, use a comma-delimited list. The following values are valid: activities, blogs, communities, dogear, files, profiles, and wikis.
An optimize operation is not run at the end of the indexing operation. For example:
SearchService.indexNow("dogear, blogs")
SearchService.indexNowWithOptimization(String featureNames) Creates a one-off task that indexes the specified services 30 seconds after being called.This command takes a single argument:
- featureNames. The name (or names) of the IBM Lotus Connections feature to be indexed when the task is triggered. This argument is a string value. To index multiple features, use a comma-delimited list. The following values are valid: activities, blogs, communities, dogear, files, profiles, and wikis.
For example:
SearchService.indexNowWithOptimization("dogear, blogs")
SearchService.optimizeNow() Creates a one-off task that performs an optimize operation on the search index, 30 seconds after being called. The command does not accept any input parameters.
Related reference