* 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
* 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>
* 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
* 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
* 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
* 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>
* 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>
* 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>
* 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
* 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>
* 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
* take max_point_offset into consideration
* add null index even if index selector is for rocksdb
* fmt
* better cardinality estimation, check deleted inside filtered iter
* fix count indexed points, add primary conditions to estimator
* use len for count_indexed_points, adjust test
* remove deleted check from filtered iter
* cleaner removal
* Make gridstore Advise::Random and add function for sequential read
* Reduce duplicate code in gridstore
* use sequential implementation in iterator
* actually use the sequential read
---------
Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
* Add storage enum to geo index
* Construct immutable geo index from mmap geo index
* Load immutable geo index from mmap storage if on-disk is false
* When immutable geo index is loaded into memory, clear mmap cache
* Adjust immutable geo index from mmap loading, consider point deletions
* Rename get_db_wrapper to db_wrapper
* Add immutable mmap geo index test, currently still failing
* Properly load geo index
* Add congruence test
* Also test with deletions
* Fix clipping warnings
* Add storage enum to full text index
* Add compressed mmap posting list iterator
* Don't check second condition and return early if possible
* Use helper function for creating empty iterator
* Construct immutable inverted index from mmap inverted index
* Construct immutable text index from mmap text index
* Load immutable text index from mmap storage if on-disk is false
* Match implementation for mutable to immutable inverted index, drop empty
* Point tokens should be none if empty
* Fix chunk reader iterator not buffering remaining postings correctly
* Add immutable mmap full text index to congruence test
* Debug assert deleted points have no tokens
* Add another test
* Fix point deletion regression in immutable full text index
* Use consistent function naming
* Restructure full text index opening and loading, make it consistent
* When immutable full text index is loaded into memory, clear mmap cache
* Remove init from immutable text index
* Prevent potential panic
* avoid panic
* Fix custom iterator size reporting, add test for it
---------
Co-authored-by: generall <andrey@vasnetsov.com>
* Refactor out LinksContainer
This commit extracts Vec<PointOffsetType> and heuristic related
functions from graph_layers_builder.rs into a new file.
No significant changes in logic are made.
* Optimize LinksContainer
* Add illustration
* Fixups
* Add more comments and rename `score` to `cached_score`
* Add RAM wrapper to mmap numeric index
* Add RAM wrapper to mmap map index
* Fix test compilation
* Merge RAM wrappers into existing immutable indices
Do this to minimize code duplication since the majority of the code is
exactly the same.
* Minor tweaks
* Remove unnecessary pub visibility, remove unused assertion
* Test immutable numeric index on mmap
* In numeric index test, remove some points
* Add map index test
* Restructure index opening and loading, make it consistent
* don't pre-collect intermediate mapping
* review nits
* Make init unreachable for immutable and mmap, clear must consume index
---------
Co-authored-by: Luis Cossío <luis.cossio@outlook.com>