Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion classes/ezfezpsolrquerybuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ protected function getParamFilterQuery( $parameterList )
$baseNameInfo = eZSolr::getFieldName( $baseName, true, 'filter' );
if ( is_array( $baseNameInfo ) and isset( $baseNameInfo['contentClassId'] ) )
{
$filterQueryList[] = '( ' . eZSolr::getMetaFieldName( 'contentclass_id' ) . ':' . $baseNameInfo['contentClassId'] . ' AND ' . $baseNameInfo['fieldName'] . ':' . $value . ' )' ;
$filterQueryList[] = $baseNameInfo['localVars'] . '( ' . eZSolr::getMetaFieldName( 'contentclass_id' ) . ':' . $baseNameInfo['contentClassId'] . ' AND ' . $baseNameInfo['fieldName'] . ':' . $value . ' )' ;
}
else
{
Expand Down
11 changes: 9 additions & 2 deletions search/plugins/ezsolr/ezsolr.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,12 @@ static function getMetaAttributeType( $name, $context = 'search' )
*/
static function getFieldName( $baseName, $includingClassID = false, $context = 'search' )
{
$localVars = "";
if (preg_match('/^(\{[^}]+\})(.+)$/', $baseName, $matches)) {
$baseName = array_pop($matches);
$localVars = array_pop($matches);
}

// If the base name is a meta field, get the correct field name.
if ( eZSolr::hasMetaAttributeType( $baseName, $context ) )
{
Expand Down Expand Up @@ -247,10 +253,11 @@ static function getFieldName( $baseName, $includingClassID = false, $context = '
if ( $includingClassID )
{
return array( 'fieldName' => $fieldName,
'contentClassId' => $contentClassAttribute->attribute( 'contentclass_id' ) );
'contentClassId' => $contentClassAttribute->attribute( 'contentclass_id' ),
'localVars' => $localVars );
}
else
return $fieldName;
return $localVars . $fieldName;
}
}

Expand Down