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


Before you begin

To use SearchService administrative commands, use the wsadmin client. See Starting the wsadmin client for information about how to start the wsadmin command-line tool.


About this task

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

Procedure

To run one-off Search tasks...

  1. From the dmgr host:

      cd $DMGR_PROFILE/bin
      ./wsadmin.sh -jython
      execfile("searchAdmin.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, pick the node where the file is stored.

  2. Use the following commands to run one-off indexing tasks.

      SearchService.indexNow(String applicationNames)

        Creates a one-off task that indexes the specified applications 30 seconds after being called.

        This command takes a single argument:

        • applicationNames. The name (or names) of the IBM(r) Lotus(r) Connections application to be indexed when the task is triggered. This argument is a string value. To index multiple applications, use a comma-delimited list. The following values are valid: activities, blogs, communities, dogear, files, forums, profiles, and wikis.

        Note: An optimize operation is not run at the end of the indexing operation.

        For example:

        SearchService.indexNow("dogear, blogs")

      SearchService.indexNowWithOptimization(String applicationNames)

        Creates a one-off task that indexes the specified applications 30 seconds after being called.

        This command takes a single argument:

        • applicationNames. The name (or names) of the IBM(r) Lotus(r) Connections application to be indexed when the task is triggered. This argument is a string value. To index multiple applications, use a comma-delimited list. The following values are valid: activities, blogs, communities, dogear, files, forums, 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.

        This command does not accept any input parameters.

        This operation should not be called during an indexing operation; if it needs to be run, do it at an off-peak time when the application is not expected to be performing intensive I/O operations on the index.


Parent topic

Manage the Search index

Related concepts
Scheduling tasks

Related reference
SearchService commands


   

 

});