Lesson 03← back to roadmap
An ELIPS database is a directory. Same way a SQLite database is a file.
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.