Configuration & operations
Koha search says "No results found" for everything
When every search in Koha finds nothing, the records are almost always fine and the search engine is not answering. Here is how to find which part stopped and bring it back, for Zebra and Elasticsearch.
By Babar Junaid
Published 2026-11-08 · Tested against Koha 26.05
When every Koha search says No results found! but a record still opens from its own link, your records are safe: the search engine is not answering. Find which engine you use (Zebra or Elasticsearch), start it, restart Plack so Koha reconnects, and rebuild the index only if search is still empty.
- Shell access to the Koha server with
sudo. The commands are for a package install (koha-common). - Your instance name.
sudo koha-listprints it; the examples uselibrary. - Nothing here changes a record. Restarting Plack interrupts pages that are loading at that moment for a few seconds, so tell a busy circulation desk first.
Step 1: Confirm it is the search, not the records
Two checks take a minute and tell you where to look:
- Search the staff interface too. If it also says No results match your search, the problem is the index for the whole instance. If only the OPAC finds nothing, it is OPAC visibility instead: see a record shows in staff search but not in the OPAC.
- Open a record directly, for example
/cgi-bin/koha/opac-detail.pl?biblionumber=1. It opens from the database, not from the index, so if it shows, nothing is lost.
Then ask which search engine this instance uses:
$ sudo koha-mysql library -e "SELECT value FROM systempreferences WHERE variable='SearchEngine';"+-------+| value |+-------+| Zebra |+-------+Response from a live run on Koha 26.05 on a fresh Ubuntu 24.04 server
Zebra (the default): go to step 2. Elasticsearch: go to step 3.
Koha shows no error for this
zebra-error.log or the Plack logs. Do not wait for an error message to tell you; check the server.Step 2: Zebra: start the server and reconnect Plack
$ sudo koha-zebra --status library * Zebra not running for library [fail]Response from a live run on Koha 26.05 on a fresh Ubuntu 24.04 server
Not running is the usual answer after a reboot or an upgrade. Start it with -v, which makes it say what it did. Without -v, koha-zebra --start and --stop print nothing at all, success or not:
$ sudo koha-zebra -v --start library * Starting Koha Zebra daemon for library [ OK ]Response from a live run on Koha 26.05 on a fresh Ubuntu 24.04 server
Search again. In our run results came straight back, with no rebuild: the index on disk was intact the whole time; only the server that reads it was down.
Status says running, but search is still empty
This is the case that confuses people. If Zebra was stopped while Koha had connections open to it (someone ran --stop or --restart while the library was busy), its main process dies but the processes serving those connections stay. --status keeps answering Zebra running for library … [ OK ], every search is empty, and a start is refused:
$ sudo koha-zebra -v --start libraryError: Zebra already running for library: failed!Response from a live run on Koha 26.05
koha-zebra -v --restart in that state stops the main process and then hits the same refusal, leaving search empty:
$ sudo koha-zebra -v --restart library* Stopping Koha Zebra daemon for library ...done.* Error: Zebra already running for library ...fail!Response from a live run on Koha 26.05 on a fresh Ubuntu 24.04 server
Restart Plack. That closes Koha's connections, the leftover processes exit, and Zebra can start cleanly:
$ sudo koha-plack --restart library * Stopping Plack daemon for library [ OK ] * Starting Plack daemon for library [ OK ]$ sudo koha-zebra --status library * Zebra not running for library [fail]$ sudo koha-zebra -v --start library * Starting Koha Zebra daemon for library [ OK ]Response from a live run on Koha 26.05 on a fresh Ubuntu 24.04 server
Whether the refusal appears depends on when Koha's connections happen to close, so you may see a clean start instead. The order that worked every time in our runs: restart Plack, ask --status, start Zebra if it says not running, search.
Running, reconnected, still empty: rebuild the index
If Zebra is genuinely running and Plack has been restarted, the index itself is empty or broken, for example after a rebuild that was interrupted, a restore onto a new server, or a migration. In our run an emptied index looked exactly like this: Zebra running, the indexer running, every search empty. A full rebuild of the bibliographic records fixes it:
$ sudo koha-rebuild-zebra -f -v -b libraryZebra configuration information================================Zebra biblio directory = /var/lib/koha/library/biblios…Job started: 17:09:47skipping authorities====================exporting biblio 17:09:47 [00:00:00]====================…Records exported: 1095 17:09:57 [00:00:10]====================REINDEXING zebra 17:09:57 [00:00:10]========================================Indexing complete: 17:10:00 [00:00:13]====================CLEANING====================Response from a live run on Koha 26.05
-f is required: without it the command does nothing while the indexer daemon is configured. -b limits it to bibliographic records, which is what search needs; drop it to rebuild authorities too. If search is still empty right after it finishes, restart Plack once more (in one of our runs a Koha worker was still talking to a Zebra process opened before the index was emptied). The rebuild, its flags and the records it skips are explained in rebuilding the Zebra index.
Step 3: Elasticsearch: reachable, and indexes built
Koha reads the Elasticsearch address from the instance's koha-conf.xml:
$ sudo grep -A3 '<elasticsearch>' /etc/koha/sites/library/koha-conf.xml <elasticsearch> <server>localhost:9200</server> <!-- may be repeated to include all servers on your cluster --> <index_name>koha_library</index_name> <!-- should be unique amongst all the indices on your cluster. _biblios and _authorities will be appended. -->Response from a live run on Koha 26.05 on a fresh Ubuntu 24.04 server
Ask that address whether Elasticsearch is up. A refused connection means it is not running there:
$ curl -sS 'http://localhost:9200/_cluster/health?pretty'curl: (7) Failed to connect to localhost port 9200 after 0 ms: Couldn't connect to serverResponse from a live run on Koha 26.05 on a fresh Ubuntu 24.04 server
Koha's OPAC log says the same thing in its own words:
$ sudo grep NoNodes /var/log/koha/library/plack-opac-error.log | tail -1[2026/11/08 11:27:22] [WARN] [NoNodes] ** No nodes are available: [http://localhost:9200], called from sub Search::Elasticsearch::Role::Client::Direct::__ANON__ at /usr/share/koha/lib/Koha/SearchEngine/Elasticsearch/Search.pm line 101.Response from a live run on Koha 26.05 on a fresh Ubuntu 24.04 server
Start Elasticsearch (sudo systemctl start elasticsearch on a package install of it) and check again. A healthy server answers with green or, on a single server, yellow:
$ curl -sS 'http://localhost:9200/_cluster/health?pretty'{ "cluster_name" : "docker-cluster", "status" : "green", "timed_out" : false, "number_of_nodes" : 1, "number_of_data_nodes" : 1, …}Response from a live run on Koha 26.05
If the address in koha-conf.xml was wrong and you corrected it, run sudo koha-plack --restart library: Plack keeps the old address until it restarts.
Elasticsearch is up, search still empty: build the indexes
A running Elasticsearch with no Koha index (a new server, a wiped data directory, a restore) gives the same No results found!. The log names the missing index, and the index list is empty apart from its header line:
$ sudo grep index_not_found /var/log/koha/library/plack-opac-error.log | tail -1[2026/11/06 17:11:14] [WARN] [Missing] ** [http://localhost:9200]-[404] [index_not_found_exception] no such index [koha_library_biblios], …$ curl -sS 'http://localhost:9200/_cat/indices?v'health status index uuid pri rep docs.count docs.deleted store.size pri.store.size dataset.sizeResponse from a live run on Koha 26.05
Build them. Search works as soon as the biblios index is committed; no Plack restart was needed in our run:
$ sudo koha-elasticsearch --rebuild -d -v library[444153] Checking state of biblios index[444153] Dropping and recreating biblios index[444153] Checking state of authorities index[444153] Dropping and recreating authorities index[444153] Indexing biblios…[444153] Committing final records...[444153] Total 1095 records indexed[444153] Indexing authorities[444153] Committing final records...…[444153] Total 1720 records indexed$ curl -sS 'http://localhost:9200/_cat/indices?v'health status index uuid pri rep docs.count docs.deleted store.size pri.store.size dataset.sizeyellow open koha_library_biblios qxAOeKvSQd6aZ54Ra-6bcA 5 1 1095 0 15.7mb 15.7mb 15.7mbyellow open koha_library_authorities ZDlmlek_Q32V_ipy1fvVwQ 5 1 1049 0 2.3mb 2.3mb 2.3mbResponse from a live run on Koha 26.05
The lines left out (…) are records Elasticsearch could not read, each named by its biblio number; they stay unfindable until fixed, the rest of the catalogue is searchable. If the rebuild stops with failed to find filter under name [icu_folding], the ICU plugin is missing: see switching Koha to Elasticsearch, which also covers starting koha-es-indexer so new records keep appearing.
Step 4: Check it is really fixed
Search the OPAC and the staff interface for a word you know is in many titles, then for a title added this week. Compare the number of records in the catalogue with the number the rebuild reported:
$ sudo koha-mysql library -e "SELECT COUNT(*) FROM biblio;"+----------+| COUNT(*) |+----------+| 1095 |+----------+Response from a live run on Koha 26.05 on a fresh Ubuntu 24.04 server
Equal, or within a few records that the rebuild named as unreadable, means the index is complete (here 1095 records in the catalogue and 1095 exported). Searching for * is not a test: it says No results found on a healthy Koha too.
Why Koha says "no results" instead of an error
Koha never searches the database. Every search goes to a separate index, Zebra or Elasticsearch, and only the record you open afterwards is read from the database. That is why a record opens by its number while search finds nothing: the two take different roads.
With Zebra, Koha sends the query and then collects answers from every connection that finished with a result set. A connection that failed never gets that far, and is skipped without a message, so a dead server and an empty catalogue look the same: zero results. Elasticsearch failures are at least written to plack-opac-error.log (NoNodes when the server is unreachable, index_not_found_exception when the index is missing), but the patron still sees the plain no-results page.
The connection detail matters for the Zebra fix. Zebra serves each Koha connection from its own process, and Koha keeps its connections open between searches. Stop the main process while those are open and the leftovers make the service look alive. Restarting Plack closes Koha's side of every connection, which is why it clears a state that restarting Zebra alone cannot.
Troubleshooting
| What you see | What it usually is |
|---|---|
Zebra not running for library: failed! | Zebra did not start after a reboot or upgrade. sudo koha-zebra -v --start library; check sudo systemctl is-enabled koha-common so it starts next time. |
--status says running, search empty, Error: Zebra already running on start | Leftover Zebra processes from connections Koha still holds. sudo koha-plack --restart library, then --status and -v --start. |
koha-zebra --start library prints nothing | Normal: it only reports with -v. Use --status to see the result. |
| Zebra running, Plack restarted, still empty | The index is empty or broken: sudo koha-rebuild-zebra -f -v -b library, then restart Plack if needed. |
| Old records found, new ones never appear | Not this problem: the indexer daemon stopped. See rebuilding the Zebra index (Zebra) or the indexer step in switching to Elasticsearch. |
[NoNodes] ** No nodes are available in plack-opac-error.log | Elasticsearch is down or koha-conf.xml names the wrong address. Start it or fix the address, then sudo koha-plack --restart library. |
index_not_found_exception in plack-opac-error.log | Elasticsearch has no Koha index: sudo koha-elasticsearch --rebuild -d -v library. |
| Staff search works, OPAC finds nothing | Not the index: the records are hidden from the OPAC. See a record shows in staff search but not in the OPAC. |
| Everything fails after a disk filled up | Both engines need free disk to write their index, and Elasticsearch refuses new indexes above 90% full. Free space with df -h, then rebuild. |
Tested on live Koha 26.05.05
Passed all 30 checks · Read the run log
- Koha release
- 26.05.05
- System
- Ubuntu 24.04
- Setup
- A fresh Ubuntu 24.04 server reached over SSH as a sudo user, Koha installed from the Koha repository as our installation guide leaves it.
- Source read at
- Koha commit d3fc229
Earlier live checks (1)
- , Koha 26.05.02 (commit d3fc229): all 42 claims held. Read the run log
In the Koha manual (26.05)
Verified against the Koha source (8 files)
- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt (lines 96-99)
- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt (lines 436)
- C4/Search.pm (lines 363-383)
- C4/Search.pm (lines 2343-2359)
- debian/scripts/koha-zebra (lines 58-170)
- debian/scripts/koha-functions.sh (lines 174-185)
- Koha/SearchEngine/Elasticsearch/Search.pm (lines 100-109)
- misc/migration_tools/rebuild_zebra.pl (lines 890-905)
Also checked on earlier Koha releases (1)
- Koha 26.05.02 on Debian 13 (trixie), last checked 2026-11-06 (commit d3fc229)
The label under each command says where its response came from; a command with no label was not run live. How we test and which standards we follow.
Search still empty after all this? We bring Koha search back on your own server, remotely, and set it up so it stays up.
Related
More on configuration & operations
Answers to the questions that usually arrive with this one.
Koha independent branches: what IndependentBranches separates
IndependentBranches keeps staff to their own library's items, loans, holds and patron edits. It does not split the catalogue, and it does not hide other libraries' patrons: a permission does that. Tested both ways.
How to add a library (branch) in Koha
Adding a branch to Koha takes one form, but the code you choose is permanent and a new library needs a calendar, circulation rules and staff before it can lend. Here is the form, every field that matters, and what to set up next.
Koha background jobs stay at "New" and never finish
A staged MARC import or batch modification that sits at "New" means no worker is taking jobs from that queue. Start the worker for both queues and the jobs run.
How to edit notices and slips in Koha (templates and variables)
Every email, SMS and printed slip Koha sends comes from a template in Tools → Notices and slips. Here is how to edit one, add the patron’s name or the due date with a variable, give one library its own wording, and test it before it reaches a patron.

