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

Solr index not updated immediately after change content priority



      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


          Kamil Madejski added a comment - PR: https://github.com/ezsystems/ezpublish-legacy/pull/1312
          André Rømcke added a comment - Merged: https://github.com/ezsystems/ezpublish-legacy/commit/f3fc14e1c1f23cb9a4edd78f261e72178acbd4d1
          Paulo Nunes (Inactive) added a comment -

          QA Approved

          Paulo Nunes (Inactive) added a comment - QA Approved


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


              • Created: