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

          Kamil Madejski created issue -
          Kamil Madejski made changes -
          Field Original Value New Value
          Link This issue relates to CS-6300 [ CS-6300 ]
          Kamil Madejski made changes -
          Link This issue relates to EZP-27011 [ EZP-27011 ]
          Kamil Madejski made changes -
          Comment [ Might be related ]
          Kamil Madejski made changes -
          Description *Steps to reproduce*
          # Create fresh installation of latest eZ Publish (5.4.10)
          # Configure Solr (4.10.4)
          # Create article
          ## Check Solr index - create article should has {{main_location_priority_i}} set to *0*
          # Change article priority, for e.g. *8*
          ## Check Solr index - updated article should has {{main_location_priority_i}} set to *8*, but there is still *0*
          # Change article priority, set it again to *8*
          ## Check Solr index - now updated article will has {{main_location_priority_i}} set to *8*

          *Additional information from the customer*
          {quote}
          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.
          {quote}
          *Steps to reproduce*
          # Create fresh installation of latest eZ Publish (5.4.10)
          # Configure Solr (4.10.4)
          # Create article
          ## Check Solr index - create article should has {{main_location_priority_i}} set to *0*
          # Change article priority, for e.g. *8*
          ## Check Solr index - updated article should has {{main_location_priority_i}} set to *8*, but there is still *0*
          # Change article priority, set it again to *8*
          ## 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*
          {quote}
          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.
          {quote}
          Kamil Madejski made changes -
          Assignee Kamil Madejski [ kamil.madejski@ez.no ]
          Kamil Madejski made changes -
          Status Open [ 1 ] Confirmed [ 10037 ]
          Kamil Madejski made changes -
          Status Confirmed [ 10037 ] InputQ [ 10001 ]
          Kamil Madejski made changes -
          Status InputQ [ 10001 ] Development [ 3 ]
          Kamil Madejski made changes -
          Status Development [ 3 ] Development Review [ 10006 ]
          André Rømcke made changes -
          Status Development Review [ 10006 ] Documentation Review done [ 10011 ]
          Fix Version/s 2017.10 [ 14821 ]
          Fix Version/s 5.4.11-rc [ 14716 ]
          Assignee Kamil Madejski [ kamil.madejski@ez.no ]
          Rui Silva made changes -
          Status Documentation Review done [ 10011 ] QA [ 10008 ]
          Paulo Nunes made changes -
          Assignee Rui Silva [ rui.silva@ez.no ] Paulo Nunes [ paulo.nunes@ez.no ]
          Paulo Nunes made changes -
          Assignee Paulo Nunes [ paulo.nunes@ez.no ]
          Status QA [ 10008 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Alex Schuster made changes -
          Workflow EZ* Development Workflow [ 104831 ] EZEE Development Workflow [ 126627 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: