NX Solr Indexing for the Reuse library on server and clients (without Documentation server)

2024-05-28T08:14:16Z
NX System Administration NX for Design

Summary


Details

This document describes how to setup Solr indexing without the documentation server, so that it can be used to search the NX reuse library.

In the past the Siemens Documentation server was used for this purpose, however with more recent versions of the Doc server Solr was replaced by ElasticSearch, and therefor it's no longer possible to use the Documentation server for this purpose and a stand-alone option was needed as a replacement. 

This is an addition to the old Article: https://support.sw.siemens.com/en-US/knowledge-base/PL8610998. However this old article still contains a lot more info on how to use the indexer efficiently. This article is about how to set up the indexer without the doc server, but with a stand-alone indexer.

It's also possible to use the solr service that comes with active workspace. In this case, you can skip certain steps in this manual. 

Solution

1.      Software Prerequisites

a)       Download latest Solr release (download link as below), need to download Binary releases.

https://solr.apache.org/downloads.html

https://archive.apache.org/dist/lucene/solr/ (This link is for Solr previous releases)

Note: The downloaded .tgz extension is not recognized by default in Windows. If that's the case with you, you’ll need to download and install a compression/decompression utility that can handle this extension, such as 7-zip ( https://www.7-zip.org/download.html ), firstly, .tgz will be extracted as .tar file, then use the utility to extract the .tar again.

b)      It will need the Java Runtime Environment (JRE) version 11 or higher, the links below are for JAVA 11, you can choose higher version if needed.

https://www.oracle.com/java/technologies/downloads/#java11  (Oracle JAVA 11)

https://jdk.java.net/java-se-ri/11   (OpenJDK 11)

https://www.azul.com/downloads/?version=java-11-lts&os=windows&architecture=x86-64-bit&package=jre    (Zulu JAVA 11)

c)       Download free software NSSM (latest version 2.2.4-101), (This software is optional, to be used for installing Windows Service to start Solr automatically)

https://nssm.cc/download

d) Download the attached NXReuse_v2.zip below.

NXReuse_v2.zip (28.3 KB)

2.      Steps

a)       Extract the downloaded Solr to a directory, for example, “D:\Solr9” (This directory will be referred as ‘SOLR_DIR’ in subsequent paragraphs)

b)      Extract NXReuse.zip to folder <SOLR_DIR>\server\solr, the folder structure should look like below, the red rectangle folder is the extracted folder.


c)       (Optional) Open the downloaded “NSSM” ZIP archive file and extract the wntx64 version “nssm.exe” to the specified folder (for example, put it into the folder “SOLR_DIR” mentioned above)


d)      Go to folder where “NXReuse” is extracted to, select “Reuse_Solr_env.cmd” and MB3 --> Edit, in the opened file, set the right directory for the software mentioned above.


SOLR_DIR      –  This is the folder where the download Solr software extracted to

JAVA_HOME –  Where is the JAVA software is installed, it should be set to the main folder of  JAVA JDK, which has the sub-directory ‘bin’.

NSSM_DIR    –  Where is nssm.exe located (No need if you don’t install Windows service)

e)      You can double click on “Reuse_Solr_start.cmd” to start Solr Server for Reuse Library before launch NX (It will have a console window as picture below and don’t close the console Window during NX running otherwise will shut-down the Solr server)


f)        You can put the link below into browser to verify if the Solr Server is running or not.

http://localhost:8283/solr/#/NXReuse/core-overview

Note: If you have not installed the legacy PLM Documentation server before, it will need to import one Windows Registry from this file “patch_reuse_solr.reg” (in the same location as the command files above, double click on the file to import it), and this step will be eliminated in coming NX release.

3.      Install a Windows Service to start Solr Server automatically

As mentioned above, it will need to start the Solr server manually before running NX Reuse Library and should not close the console window, here we provide two command file to install/uninstall a Windows service which can be used to start Solr server automatically. This will require one software “NSSM” mentioned in “Software Prerequisites” (refer to step c) in section 2)

Before running the command file, edit “Reuse_Solr_env.cmd” to set the correct location for the software.

a)       Install the service

Select the command file “Reuse_Solr_service_install.cmd” and MB3 --> Run as administrator (the Windows service installation requires administrative permissions).

Select “Yes” in the popped-up message (from Windows system) and you will see successful message from the console window and pass any key to end the console window.


If you see a message other than successful (and the service is not installed), please check the settings and contact our support.

b)      Uninstall the service

Select the command file “Reuse_Solr_service_uninstall.cmd” and MB3 --> Run as administrator.

4.      Remote Access for the SOLR Server

We have protected the Solr server to be accessed in local machine by default because it has a security flaw that allows open access to all public, which potentially enables access to the management console. 

If you want to open it up, you take on the risk and then change the file “Reuse_Solr_env.cmd”.

Change the setting below: Use “0.0.0.0” instead of “127.0.0.1”

set SOLR_JETTY_HOST=0.0.0.0

REM set SOLR_JETTY_HOST=127.0.0.1

        After changing this setting, restart the SOLR server or restart the Windows service, you will be able to access the server by the server name/IP address as the format:

http://PC1NLUTC0090NB:8283/solr/NXReuse

5.      Quick Steps for Reuse Library Index Search

a)       Start NX to activate Reuse Library navigator, if you can see the down arrow before the search box, that means the SOLR service is ready


b)      Create index from “Library Management” dialog


KB Article ID# PL8793369

Contents

SummaryDetails

Associated Components

Installation