From 3e5e5439a340acb9bd2cfd91fa47046c73abe656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20M=2E=20Requena=20Plens?= Date: Sat, 3 Oct 2026 09:44:27 +0200 Subject: [PATCH] fix(search): stop recommending --insecure for re-indexing With the client TLS mode honored, the default setup no longer needs --insecure, and with TLS enabled for gRPC the flag makes the command fail, since it turns TLS off. Drop it from the README examples and from the two re-index hints the service logs. MIGRATION.md keeps it: its section covers upgrading to 8.0.x, which still needs the flag. --- services/search/README.md | 4 ++-- services/search/pkg/mapping/reconcile.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/services/search/README.md b/services/search/README.md index d0f650e528..96bdc00c21 100644 --- a/services/search/README.md +++ b/services/search/README.md @@ -124,14 +124,14 @@ opencloud search index --space $SPACE_ID It can also be used to re-index all spaces: ```shell -opencloud search index --all-spaces --insecure +opencloud search index --all-spaces ``` Please note that a reindex only picks up new or changed files. Files that have already been indexed are not scanned again, even if the configuration or the whole extractor has been changed. To force a full rescan (re-running the extractor on every file) you need to use the `force-rescan` flag: ```shell -opencloud search index --all-spaces --force-rescan --insecure +opencloud search index --all-spaces --force-rescan ``` ## Metrics diff --git a/services/search/pkg/mapping/reconcile.go b/services/search/pkg/mapping/reconcile.go index 7490998a67..82cc46feb6 100644 --- a/services/search/pkg/mapping/reconcile.go +++ b/services/search/pkg/mapping/reconcile.go @@ -27,7 +27,7 @@ func Reconcile(index string, r SchemaReconciler, logger log.Logger) (Classificat case VerdictAdditive: persisted, err := r.ApplyAdditive() if persisted { - logger.Warn().Strs("fields", classification.NewFields).Str("index", index).Msg("extended the search index mapping with new fields; documents indexed before the upgrade do not contain them and queries on these fields will miss those documents until they are re-indexed; to re-index everything run: opencloud search index --all-spaces --force-rescan --insecure") + logger.Warn().Strs("fields", classification.NewFields).Str("index", index).Msg("extended the search index mapping with new fields; documents indexed before the upgrade do not contain them and queries on these fields will miss those documents until they are re-indexed; to re-index everything run: opencloud search index --all-spaces --force-rescan") } if err != nil { return classification, err @@ -40,5 +40,5 @@ func Reconcile(index string, r SchemaReconciler, logger log.Logger) (Classificat // LogNewIndexCreated logs that a fresh, empty index was created and how to // backfill it. The create path does not run through Reconcile. func LogNewIndexCreated(logger log.Logger, index string) { - logger.Info().Str("index", index).Msg("created a new empty search index; if this OpenCloud instance already held files, they are not in it yet, index them by running: opencloud search index --all-spaces --force-rescan --insecure") + logger.Info().Str("index", index).Msg("created a new empty search index; if this OpenCloud instance already held files, they are not in it yet, index them by running: opencloud search index --all-spaces --force-rescan") }