# RustSearch 0.6.0 release candidate

**Pagination repair — build 31c1a0e8b34a.** Upload as an update over the existing plugin; do not uninstall. Open Configuration and run the bundled server setup. A successful `--check-only` only inspects: use `--existing-engine` to apply the compatible schema-7 refresh. Schema 6 requires coordinated migration. [Repair instructions](compatibility-repair.md).

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

Do not use a plugin upload as an index migration. The ordinary updater refuses
incompatible schema changes. The bundled `plugin/scripts/migrate_schema7.py`
provides `plan`, `prepare`, `status`, `apply` and `recover`. Use a root-owned,
host-bound JSON plan with `execution_mode` set to `guarded`, pinning the source
bundle, old/new binaries, inventory tool and separate index paths by SHA-256.
The supported layout is one standard systemd instance without custom drop-ins.

Prepare durable change capture before building/copying the complete three-index
candidate. Apply drains writers, locks workers, catches both targets up, verifies
exact membership/projections, preserves settings, and promotes matching files.
Recover replays current edits into the old indexes before restoring matching
code; it does not rewind catalog data. The event log remains for audit, and
capture triggers close after successful recovery. The source includes
`MIGRATION_COMMAND_ACCEPTANCE.md` with the administrator contract and tested
boundaries. No live catch-up is a requirement for this release acceptance.

## Limits and routing

Rust selection runs searches in Rust, with no automatic Zebra/Elasticsearch
fallback. Other engines remain independently selectable. Unsupported requests
and backend failures are explicit errors, including duplicate/link decisions.

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`; the legacy schema-6
`--update-check`/`--update` utility cannot apply this bundle.

## 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.
