Windows 10, OpenServer, Laravel 4.2, Elasticsearch 1.0
Controller:
public function searchUser()
{
$elastic = app()->make(App\Services\Elastic::class);
$query = [
'multi_match' => [
'query' => 'Wood',
'fuzziness' => 'AUTO',
'fields' => ['username', 'email'],
],
];
$parameters = [
'index' => 'lara4',
'type' => 'user',
'body' => [
'query' => $query
]
];
$response = $elastic->search($parameters);
dd($response);
ERROR
Elasticsearch \ Common \ Exceptions \ Curl \ CouldNotConnectToHost
Failed to connect to localhost port 9200: Connection refused
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community