Commit Graph

2892 Commits

Author SHA1 Message Date
Tim Visée
705607fe9c Add mutable map payload index on top of Gridstore (#6634)
* Serialize vector of ecow strings using cbor

* Adjust trait bounds for Gridstore support in map index

* Add Gridstore backend to mutable map index

* Add Gridstore builder

* Enable new map index in index selector

* Add tests

* Use different Gridstore block size depending on map data type

* Fix review remarks
2025-07-17 11:36:19 +02:00
Tim Visée
3fc861976d Add mutable numeric payload index on top of Gridstore (#6609)
* Extend Gridstore blob trait, support basic primitives and vector of them

* Implement mutable numeric index on top of Gridstore

* Wrap Gridstore in rwlock, flush asynchronously

* Set custom Gridstore options tuned to numeric index

* Fix compilation errors

* Destruct RocksDB selector everywhere

* Add Gridstore payload index selector, build numeric, fallback others

* Add feature flag to Gridstore mutable payload index

* Don't store empty values in gridstore, it's not supported

* Reformat

* Initialize Gridstore during init of index builder

* Use owned and referenced paths correctly around Gridstore

* Change Gridstore page size in numeric index as suggested

* Make Gridstore block size dependent on size of numeric type

* Add tests

* Add separate fixed size blob trait for vec, prevent footgun

* Improve page size calculation

Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>

* Simplify Blob requirement for numeric payload index

* Add missing test cases

* Replace ref mut with &mut

* Use correct hardware counter

* Implement clear cache for numeric payload index on Gridstore

* The block size is dynamic

* Error if trying to load index from storage that doesn't match backend

* fix counter

* Add comment on why we change page size

---------

Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>
Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2025-07-17 11:36:11 +02:00
Ivan Pleshkov
7c44207ac1 reduce gpu vector storage tests amount (#6621) 2025-07-17 11:35:56 +02:00
Jojii
de030bae5b Remove option from immutable_inverted_index (#6636) 2025-07-17 11:23:42 +02:00
Tim Visée
d9a36cdd0a Migrate away from RocksDB based dense vector storage (#6603)
* Add function to open all appendable dense vector storage types

* Add function to find appendable dense storage files without opening it

* Add function to migrate RocksDB dense vector storage into mmap

* Add feature flag and actively migrate on load

* Log number of migrated points

* Add function to open all simple dense vector storage types

* Add test for simple dense vector storage migration

* Use correct column families

* Use more generic feature flag

* Also migrate vector deletes

* Fix review remarks
2025-07-17 11:23:24 +02:00
Andrey Vasnetsov
52ca4fffc5 Merge pull request #6479
* refactor build_filtered_graph

* utils

* fmt

* implement connectivity estimation

* Improve connectivity check in HNSW index (#6571)

* Use BitVec::fill instead of our custom function
2025-07-17 11:22:33 +02:00
Andrey Vasnetsov
3f6c909057 Fix default replication factor (#6632) 2025-07-17 11:22:12 +02:00
Luis Cossío
68bc532daf [phrase match] Mmap full text index for phrase (#6602)
* enumify `.positions` field in immutable and mmap inverted index

* review fixes
2025-07-17 11:13:44 +02:00
Luis Cossío
77114e2198 [phrase match] Generic mmap postings (#6619)
* generic MmapPostings<V>

impl MmapPostingValue for Positions

* simplify associated types
2025-07-17 11:13:38 +02:00
dependabot[bot]
d68fb35b21 build(deps): bump macro_rules_attribute from 0.2.0 to 0.2.2 (#6631)
Bumps [macro_rules_attribute](https://github.com/danielhenrymantilla/macro_rules_attribute-rs) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/danielhenrymantilla/macro_rules_attribute-rs/releases)
- [Commits](https://github.com/danielhenrymantilla/macro_rules_attribute-rs/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: macro_rules_attribute
  dependency-version: 0.2.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-17 11:13:18 +02:00
dependabot[bot]
dbea70895e build(deps): bump num_cpus from 1.16.0 to 1.17.0 (#6630)
Bumps [num_cpus](https://github.com/seanmonstar/num_cpus) from 1.16.0 to 1.17.0.
- [Release notes](https://github.com/seanmonstar/num_cpus/releases)
- [Changelog](https://github.com/seanmonstar/num_cpus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/num_cpus/compare/v1.16.0...v1.17.0)

---
updated-dependencies:
- dependency-name: num_cpus
  dependency-version: 1.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-17 11:13:12 +02:00
Luis Cossío
30ad86da73 [phrase match] ParsedQuery as enum (#6617)
* parsed query now specifies intersection match

* use tokenset in parsed query

* review nits
2025-07-17 11:12:42 +02:00
Luis Cossío
e1f470ac7e [phrase match] Introduce ordered document (#6486)
* rename `Document`->`TokenSet`

* add point_to_doc to mutable text index

introduce point_to_doc

add TODO for using the new field

handle removals

* remove ser/de from `TokenSet`

* clippy

* review fixes
2025-07-17 11:12:29 +02:00
Luis Cossío
d198ba84d8 [phrase match] Generics improvements in PostingList<V> (#6597)
* make generic posting list lighter when there is no var_size_data needed

* simplify PostingList generics

* fix test

* self review
2025-07-17 11:12:23 +02:00
Tim Visée
08194f9b66 Improve Gridstore wipe/clear functionality (#6614)
* Gridstore config can be Copy

* Add test asserting wipe behavior

* Add clear function to Gridstore

* Make wipe take ownership, use new clear function everywhere

* Add comment to emphasize wipe behavior

* Propagate errors
2025-07-17 11:08:54 +02:00
n0x29a
fe62cc02be InferenceUsage in grpc (#6601)
* InferenceUsage in grpc

* Update documentation for InferenceUsage

* Update lib/api/src/grpc/ops.rs

Co-authored-by: Tim Visée <tim+github@visee.me>

* clearer inference usage tracking

* remove unused inference token from delete_points

* review

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
Co-authored-by: generall <andrey@vasnetsov.com>
2025-07-17 11:08:18 +02:00
Luis Cossío
1d0d6fc429 measure hardware in generic posting list (#6583) 2025-07-17 11:08:05 +02:00
Luis Cossío
3942071b9f Full text index with generic posting list (#6565)
* integrate generic posting list in full-text index

* improve intersection fn

improve iterator intersection

* make old module just for test

* recover old implementation of MmapPostings for tests

* add compatibility test

* fix compression

* clippy

* nits

* check if first id is already greater

protects against the case where the iterator's current element hasn't
been extracted yet

* update current element when there is no greater or equal

* reuse visitor in test

* optimize alignment

* bound checks and refactor is_in_range

* review

* edit comment

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-07-17 11:07:57 +02:00
n0x29a
273f53f1b7 Add inference usage tracking to REST API (#6563)
* Add inference usage tracking to REST API

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2025-07-17 11:04:50 +02:00
Tim Visée
d09682886a Actively migrate away from RocksDB based ID tracker (#6579)
* Actively migrate RocksDB ID tracker to new format on segment load

* Extract ID tracker migration logic to function

* Feature flag ID tracker migration

* Simplify ID tracker migration by moving it deeper into load function

* Move migrate function to the bottom

* Add test to assert RocksDB to mutable ID tracker migration

* Assert new mutable ID tracker is empty

* Review remarks

* On RocksDB to mutable ID tracker migration failure, clean up files

* Demote empty mutable ID tracker to debug assertion

* Copy all point versions, including deleted, set known mappings

* read links and versions separatelly

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-07-17 11:04:38 +02:00
Andrey Vasnetsov
9054a872ac use id-tracker to estimate internal points range (#6593) 2025-07-17 11:02:39 +02:00
Arnaud Gourlay
7384240fb1 Fix flaky test_hw_counter_for_plain_sparse_search (#6586) 2025-07-17 11:01:54 +02:00
Andrey Vasnetsov
530430fac2 Bump version to v1.14.1 (#6584)
* bump v1.14.1

* Update missed cherry picks

---------

Co-authored-by: timvisee <tim@visee.me>
2025-05-23 12:02:04 +02:00
xzfc
8e4fc674d4 Invert feature_flags.hnsw_healing (#6589) 2025-05-23 11:40:19 +02:00
Tim Visée
cf3d8b99a6 Enable payload_index_skip_rocksdb flag by default (#6587) 2025-05-23 10:18:28 +02:00
Luis Cossío
ba45d9a699 Generalize compressed posting list (#6528)
* use chunks_exact in compressed sparse posting list builder

* generalized impls

make both impls similar

new design

make impls similar

generalize impls

* separate into files in new crate

* additional builder fns

new fn for builder

* retrieve current iterator position

* simplify traits

* restructure

* add iterator

* clippy

add contains fn

* fix find_chunk

* move builders to builder

* revamp generics and traits

* add model test vs var-sized posting list

* fmt

* clippy

* improve traits and generics

* fix get_by_offset

* generalize tests

* improve test

* restructure view into a new file

* to and from components

* value handler takes closure to prevent perf penalty

* clippy

* remove unused deps

* revert changes in sparse index

* self review nits

* reword

* clippy

* edit comment

* lock CHUNK_LEN, but assert it is synced with BitPacker4x

* remove Sized constraint in iterator

* rename VarSized* to Unsized*

And add more from_components helpers

* avoid intermediate allocation when writing UnsizedValue

* checked u32 conversions

* fix test

* clippy

* Add debug assertion, assert that point ID is in range

* Bound check in get_by_offset

* improve tests to check against various lengths and offsets

* clippy 😤

---------

Co-authored-by: timvisee <tim@visee.me>
2025-05-22 23:28:00 +02:00
Andrey Vasnetsov
ab3bf7bb24 register payload index fields on recovering snapshot (#6582) 2025-05-22 23:27:34 +02:00
Roman Titov
2aafd0174d Add partial snapshot create requests count and recovery timestamp to telemetry (#6545)
Co-authored-by: generall <andrey@vasnetsov.com>
2025-05-22 23:27:14 +02:00
Roman Titov
86d7c02528 Add partial snapshot recovery and search locks (#6497)
Co-authored-by: generall <andrey@vasnetsov.com>
2025-05-22 23:27:01 +02:00
Arnaud Gourlay
dd97253fe9 Strict mode allows fullscan for multitenant payload index (#6498)
* Strict mode allows fullscan for multitenant payload index

* different error for missing payload index in multitenant case

* handle payload_m

* add simple test

* handle hnsw.m not set

* add another simple test

* fix test

* fallback to global HSNW config

* new error status code

* do not block on global HNSW and improver error reporting

* clearer error reporting

* review fixes

* fix test error messages

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-05-22 23:26:16 +02:00
Andrey Vasnetsov
1cce749daf do not lock payload schema for too long (#6574)
* do not lock payload schema for too long

* fix tests
2025-05-22 23:25:38 +02:00
Tim Visée
dd1ed15c37 Add RocksDB feature flag to ID trackers (#6572)
* Move point ID conversions

* Extract segment ID tracker creation into function

* Feature flag RocksDB based ID tracker
2025-05-22 23:25:31 +02:00
Tim Visée
a8ead042d7 Add RocksDB feature flag to vector storage (#6566)
* Add no-rocksdb feature flag, disable dense vector storage using RocksDB

* Disable multi dense vector storage using RocksDB

* Feature flag now unused function arguments

* Invert no-rocksdb, use rocksdb and enable by default

* RocksDB is required in some benches

* Feature flag RocksDB based sparse vector storage

* Propagate rocksdb feature flag to root crate

* Feature flag stored point, only used in context of RocksDB

* Mention what disabling RocksDB feature does in Cargo.toml
2025-05-22 23:25:15 +02:00
Tim Visée
7c23251bea Add volatile sparse vector storage (#6569)
* Add volatile sparse vector storage

* Add and use volatile sparse vector test

* Update OpenAPI spec

* Resolve review remarks
2025-05-22 23:25:05 +02:00
Tim Visée
8fe9b2d071 Add volatile multi dense vector storage (#6564)
* Add volatile multi dense vector storage

* Add and use volatile multi dense vector storage test
2025-05-22 23:24:40 +02:00
Tim Visée
6010fff4de Add volatile dense vector storage, use in tests (#6561)
* Add volatile dense vector storage

* Use volatile dense vector storage in tests

* Fix compilation error in GPU module

* Simplify constructor

* Use volatile storage in more tests
2025-05-22 23:24:34 +02:00
Arnaud Gourlay
252667e25c Update Criterion 0.6 (#6570) 2025-05-22 23:24:27 +02:00
Arnaud Gourlay
58d82243f5 Fix compilation of bench (#6562) 2025-05-22 23:24:21 +02:00
Arnaud Gourlay
bbc4beb9ec Fix UnindexedField infra to handle lookup&range index requirements (#6496)
* Fix UnindexedField infra to handle lookup&range index requirements

* more generic approach

* better test

* restore

* small unit test for sanity

* review nits

* Do not recommend parametrized index

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2025-05-22 23:24:10 +02:00
Andrey Vasnetsov
7872c182f1 Strict mode error is now 400 instead of 403 (#6560)
* strcit mode error is now 400 instead of 403

* fix test
2025-05-22 23:22:16 +02:00
Andrey Vasnetsov
3501e4b7fe Add setting to limit max number of collections (#6548)
* add setting to limit max number of colelctions

* upd openapi

* Add max_collections to config

---------

Co-authored-by: timvisee <tim@visee.me>
2025-05-22 23:21:00 +02:00
Arnaud Gourlay
3a6a7a125c Always run cancellation handle for interrupted optimizations (#6549)
* Always run cancelletatiob handle for interrupted optimizations

* Stick to one way of checking cancelation

* Move segment optimization in sub function, cancel in single place (#6557)

* Move segment optimization into separate function, cancel in single place

* Don't use owned lock

* Unify cancellation check

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
2025-05-22 23:20:03 +02:00
Tim Visée
b4bf23ae51 Bump MSRV to 1.87 (#6558)
* Bump MSRV to 1.87

* Resolve TODOs
2025-05-22 23:19:48 +02:00
dependabot[bot]
f862d68e06 build(deps): bump io-uring from 0.7.6 to 0.7.7 (#6552)
Bumps [io-uring](https://github.com/tokio-rs/io-uring) from 0.7.6 to 0.7.7.
- [Commits](https://github.com/tokio-rs/io-uring/commits)

---
updated-dependencies:
- dependency-name: io-uring
  dependency-version: 0.7.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-22 23:19:16 +02:00
dependabot[bot]
cd82ecd01a build(deps): bump object_store from 0.12.0 to 0.12.1 (#6553)
Bumps [object_store](https://github.com/apache/arrow-rs-object-store) from 0.12.0 to 0.12.1.
- [Changelog](https://github.com/apache/arrow-rs-object-store/blob/main/CHANGELOG-old.md)
- [Commits](https://github.com/apache/arrow-rs-object-store/compare/v0.12.0...v0.12.1)

---
updated-dependencies:
- dependency-name: object_store
  dependency-version: 0.12.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-22 23:19:04 +02:00
xzfc
08b343e0ab HNSW healing (#6543)
* Let SearchContext::new create empty context

* FixedLengthPriorityQueue: add `is_full()`

* Implement HNSW healing

* Apply review suggestions

* review comments and docstrcigs

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-05-22 23:18:32 +02:00
Tim Visée
c9fe4345cf Add full text payload index congruence test (#6546)
* Add congruence test for full text payload index

* Report what index variants we're testing

* Use string references

* deterministic keywords

* linting

* Use truncate instead of drain

* Don't check cardinality on deletion, indices behave differently

* Include index type in iterator

* Fix test compilation

---------

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2025-05-22 23:18:27 +02:00
xzfc
d70a8d8157 Remove some generics from scorer (#6544)
* Make TInputQuery constructor parameter, not struct parameter

* VectorElementType could be implicit
2025-05-22 23:18:15 +02:00
Arnaud Gourlay
56f170f1f1 Fix unecessary unsafe in Clippy 1.87 (#6540)
* Fix unecessary unsafe in Clippy 1.87

* bump Rust version for intrinsics safe API

* ignore until we can bump the MSRV with cargo-chef

* remove unecessary change

* mark clearly as TODO
2025-05-22 23:17:51 +02:00
Arnaud Gourlay
9b99408529 Always overwrite existing payload on upsert (#6533)
* Always overwrite existing payload on upsert

* Add REST tests
2025-05-22 23:17:18 +02:00