Skip to content

Algolia

Algolia is a robust cloud-hosted search solution that works perfectly with Scoutify.

SCOUT_DRIVER=algolia
ALGOLIA_APP_ID=your-app-id
ALGOLIA_SECRET=your-admin-api-key

Instead of your admin key, generate a scoped key server-side:

$securedKey = Algolia\AlgoliaSearch\SearchClient::generateSecuredApiKey(
'search-only-api-key',
['filters' => 'is_public=1']
);

Configure ranking and searchable attributes through the Algolia dashboard or using the SDK:

$index = $client->initIndex('users');
$index->setSettings([
'searchableAttributes' => ['name', 'email'],
'customRanking' => ['desc(created_at)'],
]);

Algolia enforces record and operation limits based on your plan. Monitor your usage in the Algolia dashboard to avoid unexpected charges.