The example config file has got three keys on the wrong level:
'resultFormatterCallback' => function (array $formattedResult, $result) { ... }, 'elementContentCallback' => function (\craft\base\ElementInterface $element) { return '<span>Some HTML element content to index</span>'; }, 'extraFields' => [...]
These keys look like they belong under elasticsearchComponentConfig, but they need to be one level higher!
The example config file has got three keys on the wrong level:
'resultFormatterCallback' => function (array $formattedResult, $result) { ... }, 'elementContentCallback' => function (\craft\base\ElementInterface $element) { return '<span>Some HTML element content to index</span>'; }, 'extraFields' => [...]
These keys look like they belong under
elasticsearchComponentConfig
, but they need to be one level higher!