# RustSearch 0.6.0 release candidate

**Schema-6 upgrade by index rebuild — build b6ccc623af59.** Compatible schema-7 servers apply the bundled `--update`; their indexes are retained. Schema-6 servers run setup with `--rebuild-index`: the index is rebuilt from the catalog while the fallback engine (Zebra if none is chosen) answers searches, and RustSearch takes over automatically when it completes. Also included: optional Rust-first fallback, ISBN lookups that tolerate misprinted check digits and installer cleanup. [November 23 release notes](release-notes.html#schema-rebuild).

Release candidate — for staging validation before production.

The accepted bounded profile covers native staff/OPAC queries, facets, limits,
sorts/pages, browse/scan, authority heading/linking/usage, normalized ISBN and
cataloguing/import duplicate decisions, visibility rules, automatic indexing,
engine selection and explicit outage/recovery. Full positive staging coverage:
70,410 bibliographies/link documents, 73,865 item projections and 15 authorities.
Native ARM64 and x86-64 builds are tested. Koha 26.05.04/05 MARC21 integration
requires the plugin-aware SearchEngine interfaces and supported core integration;
a Koha version number alone does not supply them.

## New installation

1. Download the current KPZ and its SHA-256 file from this page; verify the hash.
2. Upload and enable the plugin in Koha. Open Configuration and follow the
   bundled server setup guide. Its one SSH setup command verifies the bundled
   source, validates and installs missing plugin-engine core integration on recognized
   stock Koha source with backups, builds/tests the native engine when needed, installs integration and
   schedules, and queues indexing. Dependencies need Internet access.
3. Wait for pending/retry counts to reach zero and run its readiness command.
4. ONLY AFTER READY:1 AND STAGING VALIDATION, SELECT RUSTSEARCH UNDER
   ADMINISTRATION > SEARCHENGINE. Setup automatically validates and enables OPAC
   after indexing is complete; no separate OPAC enable command is required. Saving a changed SEARCHENGINE
   automatically reloads that instance’s running Plack. Test staff and OPAC searches.

## Multiple instances on one Koha server

Upload the KPZ to one instance to obtain its bundled setup script. From that
script's installed path, discover instances and select the ones that want RustSearch:

```sh
sh /var/lib/koha/INSTANCE/plugins/Koha/Plugin/Com/LightwaveLibrary/RustSearch/setup/server-setup.sh --list-instances
sh /var/lib/koha/INSTANCE/plugins/Koha/Plugin/Com/LightwaveLibrary/RustSearch/setup/server-setup.sh --instances central branch mobile
```

Replace `INSTANCE` in the path with the instance holding the KPZ; use its actual
configured plugin path if different. Run as your normal SSH administrator with
sudo access (a password prompt is supported). The selected tenants must have working databases, enabled
plugins and the required Koha search interfaces. The bundle installs the matching
plugin into each selected tenant; separate KPZ uploads and manual port selection
are unnecessary. `--all-instances` explicitly selects every discovered tenant.

Each tenant gets a separate engine service, available loopback port, three indexes
and synchronization workers. Existing assignments are reused on reruns. A uniquely
identified legacy installation retains its original endpoint and indexes; an
incompatible schema requires migration. Failures are reported per tenant, and the
command exits unsuccessfully if any selected tenant is incomplete. Other tenants,
SEARCHENGINE selections are preserved. OPAC activation is validated and enabled
automatically for each selected instance once indexing is complete. Run readiness
and workflow checks for each tenant before activation.

## Libraries without authorities and existing-install correction

Bibliographic search does not require authority records. Unresolved or malformed
local authority links are preserved in MARC and listed separately as warnings;
only verified local relationships are indexed. Backend, database and write errors
remain retryable failures. Existing records receive this validation as they are
reprocessed; regular nightly reconciliation refreshes older projections.

After uploading this corrected KPZ to an existing compatible schema-7 instance,
run its bundled setup with `--existing-engine`. It reuses the engine and indexes,
backs up plugin/worker files, prepares warning storage and retries the affected
records. It does not request a full catalog reconciliation:

```sh
sh /var/lib/koha/INSTANCE/plugins/Koha/Plugin/Com/LightwaveLibrary/RustSearch/setup/server-setup.sh --instances INSTANCE --existing-engine
```

Replace INSTANCE with your tenant name. This command extracts and starts setup
automatically; do not separately run an older extracted installer. Keep SEARCHENGINE
on Zebra or Elasticsearch until the printed readiness check passes. The separate
OPAC activation is completed automatically after coverage and visibility checks.

## Existing schema-6 installation

Upload the KPZ, then run the bundled setup command with `--rebuild-index`.
From the upload until the rebuild completes, searches use the fallback engine
chosen in the plugin configuration, or Zebra if none is chosen; results pages
say which engine answered. Setup checks free space, installs the schema-7
engine, moves the old indexes aside (`<index>.schema6-<date>`, kept for
inspection, never put back into service) and queues the whole catalog and all
authorities. RustSearch takes over automatically once the new index holds every
record that can be indexed. There is no rollback to schema 6.

## Limits and routing

Rust selection runs every supported search in Rust first. If an administrator
enables fallback, requests Rust cannot run or that fail are answered by the
configured Zebra or Elasticsearch engine, and the results page says so; with
fallback off they are explicit errors, including duplicate/link decisions.
During a schema-6 rebuild the fallback engine answers every search. Other
engines remain independently selectable.

Latin accents and canonical Unicode forms are tested. Japanese dakuten remain
distinct. Arabic vowel marks remain significant. Automatic transliteration,
CJK dictionary segmentation inside unspaced text, stemming and kana/kanji
conversion are not provided; catalog-supplied transliterations are searchable.
Custom MARC mappings and local workflows need validation. Distributed catalogs
and Koha REST expansion remain deferred. Historical scale/benchmark snapshots
are not universal latency, cold-cache or production-capacity guarantees.

## Protected multi-tenant plugin directories

Use the plugin’s current SSH guide to copy the bundled launcher with sudo and
run the copy as your normal user. Setup inspects protected plugin paths with
sudo, preserves ownership and permissions, and keeps each tenant’s data separate.
For a compatible schema-7 refresh use `--existing-engine`; a schema-6 engine
is upgraded with `--rebuild-index`.

## Current behavior: search the available index

Catalog readiness is diagnostic, not a runtime search gate. SELECT RUSTSEARCH
IN SEARCHENGINE to search records already indexed, even while records remain
pending or retrying. Staff/OPAC, browse and authority searches no longer require
complete catalog coverage. OPAC activation validates visibility enforcement
without waiting for indexing. Missing records remain absent from results until
indexed; failures stay visible and retryable. Backend failures still return
errors and OPAC visibility rules remain enforced. This supersedes earlier
instructions above requiring queue completion before activation.

## November 1: bounded lookup and text normalization

The latest build adds a memory-budgeted item-ID lookup and a Rust ASCII fast path.
The schema is unchanged. Uploading the KPZ or running `--existing-engine` does
not replace a compatible old executable. Existing libraries need a coordinated
engine binary refresh to receive these optimizations; see
[the performance update guide](performance-update.md). New installations build
the included engine when none is installed. Batch sizes and schedules are unchanged.


## Optional OpenSearch API (2026-11-02)

An experimental, read-only compatibility API and Swagger UI are bundled as an additional option. The listener is off by default and requires a feature-enabled engine plus administrator opt-in. Native Koha routes and schema 7 are unchanged. See [the API guide](optional-api.html), [Swagger reference](opensearch-api/) and [full setup instructions](optional-api.md). No OpenSearch/Elasticsearch server is required, and full Elasticsearch or Koha Elasticsearch-adapter compatibility is not claimed.


## Staff barcode keyword repair (2026-11-02)

The current KPZ repairs the simple staff keyword path missing an already-indexed barcode. Use the latest bundled setup with `--update`; a KPZ upload alone and `--existing-engine` preserve the old binary. Existing schema-7 indexes are reused, without full reindexing. Optional API support is retained. Read [the HTML repair guide](barcode-keyword-repair.html). The separately reported Z39.50 save HTTP 500 is not claimed fixed.


## General update instructions

Use the [Update RustSearch guide](updating-rustsearch.html) and the current KPZ Configuration page to choose between an engine/plugin update and an integration-only refresh. Version-specific changes remain in the dated release notes. The compatible updater applies the supported preference guard before trusted baseline extension and includes preference files in rollback protection.

See [installation access and portability](installation-portability.html) for runtime account checks and permission diagnostics.

Latest dated repair: [OPAC advanced-search form handling](opac-advanced-search-repair.html).
