Answer the question
In order to leave comments, you need to log in
How to connect elasticsearch to laravel for database search?
Does elasticsearch allow you to search the database at all? Some terribly meager documentation on elastic. For example:
$params = [
'index' => 'my_index',
'type' => 'my_type',
'id' => 'my_id',
'body' => ['testField' => 'abc']
];
$data = [
'body' => [
'_all' => 'леонид'
],
'index' => 'leagues',
'type' => 'name'
];
dd($client->index($data));
After you publish the configuration file as suggested above, you may configure ElasticSearch by adding the following to your application's .env file (with appropriate values):
ELASTICSEARCH_HOST=localhost
ELASTICSEARCH_PORT=9200
ELASTICSEARCH_SCHEME=http
ELASTICSEARCH_USER=
ELASTICSEARCH_PASS=
Answer the question
In order to leave comments, you need to log in
Elastic is not a database and there are no tables. Well, so that you are completely in shock.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question