Home

 

Enable and disable indexing tasks

Use SearchService administrative commands to enable and disable the tasks defined in the Home page database.


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


To enable or disable scheduled tasks in the Home page database...

  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 these commands to disable and re-enable indexing tasks:


    SearchService commands for enabling and disabling indexing tasks

    Option Description
    SearchService.disableIndexingTask(String taskName) Disables the indexing task with the specified name.This command takes a single argument:

    • taskName. The name of the task to be disabled. This argument is a string value.

    Using this command affects the indexing process as follows:

    • When the command is run before the indexing task fires, the indexing operation is prevented from starting.

    • When the command is run during the indexing operation for a feature, the search feature stops indexing.

    Results for the current feature that is being indexed are discarded but, if, as part of an indexing task, some features have been successfully crawled, those features are up-to-date in the index. For example, if a task is fired that is to index Bookmarks, Blogs, and Activities (in that order) and the disable command is called while Blogs is being indexed, when the task is enabled again, Blogs and Activities resume indexing at the same point as the previously-called task. The next time that the search feature is restarted, all indexing tasks are re-enabled. For example:

      SearchService.disableIndexingTask("mine")
      

    The disabled task remains disabled until the server is restarted or until the task is re-enabled.

    SearchService.enableIndexingTask(String taskName) Enables the indexing task with the specified name. This command uses the current schedule.This command takes a single argument:

    • taskName. The name of the task to be enabled. This argument is a string value.

    For example:

      SearchService.enableIndexingTask("mine")
      


Configure scheduled tasks

 

Related reference


SearchService commands


+

Search Tips   |   Advanced Search