Search

Add fast, typo-tolerant full-text search to your application. Index your data and query it with filtering, faceting, and relevance ranking.

full-textindexingfacetsrelevance

Providers

Meilisearch

Open-source, lightning-fast search engine with typo tolerance

meilisearch
MEILISEARCH_HOSTMEILISEARCH_API_KEY

Typesense

Open-source search engine with built-in curation and analytics

typesense
TYPESENSE_HOSTTYPESENSE_API_KEY

Algolia

Managed search-as-a-service with AI-powered relevance tuning

algoliasearch
ALGOLIA_APP_IDALGOLIA_API_KEY

Usage

Search and index

Index documents and perform full-text search

import { search } from '@/lib/search'

// Index a document
await search.index('products', {
  id: product.id,
  name: product.name,
  description: product.description,
  category: product.category,
})

// Search with filters
const results = await search.query('products', 'wireless headphones', {
  filter: { category: 'electronics' },
  limit: 20,
})

Get Started

Add search to your Primstack project with a single command:

prim search init