Skip to main content

Function: createIndex()

createIndex<M>(ai, options): VectorIndex<M>

Defined in: vector-index.ts:238

@leuria/store: search by meaning over the page's own content, in the visitor's browser. Built with the visitor's embedding model, private to the site's origin, and it never leaves the device.

import { createIndex } from "@leuria/store" const notes = createIndex(ai, { name: "notes", documents }) await notes.search("why did my glaze pull away")

Type Parameters​

M​

M = unknown

Parameters​

ai​

Leuria

options​

VectorIndexOptions<M>

Returns​

VectorIndex<M>