Error creating Algolia index/updating document TypeError: index.addObject is not a function code example
Example 1: addObjects giving a fatal error when pushing data to algolia
$res = $index->saveObjects(
[
[
'firstname' => 'Jimmie',
'lastname' => 'Barninger'
],
[
'firstname' => 'Warren',
'lastname' => 'Speach'
]
],
[
'autoGenerateObjectIDIfNotExist' => true
]
);
Example 2: addObjects giving a fatal error when pushing data to algolia
$index->saveObjects(array objects, [
"autoGenerateObjectIDIfNotExist" => boolean
]
$index->saveObject(array object, [
"autoGenerateObjectIDIfNotExist" => boolean
]