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. |
/** * @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); }
/** * @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); }