refactor(search): rename forceReindexFlag to forceRescanFlag

Address review feedback: now that the flag is read under its
registered name `force-rescan`, line the local variable up with the
operator-facing vocabulary. The proto field `ForceReindex` is left
untouched so the wire format stays the same.
This commit is contained in:
Dominik Schmidt
2026-04-21 15:29:04 +02:00
committed by Ralf Haferkamp
parent e7806445dc
commit 15d779cb23
+2 -2
View File
@@ -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-rescan")
forceRescanFlag, _ := cmd.Flags().GetBool("force-rescan")
if spaceFlag == "" && !allSpacesFlag {
return errors.New("either --space or --all-spaces is required")
}
@@ -50,7 +50,7 @@ func Index(cfg *config.Config) *cobra.Command {
c := searchsvc.NewSearchProviderService("eu.opencloud.api.search", grpcClient)
_, err = c.IndexSpace(context.Background(), &searchsvc.IndexSpaceRequest{
SpaceId: spaceFlag,
ForceReindex: forceReindexFlag,
ForceReindex: forceRescanFlag,
}, func(opts *client.CallOptions) { opts.RequestTimeout = 10 * time.Minute })
if err != nil {
fmt.Println("failed to index space: " + err.Error())