Skip to content

feat(cli): add reindex command to trigger content re-indexing#795

Merged
ZaynJarvis merged 1 commit intovolcengine:mainfrom
mvanhorn:osc/468-feat-cli-reindex-command
Mar 20, 2026
Merged

feat(cli): add reindex command to trigger content re-indexing#795
ZaynJarvis merged 1 commit intovolcengine:mainfrom
mvanhorn:osc/468-feat-cli-reindex-command

Conversation

@mvanhorn
Copy link
Copy Markdown
Contributor

Summary

Closes #468. The POST /api/v1/content/reindex HTTP endpoint (merged in #631) was never wired to the CLI. This adds the ov reindex command.

Changes

File Change
crates/ov_cli/src/client.rs Add reindex() method - POSTs to /api/v1/content/reindex with {uri, regenerate, wait}
crates/ov_cli/src/commands/content.rs Add reindex handler following the same pattern as read/abstract_content/overview
crates/ov_cli/src/main.rs Add Reindex subcommand enum variant, match dispatch arm, and handle_reindex function

Usage

ov reindex viking://resources/my-doc/
ov reindex viking://resources/my-doc/ --regenerate
ov reindex viking://resources/my-doc/ --no-wait

Flags:

  • --regenerate / -r: Force regenerate .abstract.md and .overview.md even if they already exist
  • --wait (default: true) / --no-wait: Whether to block until reindexing completes

Test plan

  • cargo check passes with no new warnings
  • ov reindex --help shows the command with correct flags
  • HTTP endpoint already has test coverage in tests/server/test_api_content.py - this is a passthrough layer

This contribution was developed with AI assistance (Claude Code + Codex).

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>
Copy link
Copy Markdown
Collaborator

@ZaynJarvis ZaynJarvis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm thx

@ZaynJarvis ZaynJarvis merged commit dbfdb51 into volcengine:main Mar 20, 2026
12 checks passed
@github-project-automation github-project-automation bot moved this from Backlog to Done in OpenViking project Mar 20, 2026
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>
@mvanhorn
Copy link
Copy Markdown
Contributor Author

Thanks for the review and merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Feature]: Support post-generation adjustment of .overview.md

2 participants