From 68fce10d562152d198906b280c6541677180d832 Mon Sep 17 00:00:00 2001 From: Daniel Klabbers Date: Tue, 16 Nov 2021 20:33:17 +0100 Subject: [PATCH] support patching the mapping without recreating --- src/Commands/BuildCommand.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Commands/BuildCommand.php b/src/Commands/BuildCommand.php index 15ee191..a1f433f 100644 --- a/src/Commands/BuildCommand.php +++ b/src/Commands/BuildCommand.php @@ -21,6 +21,7 @@ class BuildCommand extends Command {--throttle= : Number of seconds to wait between pushing to the queue} {--only= : type to run seeder for, eg discussions or posts} {--recreate : create or recreate the index} + {--mapping : recreate the mapping} {--continue : continue each object type where you left off}'; protected $description = 'Rebuilds the complete search server with its documents.'; @@ -76,7 +77,9 @@ class BuildCommand extends Command ] ] ]); + } + if ($this->option('recreate') || $this->option('mapping')) { $client->indices()->putMapping([ 'index' => $index, 'body' => $properties