2017-09-05 75 views
0

Elasticsearchでリクエストを送信するときにエラーNo handler found for uri [/<url>/<url>] and method [PUT]が表示されます。uriのハンドラが見つかりません[/ <url>/<url>]と[PUT]

私はPUTではなくPOSTを使用していますので、_idを使用する必要はありません。 POSTを使用することは必須です。次の要求は、アーカイブインデックスを追加するまで有効でした。

int型とは反対に、インデックスを再構築し、文字列に archiveを変更
$params = [ 
      'index' => 'servers', 
      'type' => 'servers', 
      'body' => [ 
       'servername' => $servername, 
       'ip' => $ip, 
       'location' => $location, 
       'ping' => $ping, 
       'archive' => 0 
      ] 
     ]; 
     $response = $client->index($params); 

答えて

0

は、問題を解決しました。

$params = [ 
      'index' => 'servers', 
      'type' => 'servers', 
      'body' => [ 
       'servername' => $servername, 
       'ip' => $ip, 
       'location' => $location, 
       'ping' => $ping, 
       'archive' => "0" 
      ] 
     ]; 
     $response = $client->index($params); 
関連する問題