Closed teundirectlease closed 4 years ago
You can use this on classes that are being indexed, e.g. in Page.php
/**
* @var SilverStripe\ORM\Map $attributes
*/
public function updateAlgoliaAttributes(&$attributes)
{
$attributes->push('objectCustomThing', $this->MyCustomThingField);
}
Thanks @matt-in-a-hat, works like a charm!
Currently their is no option to add arbitrary data?
It would be nice to have a function that expands the json object for example i wan't to add a boolean field to the root of the algolia object.