EmbeddingStore

Smart Search's index for one model: which library items are done (at which version) and their vectors. A photo has one vector; a video one per kept frame, with the frame's time. One file per model, in app-private storage that isn't backed up, since vectors from different models can't be mixed and are cheap to rebuild.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open val databaseName: String?
Link copied to clipboard
Link copied to clipboard

Bumped on every write, so a search cache knows its copy is stale.

Link copied to clipboard

Functions

Link copied to clipboard
open fun close()
Link copied to clipboard
fun count(): Int
Link copied to clipboard
fun indexed(): Map<Long, Long>

Item id → the modified it was indexed at.

Link copied to clipboard

Everything, for searching.

Link copied to clipboard
Link copied to clipboard
open override fun onCreate(db: SQLiteDatabase)
Link copied to clipboard
open fun onDowngrade(db: SQLiteDatabase?, oldVersion: Int, newVersion: Int)
Link copied to clipboard
open fun onOpen(db: SQLiteDatabase?)
Link copied to clipboard
open override fun onUpgrade(db: SQLiteDatabase, oldVersion: Int, newVersion: Int)
Link copied to clipboard
fun put(mediaId: Long, modified: Long, frames: List<Pair<Long, FloatArray>>)

Replaces whatever mediaId had.

Link copied to clipboard
fun remove(mediaIds: Collection<Long>)
Link copied to clipboard
open fun setIdleConnectionTimeout(idleConnectionTimeoutMs: Long)
Link copied to clipboard
open fun setLookasideConfig(slotSize: Int, slotCount: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun vectorsOf(mediaId: Long): List<FloatArray>

One item's vectors: a photo's one, or a video's frames.