Solr full-text search
Solr is an optional full-text search engine. It is typically faster and more capable than NADA’s built-in database search, especially for large catalogs and variable-level search.
By default NADA uses database search (search_provider = db). After Solr is installed and indexed, you switch the catalog to Solr in Site configurations.
Checklist
- Install Java and Solr (Windows or Linux).
- Confirm Solr Admin UI at
http://localhost:8983(or your Solr host). - Continue in the admin guide: Solr search — connect NADA, create core, schema, index, and enable the search provider.
Requirements
| Component | Notes |
|---|---|
| Solr | 9.x recommended (examples below assume Solr 9) |
| Java | A JDK version supported by your Solr release — see Solr system requirements |
| Network | PHP/NADA host must reach Solr (often localhost:8983) |
| NADA access | Site administrator with permission to edit configurations |
Do not expose Solr’s Admin UI (8983) to the public internet without authentication and a firewall.
Install Solr on Windows
For a full NADA install on Windows, see Installation (Windows).
1. Install Java
- Install a supported JDK for your Solr version (Windows x64).
- Set a system environment variable
JAVA_HOMEto the JDK folder (for exampleC:\Java\jdk-17). - Open a new Command Prompt and run
echo %JAVA_HOME%to confirm.
2. Install Solr
- Download the Solr 9 binary package from solr.apache.org/downloads.
- Extract it to a stable folder, for example
C:\solr. - Open Command Prompt:
cd C:\solr
bin\solr.cmd startOn some installs the command is bin\solr start. Use whichever script exists under bin.
- Open
http://localhost:8983in a browser. You should see the Solr Admin UI. - Stop Solr for the next step:
bin\solr.cmd stop3. Run Solr as a Windows service (NSSM)
Solr does not install a Windows service by itself. NSSM can run Solr in the background and start it on reboot.
- Download and extract NSSM (for example to
C:\nssm). - Open an elevated Command Prompt:
cd C:\nssm\win64
nssm install solr9- In the NSSM dialog:
| Field | Example |
|---|---|
| Path | C:\solr\bin\solr.cmd |
| Startup directory | C:\solr\bin |
| Arguments | start -f -p 8983 |
- On the Details tab, set a display name (for example
Apache Solr 9) and install the service. - Start the service from Services (
services.msc), or:
nssm start solr9- Confirm
http://localhost:8983again.
Install Solr on Linux
For a full NADA install on Linux, see Installation (Linux).
Examples below use Debian/Ubuntu-style commands and /opt/solr. Adjust paths and package names for your distribution.
1. Install Java
sudo apt update
sudo apt install openjdk-17-jdk-headless
java -versionUse a JDK version supported by your Solr release.
2. Install Solr
cd /tmp
# Download the Solr 9.x tgz from https://solr.apache.org/downloads.html
tar xzf solr-9.*.tgz
sudo mkdir -p /opt/solr
sudo cp -a solr-9.*/* /opt/solr/
sudo useradd --system --home-dir /opt/solr --shell /usr/sbin/nologin solr || true
sudo chown -R solr:solr /opt/solrTest start:
sudo -u solr /opt/solr/bin/solr startOpen http://YOUR_SERVER:8983. Then stop:
sudo -u solr /opt/solr/bin/solr stop3. systemd unit (recommended)
Create /etc/systemd/system/solr.service:
[Unit]
Description=Apache Solr
After=network.target
[Service]
Type=forking
User=solr
Group=solr
Environment=SOLR_PID_DIR=/opt/solr
Environment=SOLR_HOME=/opt/solr/server/solr
WorkingDirectory=/opt/solr
ExecStart=/opt/solr/bin/solr start
ExecStop=/opt/solr/bin/solr stop
Restart=on-failure
LimitNOFILE=65535
[Install]
WantedBy=multi-user.targetsudo systemctl daemon-reload
sudo systemctl enable --now solr
sudo systemctl status solrConfirm http://YOUR_SERVER:8983. Restrict port 8983 with a firewall if the server is publicly reachable.
Next: connect NADA and index
With Solr running, finish setup in the administrator guide:
Solr search — solr.php connection, create core, schema, indexing, and enabling the search provider.
Troubleshooting (install)
| Issue | What to check |
|---|---|
| Solr Admin UI not reachable | Java installed; Solr started; port 8983; firewall |
| Service fails on boot (Windows) | NSSM service path/arguments; JAVA_HOME for the service account |
| Service fails on boot (Linux) | systemctl status solr; user solr owns /opt/solr; LimitNOFILE |
For ping, schema, and indexing issues after connect, see Solr search — troubleshooting.