Randy Ellsworth

Mar 21, 20232 min

How to Run Active Workspace TcFTSIndexer as a Service

Updated: Nov 27, 2023

In the Active Workspace Client (AWC), the TcFTSIndexer must be running for Global Search to work.

The Global Search in the Active Workspace Client (AWC).

Out of the box, to achieve this, you must run the TcFTSIndexer program in a Teamcenter Command Prompt similar to the following to pick up *new* objects to be available in the search results.

runtcFTSIndexer -task=objdata:sync -interval=300

As an administrator, you know that running commands in a Command Prompt is okay for one-offs but not okay to leave running all the time due to the server unexpectedly rebooting or the System Administrators may push updates to the Operating System (OS) and reboot the system. After either of these situations happen, then indexing is no longer running. Then you, the administrator, must log into the server and restart the TcFTSIndexer process. There is a better way.

What we need to do is create a wrapper around a batch script that starts our command. The traditional way to do this is with a commercial utility, called AlwaysUp, which runs as a service. However, AlwaysUp only checks that AlwaysUp is running and not if the underlying command is running. I found an open source solution using NSSM.

NSSM (Non-Sucking Service Manager), it really is named that. validates the underlying program is running and it is simple to use. Not only will it save you money but will save hours of debugging time trying to figure out why indexing is not working.

After downloading and installing NSSM (I used E:\NSSM), create a batch script in that directory named Start-TcFTSIndexerSync.cmd.

The NSSM Installation directory and script used in the example.
The Start-TcFTSIndexerSync.cmd startup script contents.

Create a service, named TcFTSIndexerSync (no spaces) but use Display name Teamcenter TcFTSIndexer Sync so the service sorts correctly with your other Teamcenter services.

The services property page with the indicated service names.
The Services dialog post adding the service.

Now you will be able to start and stop the TcFTSIndexer utility for sync without much effort. Furthermore, your environment is more robust since the service will automatically start this utility if the server is rebooted. No more manual management.

This post is provided by Sherpa Design, Inc.