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

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

  2. 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()

To run one-off search tasks...

  1. Open a command window and start the wsadmin command-line tool.

  2. After the wsadmin command environment has initialized, use one of the following commands to initialize the search environment and start the search script interpreter:

    When asked to select a server, you can select any server.

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


Manage the index

 

Related reference


SearchService commands


+

Search Tips   |   Advanced Search