本文整理汇总了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 ) );
}