33 Commits

Author SHA1 Message Date
xzfc
0b0df145b3 Drop RocksDB (#8529)
* Skip broken tests

* Add rocksdb dropper

This is a temporary tool. It will be removed later in this PR.

* [automated] Drop rocksdb

This commit is made by running tools/rocksdb/drop.sh

* Touch-up after ast-grep

The previous automated commit removed items, but not their comments.
Also, some blocks are left with only one item.
Also, ast-grep can't handle macros like `vec![]`.

This commit completes the job.

* Remove RocksDB dropper

* Remove mentions of rocksdb feature in CI

* Fix clippy warnings

These `FIXME` comments added previously in this PR by ast-grep by
"peeling" cfg_attr like this:

    -#[cfg_attr(not(feature = "rocksdb"), expect(...))]
    +#[expect(...)] // FIXME(rocksdb): ...

This commit removes these allow/expect attributes and fixes clippy
lints.

* Remove leftover rocksdb-related code

Removed:
- Cargo.toml: rocksdb cargo feature flag and dependencies.
- code: rocksdb-related items that was not under feature flag.
- flags.rs: rocksdb-related qdrant feature flags.

Disabled:
- Some benchmarks because these do not compile now.

* Print warning if rocksdb leftovers found in snapshots

* Remove Clone from tokenizer

* Regenerate openapi.json
2026-03-31 18:08:39 +00:00
xzfc
8ab0057566 DiscoveryQuery -> DiscoverQuery (#8378) 2026-03-12 19:54:34 +01:00
Ivan Pleshkov
30cf43382b Deferred threshold integration (#8246)
* Deferred threshold integration

* update deferred id

* apply update_deferred_internal_id

* fix segment inspector

* use avaliable bytes count

* renamings

* review remarks

* review remarks

* move has_deferred_points

* remove todo

* update comments
2026-03-02 09:57:19 +01:00
dependabot[bot]
18a7587d4b build(deps): bump rand_distr from 0.5.1 to 0.6.0 (#8148)
* build(deps): bump rand_distr from 0.5.1 to 0.6.0

Bumps [rand_distr](https://github.com/rust-random/rand_distr) from 0.5.1 to 0.6.0.
- [Release notes](https://github.com/rust-random/rand_distr/releases)
- [Changelog](https://github.com/rust-random/rand_distr/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand_distr/compare/0.5.1...0.6.0)

---
updated-dependencies:
- dependency-name: rand_distr
  dependency-version: 0.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Migrate main code base to rand 0.10

* Migrate tests

* Migrate benches

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: timvisee <tim@visee.me>
2026-02-25 14:15:04 +01:00
xzfc
77c71712db Indexing progress (#7625)
* Add progress_tracker.rs

* Pass progress tracker around

* Populate progress tracker with actual data

* Expose progress on `/collections/{name}/optimizations` endpoint
2025-12-09 00:15:36 +00:00
Andrey Vasnetsov
29a1197c4e derive Eq for Filter (and underlying types) (#7419)
* derive Eq for Filter (and underlying types)

* fix tests

* use ptr to compare and hash CustomIdChecker

* fix gpu test

* fmt

* use OrderedFloat directly

* post-rebase fixes

* fmt

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2025-10-20 17:27:03 +02:00
xzfc
95b4bbf978 Rename HnswConfig::{copy_vectors -> inline_storage} (#7389) 2025-10-13 10:08:06 +00:00
xzfc
22df6bc30a Integrate hnsw_with_vectors (#7232)
* StorageGraphLinksVectors::try_new, make GraphLinksVectorsLayout non-fallible

* Integrate hnsw_with_vectors

* remove unused function

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-09-18 17:36:48 +00:00
Ivan Pleshkov
2d1b92c16b Create and load for an appendable quantization (#7193)
* Create and load for an appendable quantization

remove feature flag

more todo

review remarks

review remarks

* fix after rebase

* Rename is_appendable to supports_appendable

---------

Co-authored-by: timvisee <tim@visee.me>
2025-09-01 15:49:09 +02:00
Ivan Pleshkov
9dc393e1c0 Merge pull request #6201
* bq encodings

* update docs

* fix after rebase

* fix gpu build

* fix build after rebase
2025-07-03 14:44:21 +02:00
xzfc
706571d8b4 Configurable HNSW healing threshold (#6756) 2025-06-25 10:22:18 +00:00
Ivan Pleshkov
fe5becdadd Merge pull request #6663
* bq encodings

* are you happy clippy

* are you happy clippy

* are you happy clippy

* are you happy clippy

* gpu tests

* update models

* are you happy fmt

* move additional bits to the end

* fix tests

* Welford's Algorithm

* review remarks

* are you happy clippy

* remove debug println in test

* coderabit nitpicks

* remove unnecessary clone and partialeq

* Use f64 for Welford's Algorithm

* try fix ci

* revert cargo-nextest

* add debug assertions
2025-06-19 18:21:00 +02:00
Tim Visée
f90b9d6d65 Fix tests after removing RocksDB feature flag (#6649)
* Use sparse vector storage fixture without RocksDB

* Fix some tests

* Replace RocksDB sparse storage with Gristore in mutable text index tests

* Use in-memory vector storage in multivector HNSW test

* Flag many more RocksDB specifics in tests

* Use database placeholder type without RocksDB flag

* Flag more tests

* Flag even more tests

* Fix imports, fix typo, and repair base test build

* Initialize dummy database if RocksDB flag is disabled

* Assert correct storage types

* Don't use old vector storage type when RocksDB is disabled

* Expos default for vector storage type only in tests

* Only expose simple segment constructor in tests

* Don't derive Default

* Fix inverted appendable flag
2025-06-11 15:04:27 +02:00
Luis Cossío
93dea164e8 Deterministic HNSW builder (#6477)
* pass a RNG to hnsw index building

* use single-threaded build for accuracy-measuring tests

* clippy
2025-05-07 11:20:19 -04:00
xzfc
89d399ef99 Incremental HNSW index building: append-only case (#6325)
* Pass FeatureFlags into VectorIndexBuildArgs

* Incremental HNSW index building: append-only case

* Use debug_assert

* first_few_ids

* Check deleted_point_count

* Drop unused method
2025-04-09 18:56:53 +00:00
Luis Cossío
5670a7c917 sum_scores recommendation strategy (#6256)
* Add in rest and grpc

* add to QueryEnum

* implement Query trait

* connect to scorer creation

* upd tests

* additional changes

* fmt

* gen openapi and grpc docs

* coderabbit fix

* add changes in async scorer

* test sum_scores in more places, refactor to remove repetition
2025-04-03 09:01:39 +02:00
Jojii
ae64690c7a Measure Payload Index IO Writes (#6137)
* Prepare measurement of index creation + Remove vector deletion
measurement

* add hw_counter to add_point functions

* Adjust add_point(..) function signatures

* Add new measurement type: payload index IO write

* Measure payload index IO writes

* Some Hw measurement performance improvements

* Review remarks

* Fix measurements in distributed setups

* review fixes

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-03-24 19:39:17 +01:00
Tim Visée
3e536347e1 Bump Rust edition to 2024 (#6042)
* Bump Rust edition to 2024

* gen is a reserved keyword now

* Remove ref mut on references

* Mark extern C as unsafe

* Wrap unsafe function bodies in unsafe block

* Geo hash implements Copy, don't reference but pass by value instead

* Replace secluded self import with parent

* Update execute_cluster_read_operation with new match semantics

* Fix lifetime issue

* Replace map_or with is_none_or

* set_var is unsafe now

* Reformat
2025-02-25 11:21:25 +01:00
Andrey Vasnetsov
f7d0814ab6 IO resource usage permit (#6015)
* rename cpu_budget -> resource_budget

* clippy

* add io budget to resources

* fmt

* move budget structures into a separate file

* add extend permit function

* dont extend existing permit

* switch from IO to CPU permit

* do not release resource before aquiring an extension

* fmt

* Review remarks

* Improve resource permit number assertion

* Make resource permit replace_with only acquire extra needed permits

* Remove obsolete drop implementation

* allocate IO budget same as CPU

* review fixes

---------

Co-authored-by: timvisee <tim@visee.me>
2025-02-20 09:05:00 +01:00
Luis Cossío
af74d1b96a bump and migrate to rand 0.9.0 (#5892)
* bump and migrate to rand 0.9.0

also bump rand_distr to 0.5.0 to match it

* Migrate AVX2 and SSE implementations

* Remove unused thread_rng placeholders

* More random migrations

* Migrate GPU tests

* bump seed

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2025-01-28 16:19:11 +01:00
xzfc
34b039e9b1 Add payload_json! macro (#5881)
* Add payload_json! macro

* Replace usage of `json!({...})` with `payload_json! {...}`

* Drop `impl From<Value> for Payload`
2025-01-28 10:35:02 +01:00
xzfc
054273c44b Pass old_indices to HNSWIndex::new (#5835) 2025-01-27 06:54:13 +00:00
xzfc
bf981e525f Split HNSWIndex::open and HNSWIndex::build (#5853)
* HNSWSearchesTelemetry::new()

* Split HNSWIndex::open and HNSWIndex::build
2025-01-24 00:09:57 +00:00
Jojii
fd4705c29d Measure payload read IO (#5773)
* Measure read io for payload storage

* Add Hardware Counter to update functions

* Fix tests and benches

* Rename (some) *_measured functions back to original
2025-01-16 14:25:55 +01:00
xzfc
694ec10f3d GraphLinks: replace trait with enum (#5651)
* GraphLinks: replace trait with enum

* Vec::with_capacity
2024-12-23 18:59:53 +00:00
Ivan Pleshkov
73259267ae GPU HNSW integration (#5535)
* gpu hnsw

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2024-12-05 00:58:49 +01:00
xzfc
a0ea3caccf Enable some of the pedantic clippy lints (#4715)
* Use workspace lints

* Enable lint: manual_let_else

* Enable lint: enum_glob_use

* Enable lint: filter_map_next

* Enable lint: ref_as_ptr

* Enable lint: ref_option_ref

* Enable lint: manual_is_variant_and

* Enable lint: flat_map_option

* Enable lint: inefficient_to_string

* Enable lint: implicit_clone

* Enable lint: inconsistent_struct_constructor

* Enable lint: unnecessary_wraps

* Enable lint: needless_continue

* Enable lint: unused_self

* Enable lint: from_iter_instead_of_collect

* Enable lint: uninlined_format_args

* Enable lint: doc_link_with_quotes

* Enable lint: needless_raw_string_hashes

* Enable lint: used_underscore_binding

* Enable lint: ptr_as_ptr

* Enable lint: explicit_into_iter_loop

* Enable lint: cast_lossless
2024-07-22 08:19:19 +00:00
xzfc
69b63baa07 Drop JsonPathString (#4621)
* drop some code

* Drop JsonPathString

* Fix test_remove_key

Drop failing tests:
- Deleting array indices is not idempotent, so we don't support it.
- Empty JSONPath is not supported.

* Make json_path::path() non-generic

* Remove references to JsonPathV2

* Drop JsonPathInterface

* Move json_path::v2 code into json_path

* Drop validate_not_empty

* Drop JsonPath::head() as being unused

* Replace path() with JsonPath::new()

* Restore comments

* Move tests to json_path

* Use json() consistently in tests

* Replace many into calls with Into trait

---------

Co-authored-by: timvisee <tim@visee.me>
2024-07-11 04:06:40 +00:00
xzfc
cde39fb8a2 Move build_index out of VectorIndex (#4490)
* Move build_index out of VectorIndex

* Build index in HNSWIndex::open()

* Introduce HnswIndexOpenArgs

* Proper deletion

* Improve tests

* HNSW::open(): add warn, comment and assert

* Revert to making up the config if it does not exist
2024-06-24 14:44:34 +02:00
Andrey Vasnetsov
d4807dcc8b Api consistency update (#4533)
* rename search_params -> params

* rename multivector_config + generate schema

* upd tests
2024-06-23 23:56:42 +02:00
Andrey Vasnetsov
1878713679 Fix multivector for unnamed vectors (#4482)
* minor conversion improvement

* use NamedVectors in update_vectors

* remove merge from VectorStruct

* rename Multi -> Named in vector struct

* add multi-dense vectors option into VectorStruct

* generate openapi

* rename VectorStruct -> VectorStructInternal

* add conversion for anonymous multivec in grpc

* renames for BatchVectorStruct

* implement multi-dense for batch

* allow multi-dense in batch upserts

* test and fixes
2024-06-18 20:38:24 +02:00
Ivan Pleshkov
912e081bff Mmap for quantized multivector offsets (#4354)
* mmap for quantized multivector offsets

* resolve save vector

* fmt

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-05-30 14:56:58 +02:00
Ivan Pleshkov
93ed4ab5c8 Multidense vectors quantization (#4202)
* quantized multivector definition

new multiquantization scorers

encode query

maxsim for quantized vectors

remove obsolete todo

reuse existing scorers

create multivector quantized storage

save load offsets

add test

fix vectors count

tempopery disable test while debugging

fix tests

fix build

less static lifetimes

less static lifetimes

fix build

* fix build after rebase

* add persistence test

* fix codespell

* increase accuracy in tests

* review remarks

* add comment references

* are you happy codespell

* don't use bincode
2024-05-28 12:36:09 +02:00