Purging content from the index 

Use the deleteFeatureIndex command to purge content for a specific application from the Search index in a single-node environment.


Before starting


To edit configuration files, use the IBM WAS wsadmin client. See Starting the wsadmin client for details.
Note: In an environment with multiple nodes, use the deleteFeatureIndex command only when you want to delete the index for an application that has been uninstalled. If you want to delete content for a specific application from the index, use the startBackgroundIndex command to rebuild a new index for all applications instead. For more information about this command, see Create a stand-alone index.


About this task


If there is a problem with indexed content from any of the IBM Connections applications, instead of deleting and recreating the entire index, you can use the deleteFeatureIndex command to remove and purge all documents for a given application from the index. The command deletes the content from the database that is shared by all the servers in the cluster as well as from the indexes.

When you run the deleteFeatureIndex command, the command removes indexed content for the specified application from all the nodes in your deployment. Indexing tasks are automatically disabled at the start of this process and re-enabled when the process is complete, regardless of whether the tasks were disabled initially.

Note: When you remove an application from the Search index, you need to rebuild the indexes for the social analytics service. The social analytics indexes are completely rebuilt every night by default, however, to fully remove an application's index immediately, use the sandIndexNow command on each of the social analytics indexes. For more information about the sandIndexNow command, see Running one-off social analytics indexing tasks.


Procedure


To purge content for a specific application from the index...

  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 to remove and purge content from a specified application from the Search index.

      SearchService.deleteFeatureIndex(String applicationName)

        Removes and purges the content for the specified application from the Search index.

        This command takes a string value, which is the name of the application whose content is to be deleted. The following values are valid: activities, blogs, communities, dogear, files, forums, profiles, and wikis.

        For example:

        SearchService.deleteFeatureIndex("activities")


Parent topic

Manage the Search index

Related concepts
Configure indexing tasks for the social analytics widgets


Related tasks


Running one-off social analytics indexing tasksCreate a stand-alone index

+

Search Tips   |   Advanced Search