工作流程:
远程源
-&燃气轮机;
使用所有过期记录ID向SOLR发送请求
&燃气轮机;将新记录推送到Solr。
通过多个ID删除文档的正确查询语法是什么?
id:(1 OR 2 OR 3)...
id:(1 AND 2 AND 3)
在php中:
$query = sprintf('id:(%s)', implode(' AND ', $toDelete));
$solrUrl = sprintf('http://%s:%s/%s/%s', $this->solr['host'], $this->solr['port'], $this->solr['path'], $action);
$docs = [
'delete' => ['query' => $query]
];
$http = new Client();
$http->post($solrUrl, json_encode($docs),['type' => 'json', 'timeout' => 30]);