You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way currently to batch index multiple records similar to the elastic:update command, but with where condition?
I create many records in database and then i have to foreach the records and save them to get them in elasticsearch which is very slow.
Something like Model::index()->where('agency_id', '=', 1), this internaly should handle the indexing and batching, is there a way to achieve this? I dont understand why elastic:update is faster if its doing similar to foreaching the models.
This is very slow:
$agency->clients()->chunk(1000, function ($clients) {
foreach ($clientsas$client) {
$client->touch();
}
});
Running elastic:update index_name is way faster.
The text was updated successfully, but these errors were encountered:
Hello,
Is there a way currently to batch index multiple records similar to the elastic:update command, but with where condition?
I create many records in database and then i have to foreach the records and save them to get them in elasticsearch which is very slow.
Something like
Model::index()->where('agency_id', '=', 1)
, this internaly should handle the indexing and batching, is there a way to achieve this? I dont understand why elastic:update is faster if its doing similar to foreaching the models.This is very slow:
Running elastic:update index_name is way faster.
The text was updated successfully, but these errors were encountered: