The datasource with ID ... could not be retrieved for index

Created on 15 June 2021, about 3 years ago
Updated 29 May 2024, 30 days ago

Problem/Motivation

Seeing multiple error messages in watchdog while performing a search:
Drupal\search_api\SearchApiException: The datasource with ID '1oqsme--entity:node' could not be retrieved for index 'Global Search'. in Drupal\search_api\Entity\Index->getDatasource()
Everything seems to be working fine performing the search except for this error messages in the watchdog.

Steps to reproduce

This seems to happen if you use a Solr Server with setting "Retrieve result data from Solr" (retrieve_data).
(It is a scenario in which multiple Drupal instances use one solr core).
The "1oqsme" part of the datasource ID mentioned in the error is the hash of the instance in Solr.
It seems that Drupal cannot handle this datasource ID, because of the hash.

Proposed resolution

Skip "preLoadResultItems" in "preRender" if the Solr Server is configured as given above.

Remaining tasks

Provide a patch

πŸ› Bug report
Status

Fixed

Version

4.2

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany stefan.korn Jossgrund

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024