| name | algolia-core-workflow-a |
| description | Implement Algolia search with filters, facets, highlighting, and pagination.
The primary money-path workflow: search records, apply filters, display results.
Trigger: "algolia search", "search with algolia", "algolia filters",
"algolia facets", "algolia search implementation".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Grep |
| version | 1.6.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","search","algolia"] |
| compatibility | Designed for Claude Code |
Algolia Core Workflow A — Search & Filtering
Overview
Primary Algolia workflow: full-text search with filters, faceted navigation, hit highlighting, and pagination. Uses searchSingleIndex (v5) with real Algolia search parameters.
Prerequisites
- Completed
algolia-install-auth and algolia-hello-world setup
- Index populated with records (see
algolia-hello-world)
- Index settings configured with
searchableAttributes and attributesForFaceting
Instructions
Step 1: Configure Index for Filtering
import { algoliasearch } from 'algoliasearch';
const client = algoliasearch(process.env.ALGOLIA_APP_ID!, process.env.ALGOLIA_ADMIN_KEY!);
await client.setSettings({
indexName: 'products',
indexSettings: {
searchableAttributes: ['name', 'description', 'brand', 'category'],
attributesForFaceting: [
'searchable(brand)',
'category',
'filterOnly(price)',
'filterOnly(in_stock)',
],
: [, ],
: [, , , , ],
: [, ],
: [],
},
});