meilisearch
БесплатноБез исполняемых скриптовНе проверенAdd fast, typo-tolerant full-text search with Meilisearch. Use when a user asks to add search to an app, implement full-text search, set up a search engine…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
Meilisearch
Overview
Meilisearch is a fast, open-source search engine designed for instant, typo-tolerant search experiences. Unlike Elasticsearch, it requires zero configuration to get started — add documents, start searching. This skill covers deployment, document indexing, search queries, faceted filtering, sorting, relevancy tuning, multi-tenancy with tenant tokens, and integration with frontend (InstantSearch) and backend (Node.js, Python) applications.
Instructions
Step 1: Installation and Deployment
# Docker: pin a version instead of "latest" so upgrades are deliberate
export MEILI_MASTER_KEY="$(openssl rand -hex 16)" # 16+ bytes required; keep it in your secret store
docker run -d --name meilisearch \
-p 127.0.0.1:7700:7700 \
-v meili_data:/meili_data \
-e MEILI_MASTER_KEY \
-e MEILI_ENV=production \
getmeili/meilisearch:v1.54
# Verify
curl http://localhost:7700/health
# {"status":"available"}
Without Docker, download the meilisearch binary for your platform from the GitHub releases page and start it with ./meilisearch --master-key="$MEILI_MASTER_KEY". The docs also offer a curl | sh installer; do not pipe a remote script into a shell, fetch the release binary instead. MEILI_ENV=production makes the master key mandatory. Meilisearch upgrades between minor versions need a dump or a snapshot import, so back up before changing the image tag.
Step 2: Index Documents
# Add documents via REST API
curl -X POST 'http://localhost:7700/indexes/products/documents' \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $MEILI_MASTER_KEY" \
--data-binary '[
{"id": 1, "title": "iPhone 15 Pro", "category": "phones", "brand": "Apple", "price": 999},
{"id": 2, "title": "Galaxy S24 Ultra", "category": "phones", "brand": "Samsung", "price": 1199},
{"id": 3, "title": "MacBook Pro M3", "category": "laptops", "brand": "Apple", "price": 1999}
]'
With the Node.js SDK:
// index_products.js — Index documents from a database into Meilisearch
import { Meilisearch } from 'meilisearch' // npm i meilisearch (the old `MeiliSearch` name is gone)
const client = new Meilisearch({
host: 'http://localhost:7700',
apiKey: process.env.MEILI_MASTER_KEY,
})
const index = client.index('products')
// Configure settings first so the first indexing run already uses them.
// Every call returns an enqueued task; .waitTask() resolves when it has been processed.
await index.updateSearchableAttributes(['title', 'brand', 'category']).waitTask()
// Add documents (Meilisearch auto-detects a field ending in "id" as the primary key)
await index.addDocuments([
{ id: 1, title: 'iPhone 15 Pro', category: 'phones', brand: 'Apple', price: 999 },
{ id: 2, title: 'Galaxy S24 Ultra', category: 'phones', brand: 'Samsung', price: 1199 },
]).waitTask()
// Configure filterable attributes (for faceted search)
await index.updateFilterableAttributes(['category', 'brand', 'price'])
// Configure sortable attributes
await index.updateSortableAttributes(['price', 'title'])
Step 3: Search Queries
// search.js — Search with filters, facets, and highlighting
const results = await index.search('iphone', {
limit: 20,
offset: 0,
filter: 'price < 1500 AND category = "phones"',
sort: ['price:asc'],
facets: ['category', 'brand'],
attributesToHighlight: ['title'],
attributesToCrop: ['description'],
cropLength: 50,
})
// results.hits — matching documents with _formatted (highlighted) versions
// results.facetDistribution — { category: { phones: 2 }, brand: { Apple: 1, Samsung: 1 } }
// results.estimatedTotalHits — total matches
// results.processingTimeMs — typically <50ms
REST API equivalent:
curl -X POST 'http://localhost:7700/indexes/products/search' \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $MEILI_SEARCH_KEY" \
--data '{"q": "iphon", "filter": "price < 1500", "facets": ["category", "brand"]}'
# Note: "iphon" still matches "iPhone" — typo tolerance is on by default
Step 4: Faceted Search and Filtering
// faceted_search.js — Build an e-commerce filter sidebar
// First, configure filterable attributes
await index.updateFilterableAttributes(['category', 'brand', 'price', 'rating', 'in_stock'])
// Search with multiple filters
const results = await index.search('laptop', {
filter: [
'category = "laptops"',
'brand IN ["Apple", "Lenovo", "Dell"]',
'price >= 500 AND price <= 2000',
'in_stock = true',
],
facets: ['brand', 'category', 'rating'],
})
// Geo search (for store locators, nearby results)
// Documents carry { _geo: { lat, lng } }; _geo must be both filterable and sortable
await index.updateFilterableAttributes(['category', 'brand', 'price', 'rating', 'in_stock', '_geo'])
await index.updateSortableAttributes(['price', 'title', '_geo'])
const nearby = await index.search('coffee', {
filter: '_geoRadius(48.8566, 2.3522, 50
Установить meilisearch в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл meilisearch?
Add fast, typo-tolerant full-text search with Meilisearch. Use when a user asks to add search to an app, implement full-text search, set up a search engine, replace Elasticsearch with something simpler, add autocomplete or instant search, build a product catalog search, index documents for search, configure search relevancy, add faceted filtering, or deploy a self-hosted search engine. Covers indexing, querying, facets, filtering, sorting, multi-tenancy, and integration with Node.js, Python, and REST API.
Как установить скилл meilisearch?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл meilisearch запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic