public function eventFormatter($audit, $index, $meta = [])
    {
        $data = [
            '@timestamp' => $audit['created'],
            'transaction' => $audit['id'],
            'type' => $audit['event'] === 'EDIT' ? 'update' : strtolower($audit['event']),
            'primary_key' => $audit['entity_id'],
            'original' => $audit['original'],
            'changed' => $audit['changed'],
            'meta' => $meta + [
                'ip' => $audit['source_ip'],
                'url' => $audit['source_url'],
                'user' => $audit['source_id'],
            ]
        ];

        $index = sprintf($index, \DateTime::createFromFormat('Y-m-d H:i:s', $audit['created'])->format('-Y.m.d'));
        $type = isset($map[$audit['model']]) ? $map[$audit['model']] : Inflector::tableize($audit['model']);
        return new Document($audit['id'], $data, $type, $index);
    }