本文整理匯總了PHP中eZSolr::moreLikeThis方法的典型用法代碼示例。如果您正苦於以下問題:PHP eZSolr::moreLikeThis方法的具體用法?PHP eZSolr::moreLikeThis怎麽用?PHP eZSolr::moreLikeThis使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類eZSolr
的用法示例。
在下文中一共展示了eZSolr::moreLikeThis方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: moreLikeThis
/**
* moreLikeThis function
* @todo document the solrconfig.xml required setting for remote streaming to be true
* if $queryType 'url' is to be used
* @todo consider adding limitation and visibility parameters
*
* @param string $queryType string ( 'nid' | 'oid' | 'text' | 'url' )
* @param string $query value for QueryType
* @param int Offset
* @param int Limit
* @param array Facet definition
* @param array Filter parameters
* @param array Sort by parameters
* @param mixed Content class ID or list of content class IDs
* @param array list of subtree limitation node IDs
* @param boolean asObjects return regular eZPublish objects if true, stored Solr content if false
* @param string|null $queryInstallationID the eZ Find installation id to
* use when looking for the reference document in Solr
*
* @return array result as a PHP array
*/
public function moreLikeThis( $queryType, $query, $offset = 0, $limit = 10, $facets = null,
$filters = null, $sortBy = null, $classID = null, $sectionID = null,
$subtreeArray = null, $asObjects = true, $queryInstallationID = null )
{
$solrSearch = new eZSolr();
$params = array( 'SearchOffset' => $offset,
'SearchLimit' => $limit,
'Facet' => $facets,
'SortBy' => $sortBy,
'Filter' => $filters,
'SearchContentClassID' => $classID,
'SearchSectionID' => $sectionID,
'SearchSubTreeArray' => $subtreeArray,
'QueryInstallationID' => $queryInstallationID,
'AsObjects' => $asObjects);
return array( 'result' => $solrSearch->moreLikeThis( $queryType, $query, $params ) );
}