Allow users to determine the order in which indexes are processed

Created on 14 February 2025, 3 months ago

Problem/Motivation

We have multiple indexes present in our system. These indexes push the same data into different destinations. We have been experiencing race conditions when indexing content since one of our destinations is slower to acknowledge incoming requests than the other.

It would be a fantastic option to allow us to say "Process this index first".

Steps to reproduce

Have multiple indexes that index the same data.
Have "Index immediately" on for both indexes.
Note that save times for affected content is increased due to more "on save" processing.
Note that admin users cannot control the order in which content is indexed into each backend.

Proposed resolution

Add a way to add a "priority" or "weight" on search indexes.

Remaining tasks

Feature request
Status

Active

Version

1.0

Component

General code

Created by

🇺🇸United States merauluka

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

Comments & Activities

  • Issue created by @merauluka
  • 🇦🇹Austria drunken monkey Vienna, Austria

    Thanks for creating this ticket!

    However, my feeling is that this is much too niche of a feature for inclusion in this module. (I also don’t really understand how changing the order would make the page request go any faster?)
    If this is just about “immediate” indexing on editing an entity, then you can work around this problem with custom code on your site by overriding the search_api.post_request_indexing service and just ordering $this->operations as desired at the top of the destruct() method (before calling the parent method).

    Anyways, in case you’d still prefer a solution within this module, I’m gonna leave this ticket open to see if others express interest, too. If so, we can revisit.

Production build 0.71.5 2024