As part of the fix for #3178941: Fatal error "Call to a member function getColumns() on bool", we added a new 'datasource' key to the foreign relationships map created for entity datasources to identify indirectly indexed entities. This key therefore also becomes part of the \Drupal\search_api\Event\MappingForeignRelationshipsEvent::getForeignRelationshipsMapping() method of the search_api.mapping_foreign_relationships event. Implementors who rely on the exact structure should be careful to expect this variation. No keys have been removed, and no other structural changes have been made, though. (Also, the datasource changes have been made in a way that won’t fail when the new key is not present, in a mapping added by event listeners (for instance).)
Before
The mapping had the following structure:
[
[
'entity_type' => 'node',
'bundles' => ['child' => 'child'],
'property_path_to_foreign_entity' => 'entity_reference',
'field_name' => 'indexed',
],
]
After
That same mapping would now look like this:
[
[
'datasource' => 'entity:node',
'entity_type' => 'node',
'bundles' => ['child' => 'child'],
'property_path_to_foreign_entity' => 'entity_reference',
'field_name' => 'indexed',
],
]
Comments
As part of the fix for [#],
This part is missing the issue number.This has already been taken care of.