Skip to content

Commit

Permalink
Merge pull request #162 from peterkeung/fix-limitation-param
Browse files Browse the repository at this point in the history
Fix for EZP-22924: eZ Find fetch does not respect limitation parameter
  • Loading branch information
andrerom committed May 26, 2014
2 parents 82bf155 + 79c7739 commit 8585286
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 8585286

Please sign in to comment.