Skip to content

Commit

Permalink
Fix for EZP-22924: eZ Find fetch does not respect limitation parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
peterkeung committed May 23, 2014
1 parent 82bf155 commit 79c7739
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions search/plugins/ezsolr/ezsolr.php
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ function search( $searchText, $params = array(), $searchTypes = array() )
{
$searchCount = $resultArray[ 'response' ][ 'numFound' ];
$objectRes = $this->buildResultObjects(
$resultArray, $searchCount, $asObjects, $params['FieldsToReturn']
$resultArray, $searchCount, $asObjects, $params
);

$stopWordArray = array();
Expand Down Expand Up @@ -1061,7 +1061,7 @@ function moreLikeThis( $queryType, $queryValue, $params = array() )
{
$searchCount = $resultArray[ 'response' ][ 'numFound' ];
$objectRes = $this->buildResultObjects(
$resultArray, $searchCount, $asObjects
$resultArray, $searchCount, $asObjects, $params
);

$stopWordArray = array();
Expand Down Expand Up @@ -1477,7 +1477,7 @@ public function pushElevateConfiguration()
* @see eZSolrBase::search
* @see eZSolrBase::moreLikeThis
*/
protected function buildResultObjects( $resultArray, &$searchCount, $asObjects = true, $fieldsToReturn = array() )
protected function buildResultObjects( $resultArray, &$searchCount, $asObjects = true, $params = array() )
{
$objectRes = array();
$highLights = array();
Expand Down Expand Up @@ -1555,7 +1555,7 @@ protected function buildResultObjects( $resultArray, &$searchCount, $asObjects =
}
// it may be a field originating from the explicit fieldlist to return, so it should be added for template consumption
// note that the fieldname will be kept verbatim in a substructure 'fields'
elseif( in_array( $fieldName, $fieldsToReturn ) )
elseif( in_array( $fieldName, $params['FieldsToReturn'] ) )
{
$emit['fields'][$fieldName] = $fieldValue;
}
Expand Down

0 comments on commit 79c7739

Please sign in to comment.