Call to undefined method Drupal\search_api\Entity\Index::isIndexingEmptyIndex()

Created on 17 October 2024, 30 days ago

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.

🐛 Bug report
Status

Active

Version

4.3

Component

Code

Created by

🇳🇱Netherlands strakkie

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

Comments & Activities

Production build 0.71.5 2024