deleteArticleFromIndex() public method

Deletes the given article from the Solr index.
public deleteArticleFromIndex ( $articleId ) : boolean
$articleId integer The ID of the article to be deleted.
return boolean true if successful, otherwise false.
Exemplo n.º 1
0
 /**
  * @see ArticleSearchIndex::articleDeleted()
  */
 function callbackArticleDeleted($hookName, $params)
 {
     assert($hookName == 'ArticleSearchIndex::articleDeleted');
     list($articleId) = $params;
     // Deleting an article must always be done synchronously
     // (even in pull-mode) as we'll no longer have an object
     // to keep our change information.
     $this->_solrWebService->deleteArticleFromIndex($articleId);
     return true;
 }
Exemplo n.º 2
0
 /**
  * @covers SolrWebService::deleteArticleFromIndex()
  */
 public function testDeleteArticleFromIndex()
 {
     $this->articleInIndex(3);
     self::assertTrue($this->solrWebService->deleteArticleFromIndex(3));
     $this->articleNotInIndex(3);
 }