algolia-search

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

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "algolia-search" with this command: npx skills add sickn33/antigravity-awesome-skills/sickn33-antigravity-awesome-skills-algolia-search

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

IssueSeveritySolution
IssuecriticalSee docs
IssuehighSee docs
IssuemediumSee docs
IssuemediumSee docs
IssuemediumSee docs
IssuemediumSee docs
IssuemediumSee docs
IssuemediumSee docs

When to Use

This skill is applicable to execute the workflow or actions described in the overview.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

docker-expert

No summary provided by upstream source.

Repository SourceNeeds Review
General

nextjs-supabase-auth

No summary provided by upstream source.

Repository SourceNeeds Review
3.2K-sickn33
General

nextjs-best-practices

No summary provided by upstream source.

Repository SourceNeeds Review
3.1K-sickn33
General

prisma-expert

No summary provided by upstream source.

Repository SourceNeeds Review
2.7K-sickn33