Skip to manual
gluon

CLI reference

gluon reindex

Embed every indexed document again after the embedding model or its size changed.

Model author or developer

Usage

Run it as gluon reindex (in the repository, cargo run -p gluon-cli -- reindex).

Console / text
Embed every indexed document again with the current embedding model, into the search store of its size (after the embedding route on Admin › Models changed its model or dimension)

Usage: gluon reindex [OPTIONS]

Options:
      --from <FROM>  The size the documents were indexed at; else GLUON_EMBEDDING_DIMS
  -h, --help         Print help

What it reads and writes

It reads every document of every configured namespace from the search store at the size given with --from (default GLUON_EMBEDDING_DIMS), embeds it again with the current embedding model, and writes it to the store of the current size: the embedding route's dimension on Admin › Models when that route serves, else GLUON_EMBEDDING_DIMS. On pgvector the documents are copied to the table of the new size and the old table stays until you drop it. On Elastic they are written into a new index of the new size, the count is checked, and the search name is switched to the new index in one step; only then is the old index deleted. If anything fails (the embedding model refuses, the provider is down, the process stops), the old store is left as it was and keeps serving, and you can run the command again. It prints one line per namespace. The in-memory store needs nothing.

Before you run it

Searches use only the new store once a changed embedding route is saved, so run it right after you confirm the change. Pause ingestion while it runs: a document written to the old Elastic index during the run is not carried over.

The options for gluon reindex.
The options for gluon reindex.