File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,13 @@ public function handle(ElasticaClient $elastica): void
25
25
return ;
26
26
}
27
27
28
+ if ($ this ->deleteExisting && $ this ->indexConfig ->hasBlueGreenIndices ()) {
29
+ $ index = $ elastica ->getClient ()->getIndex ($ this ->indexConfig ->getName ());
30
+ if (count ($ index ->getAliases ()) === 0 ) {
31
+ $ index ->delete ();
32
+ }
33
+ }
34
+
28
35
foreach (IndexInterface::INDEX_SUFFIXES as $ suffix ) {
29
36
$ name = $ this ->indexConfig ->getName ().$ suffix ;
30
37
$ aliasIndex = $ elastica ->getIndex ($ name );
Original file line number Diff line number Diff line change 5
5
namespace Limenet \LaravelElasticaBridge ;
6
6
7
7
use Illuminate \Database \Eloquent \Model ;
8
+
8
9
use function Illuminate \Events \queueable ;
10
+
9
11
use Illuminate \Support \Facades \Event ;
10
12
use Limenet \LaravelElasticaBridge \Client \ElasticaClient ;
11
13
use Limenet \LaravelElasticaBridge \Commands \IndexCommand ;
You can’t perform that action at this time.
0 commit comments