getInterestingTerms() public method

Retrieve "interesting terms" from a document to be used in a "similar documents" search.
public getInterestingTerms ( $articleId ) : array
$articleId integer The article from which we retrieve "interesting terms".
return array An array of terms that can be used to execute a search for similar documents.
コード例 #1
0
ファイル: SolrWebServiceTest.php プロジェクト: jalperin/ojs
 /**
  * @covers SolrWebService::getInterestingTerms()
  */
 public function testGetInterestingTerms()
 {
     $actualTerms = $this->solrWebService->getInterestingTerms(2);
     self::assertEquals(array(), $actualTerms);
     $expectedTerms = array('ranking', 'article', 'test');
     $actualTerms = $this->solrWebService->getInterestingTerms(10);
     self::assertEquals($expectedTerms, $actualTerms);
 }
コード例 #2
0
ファイル: SolrWebServiceTest.php プロジェクト: mariojp/ojs
 /**
  * @covers SolrWebService::getInterestingTerms()
  */
 public function testGetInterestingTerms()
 {
     $this->markTestSkipped('Not currently working in CI environment.');
     $actualTerms = $this->solrWebService->getInterestingTerms(2);
     self::assertEquals(array(), $actualTerms);
     $expectedTerms = array('ranking', 'article', 'test');
     $actualTerms = $this->solrWebService->getInterestingTerms(10);
     self::assertEquals($expectedTerms, $actualTerms);
 }