Node runtime

The same engine, server-side — for SSR, CLIs, MCP servers, and offline copies of an index.

import { createNodeSearch } from "rangefind/node";

// a local index directory (positional file reads, no HTTP)
const local = await createNodeSearch({ baseUrl: "./public/rangefind" });

// or a remote index (range requests + persistent caching)
const remote = await createNodeSearch({ baseUrl: "https://cdn.example.com/rangefind/" });

await local.search({ q: "harbor", size: 5 });

The engine interface is identical to the browser's query API — search, suggest, count, vectors, geo, sharded and generational indexes included.

What the Node layer adds

import { resetNodeRuntimeCaches } from "rangefind/node";
await resetNodeRuntimeCaches({ disk: true }); // e.g. between benchmark runs

Where it fits