Overview
OpenSearch is the document index Onyx uses for keyword and vector retrieval. It replaced Vespa. Every full deployment needs one OpenSearch cluster. Onyx Lite runs without a document index, so connectors and search over indexed documents are disabled there. In the Onyx Helm chart, theopensearch section defines the OpenSearch instance,
and the auth.opensearch section defines its credentials. Both are enabled by default. When you install the chart,
Helm starts a single-node OpenSearch cluster and sets the host, port,
and credential environment variables on every Onyx service.
In the Onyx Docker Compose file, the opensearch service defines both the instance and its credentials.
The application reads the same environment variables from your .env file.
Auth
OpenSearch requires initial admin credentials. Onyx uses them to authenticate every request. The password must have at least 8 characters, with at least one uppercase letter, one lowercase letter, one digit, and one special character. With Docker Compose, no action is required. The Compose file sets an initial password that matches the default Onyx uses whenOPENSEARCH_ADMIN_PASSWORD is not
set.
To use a different password, set OPENSEARCH_ADMIN_PASSWORD in the .env file before the first start.
The Compose file passes it to both OpenSearch and the Onyx services.
With Helm, there is no default password. Set one in your values file:
values.yaml
Configuration variables
Startup after a restart
On a self-hosted OpenSearch, Onyx creates the document index with theindex.store.preload setting.
When OpenSearch starts, it reads the vector, graph, and keyword files of the index into memory.
The index accepts searches after this read is complete. Until then, searches return an error. After the read,
most of the data a search uses is already in memory, so early searches are close to normal speed.
Stored text is not preloaded. A search still reads the text of its top results from disk.
Without the preload, the index accepts searches sooner,
but each early search reads its own parts of the index from disk. On a large index,
search can then stay slow for several minutes after a restart.
The preload makes startup longer. The extra time is the preloaded file size divided by the disk read speed. For example,
15 GB at 125 MB/s (the base throughput of an AWS gp3 volume) takes about 2 minutes.
- The setting applies to indexes that Onyx creates. An existing index keeps its settings until a reindex creates a new index.
- Onyx does not set it when
USING_AWS_MANAGED_OPENSEARCHistrue. - Give OpenSearch enough memory to hold the preloaded files. If memory is too small, OpenSearch removes them from memory again during search. See Resourcing.
If using your own managed OpenSearch
If you provisioned a managed instance, you do not need Helm to start an OpenSearch cluster. Disable it in your Helm values file:values.yaml
values.yaml