Add indexing tasks for the social analytics widgets 

Use SearchService administrative commands to schedule social analytics indexing tasks in the Home page database. A nightly task is scheduled to run after the optimize task by default. Every time the social analytics indexing task runs, the index for the social analytics widgets is recreated.


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

The social analytics indexing process includes the following five jobs. You can schedule these jobs individually or in a batch.

evidence

graph

manageremployees

tags

taggedby

communitymembership

When defining a social analytics scheduled task in the Home page database, you need to specify when the scheduler starts the task. The schedule is defined using a Cron schedule. For more information about the scheduler, see Scheduling tasks.

It is not possible to specify an end time for an indexing task. All tasks run as long as they need to. The startby interval defines the time period by which a task can fire before it is automatically canceled. This mechanism ensures that tasks do not queue up for an overly long period before being canceled, and allows for tasks than run for longer than the default indexing schedule, such as initial index creation.


Procedure

To define a social analytics scheduled task...

  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 command:

      SearchService.addSandTask(String taskName, String schedule, String startBy, String jobs)

        Creates a new scheduled indexing task definition for the social analytics service in the Home page database.

        This command takes the following arguments:

        • taskName. The name of the scheduled task. This argument is a string value, which must be unique.

        • schedule. The time at which the scheduled task starts. This argument is a string value that must be specified in Cron format.

        • startBy. The time given to a task to fire before it is automatically canceled. This argument is a string value that must be specified in Cron format.

            This parameter should be used to ensure that indexing tasks are not queued up and running into server busy times. Under normal conditions, the only factors that might cause a task to be delayed are that overlapping or coincident tasks are trying to fire at the same time, or an earlier task is running for a long time.

        • jobs. The name, or names, of the jobs to be run when the task is triggered. This argument is a string value. To index multiple jobs, use a comma-delimited list. The following values are valid: evidence, graph, manageremployees, tags, taggedby, and communitymembership.

        All the arguments are required.

        For example:

        SearchService.addSandTask("customSaNDIndexTask", "0 0 1 ? * MON-FRI", "0 10 1 ? * MON-FRI", "evidence,graph,manageremployees,tags,taggedby,communitymembership")

  3. To refresh the Home page database to include the newly-added tasks, use the following command:

      SearchService.refreshTasks()


Parent topic

Configure indexing tasks for the social analytics widgets

Related concepts
Scheduling tasks

Related reference
SearchService commands


   

 

});