
Meilisearch Has a Free API You Should Know About
Meilisearch is an open-source search engine with typo tolerance, filters, and facets — and search results come back in <50ms. Add Documents import { MeiliSearch } from ' meilisearch ' const client = new MeiliSearch ({ host : ' http://localhost:7700 ' , apiKey : ' masterKey ' }) // Index documents await client . index ( ' products ' ). addDocuments ([ { id : 1 , name : ' iPhone 15 Pro ' , category : ' Electronics ' , price : 999 , brand : ' Apple ' }, { id : 2 , name : ' Samsung Galaxy S24 ' , category : ' Electronics ' , price : 799 , brand : ' Samsung ' }, { id : 3 , name : ' MacBook Air M3 ' , category : ' Laptops ' , price : 1099 , brand : ' Apple ' } ]) Search — Instant & Typo-Tolerant // Basic search (handles typos automatically) const results = await client . index ( ' products ' ). search ( ' iphon ' ) // finds "iPhone 15 Pro" // With filters and facets const results = await client . index ( ' products ' ). search ( ' laptop ' , { filter : [ ' price < 1500 ' , ' brand = Apple '
Continue reading on Dev.to Webdev
Opens in a new tab



