nestjs-search
БесплатноБез исполняемых скриптовНе проверенIntegrate Elasticsearch and implement search index Sync patterns in NestJS. Use when integrating Elasticsearch or implementing search index sync in NestJS.
от HoangNguyen0403★ 598 звёзд на GitHubОб этом скилле
Search Engine & Full-Text
Priority: P1 (HIGH)
- Pattern: CQRS (Command Query Responsibility Segregation).
- Write: To Primary Database (Postgres/MySQL). Source of Truth.
- Read (Complex): To Search Engine (Elasticsearch, OpenSearch, MeiliSearch). Optimized for filtering, fuzzy search, and aggregation.
Synchronization ( Hard Part)
- Dual Write (Anti-Pattern):
await db.save(); await es.index();. - Why: Partial failures leave data inconsistent. Slows down HTTP response.
- Event-Driven (Recommended):
- Service writes to DB.
- Service emits
EntityUpdated. - Event Handler (Async) pushes to Queue (BullMQ).
- Worker indexes document to Search Engine with retries.
- CDC (Golden Standard): Change Data Capture (Debezium). Connects directly to DB transaction log. No app conceptual overhead, but higher ops complexity.
Organization
- Module: Encapsulate client in
SearchModule. - Abstraction: Create generic
SearchService<T>helpers. indexDocument(id, body)search(query, filters)- Mapping: Use
class-transformerto map Entities to "Search Documents". Keep docs flatter than relational entities.
Testing
- E2E: not mock search engine in critical E2E flows.
- Docker: Spin up
elasticsearch:8container in test harness to verify indexing works.
Anti-Patterns
- No dual writes to DB + ES: Use event-driven or CDC pattern; dual writes risk partial failure inconsistency.
- No Elasticsearch for structured queries: Use DB indexes for filtering; ES for full-text and complex search.
- No ES mocks in E2E search tests: Spin up
elasticsearch:8container to verify indexing behavior accurately.
Установить nestjs-search в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл nestjs-search?
Integrate Elasticsearch and implement search index Sync patterns in NestJS. Use when integrating Elasticsearch or implementing search index sync in NestJS.
Как установить скилл nestjs-search?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл nestjs-search запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
agent-skill-stack
Find, evaluate, and assemble the smallest compatible set of AI Agent Skills for an end-to-end natural-language goal. Use when a user wants Skills for a…
от GitHubbuild-evidence-map
Build an auditable evidence map for a contested technical choice, research synthesis, proposal review, or consequential decision. Use when Copilot must…
от GitHubpinecone-rag
Build production RAG pipelines and persistent agent memory using Pinecone as the vector database backend. ALWAYS USE THIS SKILL when the user mentions…
от GitHubqdrant-monitoring-debugging
Diagnoses Qdrant production issues using metrics and observability tools. Use when someone reports 'optimizer stuck', 'indexing too slow', 'memory too high'…
от GitHub