Files
ocis/changelog/unreleased/enhancement-search-optimize-command.md
Paul Faure a17760898c feat(search): add ocis search optimize CLI command (#12136)
Add a CLI-only optimize command that compacts the Bleve search index by
merging segments. The command opens the index directly via a new engine
factory (NewEngineFromConfig), without requiring the running gRPC service.

Key changes per review feedback from jvillafanez:
- CLI-only: no gRPC endpoint, no proto changes — admin triggers it
  directly when disruption is acceptable
- Engine factory: extracted engine creation from the gRPC handler into
  NewEngineFromConfig, reusable by both the service and CLI commands
- Optimize() merged into Engine interface: no separate Optimizer
  interface, non-supporting engines can return an error

Signed-off-by: Paul Faure <paul@faure.ca>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Martin <github@diemattels.at>
2026-04-17 09:16:03 +00:00

537 B

Enhancement: Add ocis search optimize CLI command

Added a new ocis search optimize command that compacts the search index by merging Bleve segments, without re-indexing content. The command opens the index directly (without requiring the search service to be running), making it safe to run during maintenance windows without blocking search queries.

This is useful after bulk reindexing operations that create many small index segments, which can degrade search performance over time.

https://github.com/owncloud/ocis/pull/12136