2016-11-23 90 views
1

我有Windows机器,ElasticSearch 5.0.0ElasticSearch的标准PHP客户机,这是我使用作曲家安装的。一切正常,除了删除操作。我不能查询删除,结果收到此错误信息:“ID不能为空”'id不能为空'。尝试从ElasticSearch删除时发生错误

未捕获的异常 “Elasticsearch \ COMMON \例外\ InvalidArgumentException”与 消息

这是我尝试删除:

$client = ClientBuilder::create()->build(); 
$params = [ 
    'index' => 'layers' 
    'type' => 'layers_type' 
    'body' => [ 
     'bool' => [ 
      'should' => [ 
       [ 
        'multi_match' => [ 
         'query' => ["304"], 
         'fields' => ["id"] // not a surrogate _id, by my own id, that is a part of my index properties 
        ] 
       ] 
      ] 
     ] 
    ] 
]; 
$client->delete($params); 

那么,如何解决这个问题?我是否需要安装任何插件,如果是,我怎样才能在Windows机器上做到这一点?

回答

相关问题