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

search with SearchLimit=>false returns a maximum of 20 items (standard search plugin returns all items )

    XMLWordPrintable

Details

    Description

      The code below exhibits the problem when more than 20 results are returned.

      • With standard search plugin, $count1 == $count2 whatever $count2.
      • With ezfind 1.0.2 search plugin, when $count2>20, $count1==20.
        $searchArray =& eZSearch::buildSearchArray();
        $results = eZSearch::search($searchText ,array('SearchSubTreeArray' => 2,'SearchContentClassID'=>$classIds,'SearchOffset' => 0,'SearchLimit' => false),$searchArray);				
        $count1 = count($results['SearchResult']);
        $count2 = $results['SearchCount'];
        

      The line below (search/plugins/ezsolr/ezsolr.php) sets a default SearchLimit to 20 when SearchLimit=>false is set.

      $limit = ( isset( $params['SearchLimit']  ) && $params['SearchLimit'] ) ? $params['SearchLimit'] : 20;
      

      This behavior is not the standard search plugin one.
      It seems to logical that when SearchLimit is set to false, this is because the caller wants all the results and not the 20 first.

      ezfind 2.0.0 seems to set a default search limit too (file classes/ezfezpsolrquerybuilder.php)

              $limit = ( isset( $params['SearchLimit']  ) && $params['SearchLimit'] ) ? $params['SearchLimit'] : 10;
      

      Attachments

        Activity

          People

            unknown unknown
            lcoppeaux lcoppeaux
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: