From e7806445dcacf86901f287b4a37e790f96868716 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Tue, 21 Apr 2026 00:04:10 +0200 Subject: [PATCH] fix(search): read --force-rescan flag with its registered name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `opencloud search index` command registers the flag as `--force-rescan` (see pflag registration below) but reads it via `GetBool("force-reindex")`, so the value is always false — passing `--force-rescan` had no effect and no force rescan was ever triggered. Read the flag under its registered name. --- services/search/pkg/command/index.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/search/pkg/command/index.go b/services/search/pkg/command/index.go index 8dd3621bac..3457d2deb4 100644 --- a/services/search/pkg/command/index.go +++ b/services/search/pkg/command/index.go @@ -29,7 +29,7 @@ func Index(cfg *config.Config) *cobra.Command { RunE: func(cmd *cobra.Command, args []string) error { allSpacesFlag, _ := cmd.Flags().GetBool("all-spaces") spaceFlag, _ := cmd.Flags().GetString("space") - forceReindexFlag, _ := cmd.Flags().GetBool("force-reindex") + forceReindexFlag, _ := cmd.Flags().GetBool("force-rescan") if spaceFlag == "" && !allSpacesFlag { return errors.New("either --space or --all-spaces is required") }