Upgrading to Solr 8 on Windows

NetX relies on Apache Solr to provide robust search capability. Starting in version 10, NetX requires the use of Solr 8. This guide provides instructions on the steps necessary to install the new version of Solr and remove the legacy Solr files from an existing NetX installation.

Installing Solr 8

  1. This tutorial assumes that you have already downloaded and run the NetX 9+ installer to upgrade your existing NetX application files. If you have not done so, follow the steps in the Upgrading NetX section in Upgrading NetX on Windows first, then return to this tutorial.
  2. Download the Solr installation package here: https://www.apache.org/dyn/closer.lua/lucene/solr/8.11.1/solr-8.11.1.zip?action=download
  3. Create a Solr folder. In this example, we will create C:\Program Files\Solr.
  4. Extract or copy the contents of the zip file into C:\Program Files\Solr.

  5. You now need to copy the Solr core from the NetXposure application folder into the Solr folder. Copy the C:\Program Files\NetXposure\solr-cores\8\netx folder into C:\Program Files\Solr\server\solr\. When you are finished, you should have a C:\Program Files\Solr\server\solr\netx folder that contains the Solr cores.

  6. Copy your existing synonyms.txt file from C:\Program Files\NetXposure\solr\netx\conf into C:\Program Files\Solr\server\solr\netx\conf and overwrite the default file if requested. If you have a synonyms-custom.txt file inside of your NetX application directory, that file should be copied instead of synonyms.txt and renamed to synonyms.txt once it has been copied into the Solr application folder. Synonyms-custom.txt is no longer a supported filename.
  7. Now it's time to start Solr. Open Powershell, and run this command: 'C:\Program Files\Solr\bin\solr.cmd' start

  8. Now that Solr has successfully started, You should be able to log into the Solr admin console using the port number shown when you start the engine. Open a web browser and type http://localhost:8983/solr/

  9. Click Core Admin to make sure Solr is able to load the NetX core.

  10. To inform the NetX application where to find the new Solr installation, edit the exogen-config.xml file and correct the value for the property below:

    Property Description

    This value tells NetX where to locate the NetX service.

    Value options:

    Requires restart? Yes

Solr memory settings

By default, the bin/solr script sets the maximum Java heap size to 512M (-Xmx512m). For production, you’ll want to increase the maximum heap size; we recommend starting with at least 2 GB. To do this, open the C:\Program Files\Solr\bin\solr.in.cmd file and edit the SOLR_JAVA_MEM variable as such:

SOLR_JAVA_MEM="-Xms512m -Xmx2048m"

Remember to restart Solr after changing the memory settings. Open Powershell and run these commands:

& 'C:\Program Files\Solr\bin\solr.cmd' stop -all
& 'C:\Program Files\Solr\bin\solr.cmd' start

Removing old Solr files

Now that you have a separate instance of Solr, you can safely remove the old Solr application files that were bundled with the NetX installation.

  1. Remove the Solr WAR file. By default, this is located in C:\Program Files\NetXposure\webapps\solr.war.
  2. If there is an unpacked WAR, remove C:\Program Files\NetXposure\webapps\solr as well.
  3. Remove the configuration descriptor: C:\Program Files\NetXposure\conf\Catalina\localhost\solr.xml
  4. Back up the old index data, found here:  C:\Program Files\NetXposure\solr\netx\data. After the data has been backed up, you can delete the C:\Program Files\NetXposure\solr directory.

Starting NetX

Now that Solr 7 has been installed and started, you can start the NetX service.

  1. Open the Services console on your Windows server.
  2. Find the NetX service, right-click and hit Start.
  3. Wait for the status to report that the service has been started.>

Verifying the upgrade

After initial startup after the upgrade to NetX 10, log in to the site and verify that assets and data appear correctly and that search is functioning properly. If you encounter issues, you may need to launch a manual reindex of your site. This could take a while to complete depending on the size of your installation (number of assets and/or attributes) so you may experience missing assets or other data inconsistencies until the reindex is complete.

Running Solr as a Windows service

Since Solr is no longer managed by the NetX service, it will have to be manually started if the server reboots or is shut down. It is possible to run Solr as a Windows service using third-party solutions, but NetX cannot guarantee support for those configurations. Do so at your own risk.

Was this article helpful?
0 out of 0 found this helpful