Installing Query Modifier

Before installing the Query Modifier, you must install Watson™ Explorer.

See Installing Watson Explorer for instructions.

Prerequisites for Linux:
  • If you want the Query Modifier to run on the Java shipped with Watson Explorer, modify your Environment PATH so that Watson Explorer Java is listed before the system Java.
    Note: This makes the Watson Explorer Java the default for any Java program that is run by this user.
  • Add this to your .bashrc file: export PATH=/opt/ibm/WEX/Engine/java/jre/bin:$PATH
  • You might also need to set JAVA_HOME: export JAVA_HOME=/opt/ibm/WEX/Engine/java/jre
Installing the Query Modifier:
Linux

As either root user or a user with sudo ability, locate the Watson Explorer Engine installation directory, by default /opt/ibm/WEX/Engine. The Query Modifier installer, querymodifier-install.sh, can be found in the nlq directory of your Watson Explorer Engine installation directory.

  1. After Watson Explorer Engine has been bootstrapped, run querymodifier-install.sh. You might need to give this file executable permissions with chmod. Next, on RHEL 7 or later systems, run the command, chkconfig querymodifier on.
  2. Start the Query Modifier Service. As either root user or a user with sudo ability, start Query Modifier by using the following command:
    /etc/init.d/querymodifier start

    The Query Modifier service automatically starts when the system boots.

    Use the stop command to stop the service.

    /etc/init.d/querymodifier stop

    To restart the service, such as for configuration changes to take effect, use the restart command, which requires root access.

    /etc/init.d/querymodifier restart
Windows

As an Administrator, locate the Watson Explorer Engine installation directory, by default: \Program Files\IBM\WEX\. The Query Modifier installer, querymodifier-install.ps1, can be found in the nlq directory of your Watson Explorer Engine installation directory.

  1. After Watson Explorer Engine is bootstrapped, run querymodifier-install.ps1 in the nlq directory. You might need to either run this file from an existing Powershell prompt or right-click its icon and select Run with Powershell.
  2. Start the Query Modifier Service. Open the Services window (Control Panel > System and Security > Administrative Tools). Double-click Services.) Choose the Query Modifier Service and click the \Start Service button.

If you get the error message Query Modifier cannot be installed until Engine is property bootstrapped, follow the procedure in How to fix error “Query Modifier cannot be installed until Engine is properly bootstrapped” while installing Watson Explorer's query-modifier

Uninstalling the Query Modifier:
Linux

As either root user or a user with sudo ability, locate the Watson Explorer Engine installation directory, by default /opt/ibm/WEX/Engine. The Query Modifier uninstaller, querymodifier-uninstall.sh, can be found in the nlq directory of your Watson Explorer Engine installation directory.

  1. Stop the Query Modifier Service.
  2. Run querymodifier-uninstall.sh. You might need to give this file executable permissions with chmod.
Windows

As an Administrator, locate the Watson Explorer Engine installation directory, by default: \Program Files\IBM\WEX\. The Query Modifier uninstaller, querymodifier-uninstall.ps1, can be found in the nlq directory of your Watson Explorer Engine installation directory.

  1. Stop the Query Modifier Service.
  2. Run querymodifier-uninstall.ps1 in the nlq directory. You might need to either run this file from an existing Powershell prompt or right-click its icon and select Run with Powershell.