Skip to content

Commit

Permalink
Fix EZP-22903: Fetch url_alias in all available languages
Browse files Browse the repository at this point in the history
Fetch and add url alias in all available languages and not only in the default language to solr
  • Loading branch information
f-lambart committed May 22, 2014
1 parent 482e6b8 commit ad768dd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions search/plugins/ezsolr/ezsolr.php
Original file line number Diff line number Diff line change
Expand Up @@ -589,9 +589,11 @@ function addObject( $contentObject, $commit = true, $commitWithin = 0, $softComm
}


// Get url alias in specific language
$urlAlias = eZFunctionHandler::execute( 'switchlanguage', 'url_alias', array( 'node_id' => $mainNodeID, 'locale' => $languageCode ) );
// Add main url_alias
$doc->addField( ezfSolrDocumentFieldBase::generateMetaFieldName( 'main_url_alias' ), $mainNode->attribute( 'url_alias' ) );

$doc->addField( ezfSolrDocumentFieldBase::generateMetaFieldName( 'main_url_alias' ), $urlAlias );
// Add main path_string
$doc->addField( ezfSolrDocumentFieldBase::generateMetaFieldName( 'main_path_string' ), $mainNode->attribute( 'path_string' ) );

Expand Down

0 comments on commit ad768dd

Please sign in to comment.