Filtered view served from stale index

Created on 25 February 2019, over 5 years ago
Updated 1 December 2023, 7 months ago

We are aiming to replace the 'admin/content' view with a search_api based solution, so basically have a node view with search_api and entity operations enabled.

To reproduce this issue filter by 'published' status, edit one of the nodes, set to 'unpublished' and save, destination redirects back to the view filtered by 'published'. The view will still show the newly unpublished node as published.

Results are out of date because of the asynchronous design of search_api, rebuilding the index is triggered after the response is sent and before the service is terminated, the next request (destination) is therefore served from a stale index.

To mitigate this problem, we could probably force re-indexing via hook entity update or similar to have up-to-date results in the view, or display some kind of information about the results being outdated to the end user.
Any thoughts?

πŸ’¬ Support request
Status

Active

Version

1.0

Component

Miscellaneous

Created by

πŸ‡©πŸ‡ͺGermany volkerk

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.

  • πŸ‡§πŸ‡·Brazil carolpettirossi Campinas - SP

    Hi drunken monkey,

    Is this still an issue nowadays?
    We have a "Bundles" listing page per author with a "Add bundle" link at the top.
    We have 'index items immediately'.
    However, when the user goes back to their bundles listing page, the new added bundle is not there.

  • πŸ‡¦πŸ‡ΉAustria drunken monkey Vienna, Austria

    Yes, seems like this would still work the same way as five years ago, so still have this problem.
    Does the bundle appear after refreshing the page? Which backend do you use?

Production build 0.69.0 2024