D
D
deadnice2019-08-24 14:19:54
elasticsearch
deadnice, 2019-08-24 14:19:54

How to add multiple index types to elasticsearch?

There are several models, in the first one, indexes were added via scout, when I wanted to add to the second one, the elasticsearch server threw an error:

failed to put mappings on indices [], type [orders]
java.lang.IllegalArgumentException: Rejecting mapping update to [laravel] as the final mapping would have more than 1 type: [customers, orders]

I added an index like this:
php artisan scout:import "App\Models\Butlers\Order"
Imported [App\Models\Butlers\Order] models up to ID: 2
All [App\Models\Butlers\Order] records have been imported.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question