elips/docs
Chapter II · first contact

Your first database

An ELIPS database is a directory. Same way a SQLite database is a file.

/my_dbLOCKadvisory flock — single writerIDENTITYdimension · metric · indexTEXT_EMBEDDER.manifestprovider · model · fingerprintwal.logCRC32C framed mutationselips.manifestsegmented mode roottext_embedder/rehydratable artifactsegments/atomically renamed segment fileselips.snapshotcompat single-file layoutone directory = one database
What ELIPS writes on disk. Each file is independently meaningful and atomically replaced.
first_db.py
import elips

db = elips.open("/tmp/my_first_elips", dimension=4, metric="cosine")
notes = db.vault("notes")

rid = notes.place([0.1, 0.2, 0.3, 0.4], {"tag": "hello"})
print(rid)

hit = notes.seek([0.1, 0.2, 0.3, 0.4], top=1)[0]
print(hit.id, hit.distance, hit.payload)

Kill the process and run it again. The record is still there — ELIPS replayed the WAL on open.