Skip to content
Permalink
Browse files

Changed: output eZ Find debug messages with eZDebugSetting

  • Loading branch information...
peterkeung authored and dpobel committed Sep 7, 2012
1 parent c4349e6 commit 7558245c3e77205d68a854b9df2bb84a2e8c529d
Showing with 20 additions and 8 deletions.
  1. +6 −6 classes/ezfezpsolrquerybuilder.php
  2. +2 −2 search/plugins/ezsolr/ezsolr.php
  3. +12 −0 settings/debug.ini.append.php
@@ -141,7 +141,7 @@ public function buildMultiFieldQuery( $searchText, $solrFields = array(), $boost
*/
public function buildSearch( $searchText, $params = array(), $searchTypes = array() )
{
eZDebug::writeDebug( $params, 'search params' );
eZDebugSetting::writeDebug( 'extension-ezfind-query', $params, 'search params' );
$searchCount = 0;
$offset = ( isset( $params['SearchOffset'] ) && $params['SearchOffset'] ) ? $params['SearchOffset'] : 0;
@@ -469,7 +469,7 @@ public function buildSearch( $searchText, $params = array(), $searchTypes = arra
$searchResultClusterParamList = array( 'clustering' => 'true');
$searchResultClusterParamList = $this->buildSearchResultClusterQuery($searchResultClusterParams);
eZDebug::writeDebug( $searchResultClusterParamList, 'Cluster params' );
eZDebugSetting::writeDebug( 'extension-ezfind-query', $searchResultClusterParamList, 'Cluster params' );
$queryParams = array_merge(
@@ -728,9 +728,9 @@ protected function buildBoostFunctions( $boostFunctions = null, &$handlerParamet
*/
public function buildMoreLikeThis( $queryType, $query, $params = array() )
{
eZDebug::writeDebug( $queryType, 'mlt querytype' );
eZDebug::writeDebug( $query, 'mlt query' );
eZDebug::writeDebug( $params, 'mlt params' );
eZDebugSetting::writeDebug( 'extension-ezfind-query-mlt', $queryType, 'mlt querytype' );
eZDebugSetting::writeDebug( 'extension-ezfind-query-mlt', $query, 'mlt query' );
eZDebugSetting::writeDebug( 'extension-ezfind-query-mlt', $params, 'mlt params' );
$searchCount = 0;
$queryInstallationID = ( isset( $params['QueryInstallationID'] ) && $params['QueryInstallationID'] ) ? $params['QueryInstallationID'] : eZSolr::installationID();
@@ -1752,7 +1752,7 @@ protected function policyLimitationFilterQuery( $limitation = null, $ignoreVisib
$filterQuery .= ' AND ' . eZSolr::getMetaFieldName( 'is_invisible' ) . ':false';
}
eZDebug::writeDebug( $filterQuery, __METHOD__ );
eZDebugSetting::writeDebug( 'extension-ezfind-query', $filterQuery, __METHOD__ );
return $filterQuery;
}
@@ -917,7 +917,7 @@ function search( $searchText, $params = array(), $searchTypes = array() )
$queryParams = array_merge( $shardQueryPart, $queryParams );
}
eZDebug::accumulatorStop( 'Query build' );
eZDebug::writeDebug( $queryParams, 'Final query parameters sent to Solr backend' );
eZDebugSetting::writeDebug( 'extension-ezfind-query', 'Final query parameters sent to Solr backend' );
eZDebug::createAccumulator( 'Engine time', 'eZ Find' );
eZDebug::accumulatorStart( 'Engine time' );
@@ -1240,7 +1240,7 @@ function moreLikeThis( $queryType, $queryValue, $params = array() )
$stopWordArray = array();
eZDebug::accumulatorStop( 'Search' );
eZDebug::writeDebug( $resultArray['interestingTerms'], 'MoreLikeThis terms' );
eZDebugSetting::writeDebug( 'extension-ezfind-query-mlt', $resultArray['interestingTerms'], 'MoreLikeThis terms' );
return array(
'SearchResult' => $objectRes,
'SearchCount' => $searchCount,
@@ -0,0 +1,12 @@
<?php /* #?ini charset="utf-8"?
# Control the display of certain eZ Find debug messages
# Note that [DebugSettings]ConditionDebug in debug.ini is a master setting for all debug message conditions
[GeneralCondition]
# Run on every query
#extension-ezfind-query=disabled
# Run on every MoreLikeThis query
#extension-ezfind-query-mlt=disabled
*/
?>

0 comments on commit 7558245

Please sign in to comment.
You can’t perform that action at this time.