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

Solr index not updated when changing a content priority

    Details

      Description

      Steps to reproduce

      1. Prepare a test eZ Publish + ezsystems/ezplatform-solr-search-engine + netgen/ezplatformsearch environmewnt, fully updated via composer. Make sure the Solr service is running;

      Ref: https://doc.ez.no/display/EZP/Solr+Search+Engine+Bundle

      2. On the eZ Publish admin interface, create a test article called "Article 1". It will have a default priority value of "0";
      3. On the Solr admin interface, search for the newly created article e.g. http://localhost:8983/solr/collection1/select?q=%22Article+1%22&wt=json&indent=true
      4. On the resulting json structure, verify that the priority is as expected:

      ...
      "main_location_priority_i": 0,
      ...
      

      5. Back to the eZ Publish admin interface, change the article priority e.g. "1";
      6. On the Solr admin interface, search again for "Article 1". The priority is still "0", it should now be "1";

      Ref: https://github.com/netgen/ezplatformsearch/issues/11

        Activity

        Show
        André Rømcke added a comment - PR: https://github.com/ezsystems/ezpublish-legacy/pull/1283
        Hide
        Ricardo Correia added a comment - - edited

        André Rømcke, I made some debug but still don't have conclusions. I would need to look deeper into it, but it doesn't seem related to your proposed fix, or the registerSearchObject method.
        It seems to be another bug somewhere else in the dependencies.
        The behavior is that the first priority update of an object is never sent to solr, unless you do two priority changes in a row, without making anything in between.

        First action Second Action Third action Fourth action Changes visible in solr admin?
        Create Article A Create Article B Update Article A priority Update Article B priority Yes, for both.
        Create Article A Update Article A priority Create Article B Update Article B priority No, for both
        Create Article A Update Article A priority Create Article B Update Article B priority, twice Yes, but only for Article B

        After regenerating the solr index all the priority changes will be visible in solr.

        Show
        Ricardo Correia added a comment - - edited André Rømcke , I made some debug but still don't have conclusions. I would need to look deeper into it, but it doesn't seem related to your proposed fix, or the registerSearchObject method. It seems to be another bug somewhere else in the dependencies. The behavior is that the first priority update of an object is never sent to solr, unless you do two priority changes in a row, without making anything in between. First action Second Action Third action Fourth action Changes visible in solr admin? Create Article A Create Article B Update Article A priority Update Article B priority Yes, for both. Create Article A Update Article A priority Create Article B Update Article B priority No, for both Create Article A Update Article A priority Create Article B Update Article B priority, twice Yes, but only for Article B After regenerating the solr index all the priority changes will be visible in solr.
        Hide
        André Rømcke added a comment -

        As original reporter says this solves his issue this is now merged: https://github.com/ezsystems/ezpublish-legacy/commit/4b71f556cc7a11d7736edaa311dcf11c30433044

        Show
        André Rømcke added a comment - As original reporter says this solves his issue this is now merged: https://github.com/ezsystems/ezpublish-legacy/commit/4b71f556cc7a11d7736edaa311dcf11c30433044

          People

          • Assignee:
            Unassigned
            Reporter:
            Nuno Oliveira
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: