Gives API access to all Algolia functionality, settings, advanced features, and ML/AI products including Recommend
Installs with and without Composer
Supports HTTP headers, Guzzle6, and Curl (php53HttpClient)
Comes with a CLI for debugging
Background retry strategy to ensure uptime
Seamless batching via iterators to optimize number of network calls
Zero downtime reindexing feature
Thin & minimal low-level HTTP client to interact with Algolia's API
Supports all modern PHP versions (7.2+)
INDEX
$res = $index->saveObjects(
[
[
'objectID' => 'myID1',
'firstname' => 'Jimmie',
'lastname' => 'Barninger'
],
[
'objectID' => 'myID2',
'firstname' => 'Warren',
'lastname' => 'Speach'
]
]
);
SEARCH
$index = $client->initIndex('contacts');
// without search parameters
$res = $index->search('query string');
// with search parameters
$res = $index->search('query string', [
'attributesToRetrieve' => [
'firstname',
'lastname',
],
'hitsPerPage' => 50
]);