Skip to content

feat: bfb update-collection#157

Closed
tellet-q wants to merge 1 commit into
feat/timed-field-index-creationfrom
feat/update-collection
Closed

feat: bfb update-collection#157
tellet-q wants to merge 1 commit into
feat/timed-field-index-creationfrom
feat/update-collection

Conversation

@tellet-q

@tellet-q tellet-q commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Note: base is not dev! Only merge after #156

Apply a partial collection-config patch and wait for the optimization — a common benchmark shape.

bfb upload --file config.yaml -n 1M --skip-wait-index   # indexing_threshold: 1000000000
bfb update-collection --file examples/update-config.yaml --json index.json

collection:                                                                                                                                                                                                                                 
  name: benchmark                                                                                                                                                                                                                           
  optimizers:                                                                                                                                                                                                                               
    indexing_threshold: 1        # start indexing now
    # max_segment_size: 200000   # changing this triggers a merge

Updated collection: optimizers.indexing_threshold=1

Server reported changes: true
Index ready in 20.255 seconds

Only declared keys are sent — undeclared ≠ false/0, so the rest of the config is left alone. The patch request returns before the work finishes, so this waits and reports it the way bfb upload does: the patch lands under results.update_collection, the triggered indexing under results.index. A no-op patch is an error, not a silent success; --skip-wait-index fires and returns without waiting.

@tellet-q
tellet-q force-pushed the feat/timed-field-index-creation branch from 883eef8 to 3af4fda Compare July 16, 2026 08:05
@tellet-q
tellet-q force-pushed the feat/update-collection branch from d5162d6 to d2818ea Compare July 16, 2026 08:05
@tellet-q tellet-q changed the title feat: bfb update-collection; patch settings and measure the indexing it triggers feat: bfb update-collection Jul 16, 2026
@tellet-q
tellet-q requested a review from Copilot July 16, 2026 08:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new bfb update-collection subcommand to apply a partial, YAML-defined collection settings patch to an existing Qdrant collection, then (optionally) wait for and measure the indexing work that the patch triggers—mirroring how bfb upload reports indexing waits.

Changes:

  • Introduces update-collection CLI plumbing and JSON result reporting (results.update_collection, with triggered indexing under results.index).
  • Adds a YAML “patch” config format where all fields are optional, so only declared keys are sent to the server.
  • Documents the new workflow and adds an example update config file.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/results.rs Adds UpdateCollectionPhase and wires it into the per-phase JSON results structure.
src/main.rs Implements run_update_collection and dispatches the new subcommand.
src/config/update.rs New YAML patch config schema + validation (rejects patches that declare no fields) + unit tests.
src/config/mod.rs Exposes the new config::update module.
src/collection/mod.rs Implements the Qdrant update_collection call builder and reporting of the patch operation.
src/args/mod.rs Adds the UpdateCollection subcommand and its --file argument.
README.md Documents update-collection behavior, outputs, and JSON fields.
examples/update-config.yaml Provides an example patch file for common benchmark workflows.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/collection/mod.rs
Comment on lines +236 to +241
let started = Instant::now();
let response = client.update_collection(builder).await?;
let duration_secs = started.elapsed().as_secs_f64();

println!("Updated collection: {}", changed.join(", "));
println!("Server reported changes: {}", response.result);
…g it triggers

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@tellet-q
tellet-q force-pushed the feat/update-collection branch from d2818ea to 7cddfea Compare July 16, 2026 08:17
@tellet-q
tellet-q force-pushed the feat/timed-field-index-creation branch from 9ce4163 to 2e2e98a Compare July 16, 2026 08:18
@tellet-q tellet-q closed this Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants