Update rust client for 1.19 - #288
Merged
Merged
Conversation
Sync protobuf definitions from qdrant `dev` and expose the new API surface. * Memory placement (`Memory` enum) on vector storage, HNSW graph, sparse index, all quantization configs and all payload index params. Deprecates `on_disk` / `always_ram` in favour of `memory`. * Payload storage params (`PayloadStorageParams`) on `CreateCollection` and `CollectionParamsDiff`. Deprecates `on_disk_payload` in favour of `payload`. * Keyword index prefix matching + `Condition::matches_prefix`. * `Condition::slice` for deterministic id-space slicing. * Per-request IDF corpus (`IdfParams`) on `SearchParams`. * Explicitly disabled stemming for the text index. * `StrictModeConfig::max_disk_usage_percent`. * `Datatype::Turbo4`. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The `#[deprecated]` attributes on `on_disk` / `always_ram` / `on_disk_payload` turn into hard errors for any downstream crate that builds with `#![deny(warnings)]` or `-D warnings` (as this repo's own CI does), which made a 1.18 -> 1.19 bump source-breaking for ordinary builder-based code. Replace them with doc-comment notes pointing at `memory` / `payload`, matching the convention already used for the 1.16 deprecations in `tests/protos.rs::configure_deprecations`. Verified by compiling the 1.18 release's own snippet suite and builder-coverage test verbatim against this branch: zero errors, zero warnings. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
9 tasks
Member
Author
|
Follow-up tracked in #289: the 18 superseded setters ship in 1.19 with doc notes only, escalate to |
`impl From<Memory> for PayloadStorageParams` and `impl From<Filter> for IdfParams` hard-coded the assumption that these messages have exactly one field. As soon as the proto grows a second one, a conversion from a single field reads as arbitrary, and there is no natural place to put the rest. Replace both with `PayloadStorageParamsBuilder` and `IdfParamsBuilder`, following the pattern used by the other all-optional builders. `.payload(..)` and `.idf(..)` keep their `impl Into<..>` bounds, so the builders are accepted directly. Neither `From` impl was ever released, so this is not a compatibility concern. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
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.
Upgrades the Rust client to the upcoming Qdrant 1.19 API, following
CONTRIBUTING.md.Protobuf definitions synced from
qdrant/qdrant@devvia./tools/sync_proto.sh,src/qdrant.rsregenerated withcargo test protos. No new RPCs were added server-side, so all changes are new fields/messages surfaced through builders and conversions.What's new
Memory placement — new
Memoryenum (Cold/Cached/Pinned) replacing the boolean on-disk flags. Added.memory(..)toVectorParams,VectorParamsDiff,HnswConfigDiff,SparseIndexConfig, all four quantization builders, and all eight payload index params builders.Payload storage params — new
PayloadStorageParamsmessage withPayloadStorageParamsBuilder, exposed as.payload(..)onCreateCollectionBuilderandCollectionParamsDiffBuilder.Keyword prefix matching —
KeywordIndexParamsBuilder::prefix(bool)enables it on the index,Condition::matches_prefix(field, prefix)queries it.Slice condition —
Condition::slice(total, index)selects one oftotaldisjoint deterministic slices of the id space, e.g. to scroll a collection in parallel.Per-request IDF corpus —
SearchParamsBuilder::idf(..)with the newIdfParamsmessage andIdfParamsBuilder.Misc —
TextIndexParamsBuilder::disabled_stemmer()for the new explicit no-stemming variant,StrictModeConfigBuilder::max_disk_usage_percent(..), andDatatype::Turbo4.Backward compatibility
The exposed builder and function surface is purely additive. Verified with
cargo public-api diff: 0 removed, 0 changed among builders and functions. No builder method, constructor, or helper function was removed or had its signature altered.The superseded setters (
on_disk,always_ram,on_disk_payload) keep working and still serialize the old proto fields. They are deliberately not marked#[deprecated]— that attribute becomes a hard error for any downstream crate building with#![deny(warnings)]or-D warnings(as this repo's own CI does). Instead they carry doc-comment notes pointing atmemory/payload. Escalation is tracked in #289:#[deprecated]in 1.20, opt-in feature in 1.21, removal in 1.22.Also verified by compiling the 1.18 release's own snippet suite (67 files) and builder-coverage test verbatim against this branch, plus a probe of every superseded setter under
#![deny(warnings)]— zero errors, zero warnings.The only items the API diff reports as removed are four auto-derived trait impls on generated structs, dropped mechanically because of the new proto fields:
Copy for SearchParamsoptional IdfParams idffield;IdfParamsholds aFilter, which is notCopyEq+HashforCreateShardKeyResponse,DeleteShardKeyResponse,UpdateCollectionClusterSetupResponsedouble timefield;f64is neitherEqnorHashThese cannot be avoided while tracking the server proto.
Testing
cargo clippy --workspace --all-targets --all-features -- -D warningscleancargo doc --no-deps --all-featuresclean./tests/integration-tests.shagainstqdrant/qdrant:dev: 30 + 1 + 1 + 79 + 111 tests, all passingtests/snippet_tests, covering every item above;tests/builder_coverage.rsextended with the new params🤖 Generated with Claude Code