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

No method to get only the number of results of a search

    Details

      Description

      There's no method to only get the number of results of a search

        Activity

        Hide
        Damien Pobel (Inactive) added a comment -

        This does the trick:

        $query = new Query( array( 'limit' => 0 ) );
        $query->criterion = new SectionId( $sectionId );
        $repository->getSearchService()->findContent( $query )->totalCount;
        

        Show
        Damien Pobel (Inactive) added a comment - This does the trick: $query = new Query( array( 'limit' => 0 ) ); $query->criterion = new SectionId( $sectionId ); $repository->getSearchService()->findContent( $query )->totalCount;

          People

          • Assignee:
            Unassigned
            Reporter:
            Damien Pobel (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            1 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 - 30 minutes
              30m