Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-27735

Solr index not updated immediately after change content priority

    Details

      Description

      Steps to reproduce

      1. Create fresh installation of latest eZ Publish (5.4.10)
      2. Configure Solr (4.10.4)
      3. Create article
        1. Check Solr index - create article should has main_location_priority_i set to 0
      4. Change article priority, for e.g. 8
        1. Check Solr index - updated article should has main_location_priority_i set to 8, but there is still 0
      5. Change article priority, set it again to 8
        1. Check Solr index - now updated article will has main_location_priority_i set to 8

      The issue appears only during the first occurrence of changing the value. Every next change is properly indexed.

      Additional information from the customer

      We created a new article and published the object again. After it we changed the priority for this new obeject. The search handler use eZ\Publish\Core\Persistence\Cache\LocationHandler::loadLocationsByContent. But in this method the line
      if ($cache->isMiss()) {
      delivers false so that the location will be used from stash cache. The stash cache has still the old priority 0. So the Solr object will be updated but with the old priority with value 0. So in Solr we have the old priority until the object will be updated.
      But if we change the priority a second time the same line
      if ($cache->isMiss()) {
      will deliver true. Then the location will be fetched again and the new priority will be used for sending data to Solr. So the editor has to change the priority twice to update the Solr object. This behaviour we have in dev and prod mode.

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              Kamil Madejski
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: