Hello guys:
wiki Didn't explain the specific parameters, how should I through login authentication??
$builder = ClientBuilder::create();
$builder->setHosts(array ('http://127.0.0.1:9630'));
$client = $builder->build();
$params = array (
"search_type" => "scan",
'index' => 'aires_all',
'body' => array (
"query" => array (
"match_all" => array ()
)
)
);
$indices = $client->search($params);
Elasticsearch\Common\Exceptions\BadRequest400Exception : Unauthorized
PHP 7.1.11>= 6.06.0Are you wanting to know how to setup HTTP Basic Authorization? There are some docs here:
https://www.elastic.co/guide/en/elasticsearch/client/php-api/6.0/_security.html
Wow! Thank you for your,This is what I want
Happy to help :) Goodluck!
Most helpful comment
Are you wanting to know how to setup HTTP Basic Authorization? There are some docs here:
https://www.elastic.co/guide/en/elasticsearch/client/php-api/6.0/_security.html