algolia-search

Solid

Expert patterns for Algolia search implementation, indexing strategies, React InstantSearch, and relevance tuning Use when: adding search to, algolia, instantsearch, search api, search functionality.

Web & Frontend 27,681 stars 2854 forks Updated today MIT

Install

View on GitHub

Quality Score: 94/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
84
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Algolia Search Integration ## Patterns ### React InstantSearch with Hooks Modern React InstantSearch setup using hooks for type-ahead search. Uses react-instantsearch-hooks-web package with algoliasearch client. Widgets are components that can be customized with classnames. Key hooks: - useSearchBox: Search input handling - useHits: Access search results - useRefinementList: Facet filtering - usePagination: Result pagination - useInstantSearch: Full state access ### Next.js Server-Side Rendering SSR integration for Next.js with react-instantsearch-nextjs package. Use <InstantSearchNext> instead of <InstantSearch> for SSR. Supports both Pages Router and App Router (experimental). Key considerations: - Set dynamic = 'force-dynamic' for fresh results - Handle URL synchronization with routing prop - Use getServerState for initial state ### Data Synchronization and Indexing Indexing strategies for keeping Algolia in sync with your data. Three main approaches: 1. Full Reindexing - Replace entire index (expensive) 2. Full Record Updates - Replace individual records 3. Partial Updates - Update specific attributes only Best practices: - Batch records (ideal: 10MB, 1K-10K records per batch) - Use incremental updates when possible - partialUpdateObjects for attribute-only changes - Avoid deleteBy (computationally expensive) ## ⚠️ Sharp Edges | Issue | Severity | Solution | |-------|----------|----------| | Issue | critical | See docs | | Issue | high | See docs | | I...

Details

Author
davila7
Repository
davila7/claude-code-templates
Created
11 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category