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

LocationPriority sort clause returns wrong results for objects on multiple locations

    XMLWordPrintable

Details

    Description

      7When trying to search for contents from a query set with the "LocationPriority" sort clause, results are wrong.

      Steps to reproduce:

      1. Create the following content structure:

      Folder 1
      Article 1 (prioriy 1)
      Article 2 (prioriy 2)
      Article 3 (prioriy 3)
      Folder 2
      Article 1 (second location for Folder 1/Article 1, prioriy 3)
      Article 2 (second location for Folder 1/Article 2, prioriy 2)
      Article 3 (second location for Folder 1/Article 3, prioriy 1)

      2. Create a command with the following:

      $query = new Query();
      $query->criterion = new Criterion\LogicalAnd(array(new Criterion\ParentLocationId([nodeId Folder1])));
      $query->sortClauses = new SortClause\LocationPriority(Query::SORT_ASC);
      $result = $searchService->findContent($query);
      

      3. Run command. Results should be Article 1, Article 2, Article 3. Instead, got Article 2, Article 1, Article 3.

      Attachments

        Activity

          People

            Unassigned Unassigned
            nuno.oliveira-obsolete@ez.no Nuno Oliveira (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 50 minutes
                2h 50m