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

Search API: sorting by field filters the results

    XMLWordPrintable

Details

    Description

      Applying a Field sortClause to a query will filter the search results to contents of that type.

      The expected result would be that sort clauses would only sort results

      Steps to reproduce:

      Verify that the following command snippet, that searches content belonging to section 1 ("Standard") only returns contents of type "folder"

              // query criterion       
              $query->criterion = new Criterion\SectionId( array( 1 ) );
      
              // apply sort clauses
              $query->sortClauses = array(
                  new SortClause\Field( 'folder', 'title', SearchQuery::SORT_ASC, 'eng-GB' )
              );
      
              // find content
              $result = $searchService->findContent( $query );
      
              foreach ( $result->searchHits as $searchHit )
                  $output->writeln( '* ' . $searchHit->valueObject->contentInfo->name );
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            joao.inacio-obsolete@ez.no Joao Inacio (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            8 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 - 3 days, 5 hours, 35 minutes
                3d 5h 35m