Solr Stale Content server after content is updated

Created on 6 November 2023, 8 months ago
Updated 26 June 2024, 7 days ago

Problem/Motivation

I'm using the search api Pantheon module for my drupal views, all indexes are configure to index content immediately but after making changes to content the search api related views keep showing stale content.

From the tests we done so far it seems that the solr does not index the content immediately but it takes time so that if the page that contains the view is reloaded the cache is generated with stale content and the only way to get the new content is clear all caches.

Steps to reproduce

  1. Create a search api server based on patheon solr
  2. Create a search api view using the search api index block display
  3. Add the view to a landing page
  4. Unpublish one node that is rendered by the view
  5. Reload landing page immediately

Proposed resolution

Review the solr cache and times for indexing content configured in the solr container

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Postponed

Version

3.0

Component

Code

Created by

πŸ‡¨πŸ‡΄Colombia julianmancera

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

Comments & Activities

  • Issue created by @julianmancera
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    First off - please upgrade to Solr 8 and v8 of this module.

    Solr itself does not index content immediately after it is informed of changed content, there is a brief delay in the changes being visible. As such, I'm not sure if this can ever be perfect, it might have to be documented as a known issue.

  • πŸ‡΅πŸ‡­Philippines danreb

    From the statement "The only way to get the new content is to clear all caches" this looks like an issue with the Drupal page or views cache rather than the Solr index cache, but yes, as Damien mentioned in the earlier comment, Solr does not index automatically, it will wait until a cron runs which is configured in Pantheon platform to run every hour.

    To test if the stale content is related to the Solr index cache, after step 4 -> Unpublish one node that is rendered by the view, please run a manual re-index and if the stale content disappears, then this is related to the Solr index cache, but if not, then you must check the views page cache.

  • Status changed to Postponed 7 days ago
  • πŸ‡΅πŸ‡­Philippines danreb

    Changing the status of this issue to "Postponed" until the reporter try and test if the stale content is related to Solr cache or just a normal views page cache.

Production build 0.69.0 2024