在刪除查詢後可能需要執行 commit()。
<?php
$this->solrClient->deleteByQuery('id:'.$entryId);
$result = $this->solrClient->commit();
?>
(PECL solr >= 0.9.2)
SolrClient::deleteById — 依 ID 刪除
刪除具有指定 ID 的文件。其中 ID 是在 schema 中宣告的 uniqueKey 欄位的值
id
在 schema 中宣告的 uniqueKey 欄位的值
成功時返回 SolrUpdateResponse,失敗時拋出例外。
在刪除查詢後可能需要執行 commit()。
<?php
$this->solrClient->deleteByQuery('id:'.$entryId);
$result = $this->solrClient->commit();
?>