algolia-hello-world

Featured

Create a minimal working Algolia example — index records and search them. Use when starting a new Algolia integration, testing your setup, or learning the saveObjects/searchSingleIndex pattern. Trigger: "algolia hello world", "algolia example", "algolia quick start", "first algolia search".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

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

Skill Content

# Algolia Hello World ## Overview Index records into Algolia and search them back — the two fundamental operations. Uses the `algoliasearch` v5 client where all methods live on the client directly (no `initIndex`). ## Prerequisites - `algoliasearch` v5 installed (`npm install algoliasearch`) - `ALGOLIA_APP_ID` and `ALGOLIA_ADMIN_KEY` environment variables set - See `algolia-install-auth` for setup ## Instructions ### Step 1: Index Records with saveObjects ```typescript import { algoliasearch } from 'algoliasearch'; const client = algoliasearch( process.env.ALGOLIA_APP_ID!, process.env.ALGOLIA_ADMIN_KEY! ); // saveObjects adds or replaces records. Each must have objectID // (or Algolia auto-generates one). const { taskID } = await client.saveObjects({ indexName: 'movies', objects: [ { objectID: '1', title: 'The Matrix', year: 1999, genre: 'sci-fi' }, { objectID: '2', title: 'Inception', year: 2010, genre: 'sci-fi' }, { objectID: '3', title: 'Pulp Fiction', year: 1994, genre: 'crime' }, ], }); // Wait for indexing to complete before searching await client.waitForTask({ indexName: 'movies', taskID }); console.log('Indexing complete.'); ``` ### Step 2: Search with searchSingleIndex ```typescript // Basic search — Algolia searches all searchableAttributes by default const { hits } = await client.searchSingleIndex({ indexName: 'movies', searchParams: { query: 'matrix' }, }); console.log(`Found ${hits.length} results:`); hits.forEach(hit => { ...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category