Skip to content

Update rust client for 1.19 - #288

Merged
generall merged 3 commits into
devfrom
v1-19-upgrade
Jul 25, 2026
Merged

Update rust client for 1.19#288
generall merged 3 commits into
devfrom
v1-19-upgrade

Conversation

@generall

@generall generall commented Jul 25, 2026

Copy link
Copy Markdown
Member

Upgrades the Rust client to the upcoming Qdrant 1.19 API, following CONTRIBUTING.md.

Protobuf definitions synced from qdrant/qdrant@dev via ./tools/sync_proto.sh, src/qdrant.rs regenerated with cargo 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 Memory enum (Cold / Cached / Pinned) replacing the boolean on-disk flags. Added .memory(..) to VectorParams, VectorParamsDiff, HnswConfigDiff, SparseIndexConfig, all four quantization builders, and all eight payload index params builders.

Payload storage params — new PayloadStorageParams message with PayloadStorageParamsBuilder, exposed as .payload(..) on CreateCollectionBuilder and CollectionParamsDiffBuilder.

Keyword prefix matchingKeywordIndexParamsBuilder::prefix(bool) enables it on the index, Condition::matches_prefix(field, prefix) queries it.

Slice conditionCondition::slice(total, index) selects one of total disjoint deterministic slices of the id space, e.g. to scroll a collection in parallel.

Per-request IDF corpusSearchParamsBuilder::idf(..) with the new IdfParams message and IdfParamsBuilder.

MiscTextIndexParamsBuilder::disabled_stemmer() for the new explicit no-stemming variant, StrictModeConfigBuilder::max_disk_usage_percent(..), and Datatype::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 at memory / 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:

Removed Cause
Copy for SearchParams new optional IdfParams idf field; IdfParams holds a Filter, which is not Copy
Eq + Hash for CreateShardKeyResponse, DeleteShardKeyResponse, UpdateCollectionClusterSetupResponse new double time field; f64 is neither Eq nor Hash

These cannot be avoided while tracking the server proto.

Testing

  • cargo clippy --workspace --all-targets --all-features -- -D warnings clean
  • cargo doc --no-deps --all-features clean
  • ./tests/integration-tests.sh against qdrant/qdrant:dev: 30 + 1 + 1 + 79 + 111 tests, all passing
  • 8 new snippets in tests/snippet_tests, covering every item above; tests/builder_coverage.rs extended with the new params

🤖 Generated with Claude Code

generall and others added 2 commits July 25, 2026 12:26
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) <noreply@anthropic.com>
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) <noreply@anthropic.com>
@generall

generall commented Jul 25, 2026

Copy link
Copy Markdown
Member Author

Follow-up tracked in #289: the 18 superseded setters ship in 1.19 with doc notes only, escalate to #[deprecated] in 1.20, move behind an opt-in feature in 1.21, and are removed in 1.22.

`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) <noreply@anthropic.com>
@generall
generall merged commit 7382277 into dev Jul 25, 2026
2 checks passed
generall added a commit that referenced this pull request Aug 3, 2026
Follow-up to #288. Upstream `dev` changed two things after that sync:

* `StrictModeConfig.max_disk_usage_percent` (field 22) is gone — reserved,
  superseded by the global quota config. `max_resident_memory_percent` is now
  marked `[deprecated = true]` for the same reason, with removal planned for
  1.21. The builder setter for the removed field is dropped (never released —
  latest tag is v1.18.0, so this breaks no published version), and the
  remaining setter gets a doc note instead of a `#[deprecated]` attribute,
  matching the convention from #288.
* The `Search`/`SearchBatch`/`SearchGroups`, `Recommend`/`RecommendBatch`/
  `RecommendGroups` and `Discover`/`DiscoverBatch` RPCs are marked deprecated
  in favour of the Query API, so the generated tonic client methods now carry
  `#[deprecated]`.

The `Qdrant::search_points`/`recommend`/`discover` wrappers keep working
warning-free (`#[allow(deprecated)]` internally) and point at their Query API
replacements via doc notes, so a 1.18 -> 1.20 bump stays source-compatible for
downstream crates building with `-D warnings`.

Verified with `cargo clippy --workspace --all-targets --all-features -D
warnings` (clean) and `tests/integration-tests.sh` against `qdrant/qdrant:dev`
(30 + 1 + 1 + 79 + 111 tests, all passing).

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
timvisee pushed a commit that referenced this pull request Aug 4, 2026
* Update rust client for 1.19

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) <noreply@anthropic.com>

* Keep superseded setters warning-free for 1.18 upgrades

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) <noreply@anthropic.com>

* Use builders for PayloadStorageParams and IdfParams

`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) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
timvisee pushed a commit that referenced this pull request Aug 4, 2026
Follow-up to #288. Upstream `dev` changed two things after that sync:

* `StrictModeConfig.max_disk_usage_percent` (field 22) is gone — reserved,
  superseded by the global quota config. `max_resident_memory_percent` is now
  marked `[deprecated = true]` for the same reason, with removal planned for
  1.21. The builder setter for the removed field is dropped (never released —
  latest tag is v1.18.0, so this breaks no published version), and the
  remaining setter gets a doc note instead of a `#[deprecated]` attribute,
  matching the convention from #288.
* The `Search`/`SearchBatch`/`SearchGroups`, `Recommend`/`RecommendBatch`/
  `RecommendGroups` and `Discover`/`DiscoverBatch` RPCs are marked deprecated
  in favour of the Query API, so the generated tonic client methods now carry
  `#[deprecated]`.

The `Qdrant::search_points`/`recommend`/`discover` wrappers keep working
warning-free (`#[allow(deprecated)]` internally) and point at their Query API
replacements via doc notes, so a 1.18 -> 1.20 bump stays source-compatible for
downstream crates building with `-D warnings`.

Verified with `cargo clippy --workspace --all-targets --all-features -D
warnings` (clean) and `tests/integration-tests.sh` against `qdrant/qdrant:dev`
(30 + 1 + 1 + 79 + 111 tests, all passing).

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

1 participant