Contact Us
Webflow Premium Partner Ehab Fayez
Back to Agent Skills
Data & Analytics

Typesense Search Engine

Use Typesense for instant, typo-tolerant search with automatic schema detection and simple deployment.

Claude Code Cursor Copilot

Overview

Typesense is an open-source, typo-tolerant search engine designed as a developer-friendly alternative to Algolia and Elasticsearch. Built in C++, it delivers single-digit millisecond search latency with a simple REST API. Typesense requires explicit schema definitions which enable type-safe queries and better search relevance out of the box.

The engine supports multi-field search, faceting, filtering, sorting, geo search, vector search, and grouping. Its relevance algorithm considers text match quality, field weights, and custom ranking scores. Typesense provides built-in curation (pinning/hiding specific results), synonyms, and search analytics. The vector search feature enables semantic search when combined with embedding models.

Typesense can be deployed as a single node or a highly available cluster with automatic leader election and data replication. Typesense Cloud provides a managed offering. The InstantSearch.js adapter enables using Algolia InstantSearch UI components with a Typesense backend. The JavaScript client works in both Node.js and browsers with full TypeScript support.

Who Is This For?

  • Build instant product search with typo tolerance
  • Implement vector-based semantic search
  • Add search with Algolia InstantSearch UI connected to Typesense
  • Deploy a self-hosted search engine as an Algolia alternative

Installation

Setup for Claude Code
npm install typesense

Configuration

import Typesense from "typesense"

const client = new Typesense.Client({
  nodes: [{ host: "localhost", port: 8108, protocol: "http" }],
  apiKey: process.env.TYPESENSE_API_KEY!,
})

// Create collection with schema
await client.collections().create({
  name: "products",
  fields: [
    { name: "name", type: "string" },
    { name: "price", type: "float", facet: true },
    { name: "category", type: "string", facet: true },
  ],
})

// Search
const results = await client.collections("products")
  .documents().search({ q: "laptop", query_by: "name" })