Docs

Kotlin: Vectors and backups

Store and search embeddings, and list, take and restore database backups with the Kotlin SDK.

Updated Oct 26, 2026

Store and search embeddings, and list, take and restore database backups. Every call runs as the client's signed-in user, so your project's policies and row-level security apply. Types and members are listed in source order; each one links to its HTTP endpoint where it maps to one.

#Types and members

knowledgeSearch

Passages for a question with numbered citations; only passages the signed-in user may read.

suspend fun Sovaria.knowledgeSearch(
    name: String, query: String, k: Int = 5, mode: String? = null, documentIds: List<String>? = null,
    metadataFilter: Map<String, Any?>? = null, rerank: Boolean = false,
): Map<String, Any?>

documentIds (up to 50) scopes the search; rerank reorders with the managed reranker.

vectorSearch

Nearest rows of a SQL table (pgvector): text is embedded with the project's model, or pass vector.

suspend fun Sovaria.vectorSearch(
    table: String, text: String? = null, vector: List<Double>? = null, k: Int = 5, mode: String? = null,
    column: String = "", filter: Map<String, Any?>? = null, rerank: Boolean = false,
): Map<String, Any?>

mode vector | keyword | hybrid; row-level security applies.

downloadDatabaseBackup

Download a completed backup (gzip plain SQL): the whole database, owners, admins and developers only.

suspend fun Sovaria.downloadDatabaseBackup(backupId: Long, orgId: String? = null, projectId: String? = null): ByteArray