Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Elasticsearch client reference and not supported _type tag #1660

Closed
davidfabbretti opened this issue Apr 26, 2022 · 5 comments
Closed
Labels
Milestone

Comments

@davidfabbretti
Copy link

use Elasticsearch\Client;

Must be:

use Elastic\Elasticsearch\Client;

AND

'_type' => $record['_type'],

Unsupported _type tag

@davidfabbretti
Copy link
Author

laravel.EMERGENCY: Unable to create configured logger. Using emergency logger. {"exception":"[object] (TypeError(code: 0): Monolog\Handler\ElasticsearchHandler::__construct(): Argument #1 ($client) must be of type Elasticsearch\Client, Elastic\Elasticsearch\Client given, called in /app/Providers/ElasticLogProvider.php on line 44 at /vendor/monolog/monolog/src/Monolog/Handler/ElasticsearchHandler.php:60)

@davidfabbretti
Copy link
Author

400 Bad Request: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Action/metadata line [1] contains an unknown parameter [_type]"}],"type":"illegal_argument_exception","reason":"Action/metadata line [1] contains an unknown parameter [_type]"},"status":400}

@Seldaek Seldaek added this to the 2.x milestone May 3, 2022
@Seldaek Seldaek added the Feature label May 3, 2022
@Seldaek
Copy link
Owner

Seldaek commented May 3, 2022

The problem is you're using elasticsearch/elasticsearch v8 which changed some things.

See #1662 for ES8 support, but in the meantime I suggest you use v7.

@ezimuel
Copy link

ezimuel commented May 7, 2022

@davidfabbretti the _type is not supported anymore in Elasticsearch 8. This parameter has been deprecated in Elasticsearch 7, read here for more details.

@Seldaek
Copy link
Owner

Seldaek commented May 8, 2022

OK should be fixed by #1662

@Seldaek Seldaek closed this as completed May 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants