Skip to main content
EncryptedIndex exposes index settings and training status as async methods. Every getter except getIndexName() calls the service’s describe or training-status endpoint.

getIndexName

The index’s name. Read locally, with no network call.

getDimension

Vector dimensionality. Returns 0 if the index was created without a dimension and nothing has been upserted yet. Once non-zero, the value is cached and later calls don’t reach the service.

getMetric

Distance metric: 'euclidean', 'squared_euclidean', or 'cosine'. Cached after the first call.

getNLists

Number of IVF lists. 1 for an untrained index; the trained list count after train(). Fetched from the service on every call.

metadataSchema

The per-field indexing policy set with metadataSchema or textFields in createIndex(). Each entry has all three settings filled in: filterable, pattern, and fullText. {} when the index uses the default policy. Fetched on every call.

bm25

The index’s BM25 settings, or null when it has no full-text fields.

isTrained

true if the index has been trained. Fetched on every call.

isTraining

true while the service is training this index or has it queued for training. Requires the root key: with a per-user key the service returns HTTP 403 and the SDK throws CyborgDBAuthenticationError.