#557·tantivy

Read only mode

Author: RigelluteCreated Jun 2, 2019Updated Aug 26, 2026
Labelsenhancement

My problem is that I am attempting to deploy tantivy to an environement which has a read-only file system.

Creating the index as follows

rust
let index = Index::open_in_dir("my-index-path").unwrap();

results in this error

"Read-only file system"

It seems that if .tantivy-meta.lock is read only, creating the index gives this error. All other files in the index directory can be read-only, however.

Describe the solution you'd like One solution might be an option to open the index in read only mode - you cannot commit or merge any new documents at runtime.

Perhaps this could avoid the need for acquiring locks and so on?

I am happy to build the index locally/on CI first and then deploy the index as a static file.

(The data I want to search through will change very infrequently).