feat(cli): add reindex command to trigger content re-indexing#795
Merged
ZaynJarvis merged 1 commit intovolcengine:mainfrom Mar 20, 2026
Merged
Conversation
Wire up the existing POST /api/v1/content/reindex HTTP endpoint to the CLI. The endpoint already existed and had test coverage, but the Rust CLI layer was never connected. Adds: - client.rs: reindex() method that POSTs to /api/v1/content/reindex - commands/content.rs: reindex handler following the same pattern as read/abstract/overview - main.rs: Reindex subcommand with --regenerate and --wait flags Usage: ov reindex viking://resources/my-doc/ ov reindex viking://resources/my-doc/ --regenerate ov reindex viking://resources/my-doc/ --no-wait Closes volcengine#468 This contribution was developed with AI assistance (Claude Code + Codex). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
zeattacker
pushed a commit
to zeattacker/OpenViking
that referenced
this pull request
Mar 20, 2026
…gine#795) Wire up the existing POST /api/v1/content/reindex HTTP endpoint to the CLI. The endpoint already existed and had test coverage, but the Rust CLI layer was never connected. Adds: - client.rs: reindex() method that POSTs to /api/v1/content/reindex - commands/content.rs: reindex handler following the same pattern as read/abstract/overview - main.rs: Reindex subcommand with --regenerate and --wait flags Usage: ov reindex viking://resources/my-doc/ ov reindex viking://resources/my-doc/ --regenerate ov reindex viking://resources/my-doc/ --no-wait Closes volcengine#468 This contribution was developed with AI assistance (Claude Code + Codex). Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Thanks for the review and merge! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #468. The
POST /api/v1/content/reindexHTTP endpoint (merged in #631) was never wired to the CLI. This adds theov reindexcommand.Changes
crates/ov_cli/src/client.rsreindex()method - POSTs to/api/v1/content/reindexwith{uri, regenerate, wait}crates/ov_cli/src/commands/content.rsreindexhandler following the same pattern asread/abstract_content/overviewcrates/ov_cli/src/main.rsReindexsubcommand enum variant, match dispatch arm, andhandle_reindexfunctionUsage
Flags:
--regenerate/-r: Force regenerate.abstract.mdand.overview.mdeven if they already exist--wait(default: true) /--no-wait: Whether to block until reindexing completesTest plan
cargo checkpasses with no new warningsov reindex --helpshows the command with correct flagstests/server/test_api_content.py- this is a passthrough layerThis contribution was developed with AI assistance (Claude Code + Codex).