Get Started
Run with Docker
You can use Docker image to quickly install Lantern with docker.
The image is based on the official Postgres docker image. Please refer to the Postgres image documentation for a full list of supported features and flags.
docker run -p 5432:5432 --name lantern-demo -e 'POSTGRES_PASSWORD=postgres' -d lanterndata/lantern:latest-pg15
Test
1
Connect to database
docker exec -ti lantern-demo psql -U postgres
2
Test Lantern
CREATE EXTENSION lantern;
CREATE TABLE lantern_demo (id SERIAL, v REAL[3]);
INSERT INTO lantern_demo (v) VALUES ('{0, 0, 0}'), ('{0, 1, 0}'), ('{1, 0, 0}');
CREATE INDEX ON lantern_demo USING hnsw(v) WITH (m=4, ef_construction=8);
SET enable_seqscan=off; -- to always use index on scan
SELECT * FROM lantern_demo ORDER BY v <-> ARRAY[1,1,1];
Was this page helpful?