Setup

  • Solr version: 8.11.1
  • Drupal Core version: 10.3.6
  • Search API version: 1.35.0
  • Search API Solr version: 4.3.5

Issue

On one of our projects, each morning; when opening a page containing a page view of a solr index; the following error occures:

Error: Call to undefined method Drupal\search_api\Entity\Index::isIndexingEmptyIndex() in Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend->deleteItems() (regel 1471 van /[WEBROOT]/modules/contrib/search_api_solr/src/Plugin/search_api/backend/SearchApiSolrBackend.php).

When clearing the cache or re-indexing the problem gets fixed and the site works for a while.

/** @var \Drupal\search_api_solr\Entity\Index $index */
    if ($index->isIndexingEmptyIndex()) {
      return;
    }

When running the code above, the class given is \Drupal\search_api\Entity\Index (hence, not search_api_solr but search_api).

The problems started after updating to the most recent versions for search_api + search_api_solr. Any advice on how to fix this are greatly appreciated.

Comments

strakkie created an issue. See original summary.

mkalkbrenner’s picture

Category: Bug report » Support request

It seems that search_api_solr_entity_type_alter() doesn't work correctly on your system. Or another server or instance overwrites the cached container.

karavkars’s picture

Status: Active » Closed (duplicate)
Issue tags: +3390768
strakkie’s picture

Status: Closed (duplicate) » Closed (cannot reproduce)

Update, after recreating the SOLR configuration in both Drupal and the SOLR server i cannot reproduce this problem on the same installation. Probably an error made during configuration.