search_api_fast_reset_entity_cache does not reset appropriate entity caches

Created on 13 December 2018, about 6 years ago
Updated 26 May 2023, over 1 year ago

The search_api_fast_reset_entity_cache function within search_api_fast.drush.inc is hardcoded to reset entity caches for nodes, paragraphs, field collections and taxonomy terms. So as it currently stands there is no way for this to work with custom entities. Not only that, but the code itself performs an isset() on the $valid_types array for the entity types, but the entity types are not the keys to that array, they are the values. So in order to fix that we need to perform an array_search instead.

My proposal here is to change search_api_fast_reset_entity_cache to retrieve the index's datasource IDs, and then clear the caches for the entity types therein.

πŸ› Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States owenbush Denver, CO

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.71.5 2024