Commit Graph

1780 Commits

Author SHA1 Message Date
xzfc
318a5546db Clean up QuantizedVectors::raw_internal_scorer (#6740) 2025-06-23 16:42:04 +00:00
Arnaud Gourlay
55dc06587e Fix hardware measurement for retrieve with_vector (#6723) 2025-06-23 13:30:15 +02:00
Ivan Pleshkov
de54049e55 Don't encode quantization query while hnsw build (#6729)
* dont encode quantization query while hnsw build

* add comments

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-06-23 10:34:00 +02:00
xzfc
58edda71e5 Generalize RawScorer construction (#6733)
* Generic raw_scorer_impl and new_scorer_with_metric

* Generic raw_multi_scorer_impl and new_multi_scorer_with_metric

* Remove unused imports
2025-06-21 11:22:27 +02:00
xzfc
f46a8ff5e2 Add hnsw_incremental_build benchmark (#6615) 2025-06-20 14:10:42 +00:00
Tim Visée
3e362c3156 Fix vector storage migration error (#6718)
* Fix not changing storage states, migrate vector storages in full segment

* Destroy old vector storage data after updating segment config

* Disable existing migrations, only use segment level ones

* Remove segment config update warnings

* Correctly bump sparse vector storage type

* Fix clippy warnings without RocksDB feature flag
2025-06-20 15:24:39 +02:00
Andrey Vasnetsov
352e689dd5 check if the quantization config changed in order to evaluate if we can re-use HNSW index (#6726)
* check if the quantization config changed in order to evaluate if we can re-use HNSW index

* Touch up

---------

Co-authored-by: xzfc <xzfcpw@gmail.com>
2025-06-20 10:46:54 +02:00
xzfc
912c1d7928 Insert backlinks during healing (#6650)
* refactor: add GraphLinks::to_edges

* refactor: copy-on-write is no more

* Healing: insert backlinks

* Replace SearchContext with FixedLengthPriorityQueue
2025-06-19 19:04:12 +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
Roman Titov
a87a4e0d79 Track version of mutable files in vector and payload storage (#6652) 2025-06-17 19:00:11 +02:00
Arnaud Gourlay
d7010f5c49 Fix quantized multivector vector_io_read for best_score recommendation (#6696)
* Fix quantized multivector vector_io_read for best_score recommendation

* post-rebase fixes

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-06-17 10:41:34 +02:00
xzfc
6717d38cc4 Replace some generic parameters with associated types (#6711)
* Make EncodedVectors::EncodedQuery associated type

* Make EncodedStorageBuilder::Storage associated type

* Make QueryScorer::TVector associated type

* Remove TVector from RawScorerImpl generic parameters
2025-06-17 07:32:22 +00:00
dependabot[bot]
822822d7aa build(deps): bump sysinfo from 0.33.1 to 0.35.2 (#6698)
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.33.1 to 0.35.2.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/compare/v0.33.1...v0.35.2)

---
updated-dependencies:
- dependency-name: sysinfo
  dependency-version: 0.35.2
  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-06-17 07:25:39 +02:00
Roman Titov
bb150a8023 Implement immutable_files method for segment sub-structures (#6637) 2025-06-16 17:32:36 +02:00
Arnaud Gourlay
1ef6d01480 Fix vector_io_read for best_score recommendation (#6687) 2025-06-16 16:32:15 +02:00
Luis Cossío
3051a4f619 [text index] Faster mutable posting list with roaring bitmap (#6685) 2025-06-16 09:26:23 -04:00
n0x29a
5dfe4b1db3 Add stopwords support (#6635)
* Add stopwords support

* Update codespell configuration and improve stopword assertion message

* Add stopwords schema to OpenAPI definition

* Rename StopwordsOption to StopwordsInterface

* Add stopwords support for multiple languages

* Update codespell configuration to skip all Rust files in stop_words directory

* Normalize stopwords to lowercase during insertion

* Add language aliases for stopwords

* + grpc

* Unspecified Language

* clippy fmt

* openapi

* Refactor to use BTreeSet

* update tokenizer test to include custom stopwords with contractions

* simplified grpc StopwordsInterface

* alias for languages

* use `lowercase` flag for stop word normalizing

* grpc: enum -> string

* consistent naming

* Remove UnspecifiedLanguage and use From for conversions

* fix conversions

* fmt

* use stopwords inside different tokenizer

* use ahash

* fix tests

* fix no-rocks-db feature

* simplify code and fix test

* update test

* fix clippy

* fmt

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-06-16 12:48:21 +02:00
Luis Cossío
bdb499a2c1 remove debug_assertion cfg annotation (#6686) 2025-06-13 15:14:26 -04:00
Luis Cossío
0bec64df21 [phrase matching] Handle phrase filtering (#6654)
* include and handle ParsedQuery::Phrase variant

* phrase congruence test + fixes/edits

* fix rocksdb cfg feature flags

* enable debug assertions in ci profile

* review nits
2025-06-13 13:28:00 -04:00
Jojii
8eb1e6198d Fix broken CI on Dev (RocksDB test) (#6680)
* Attempt to fix CI

* Remove unused imports
2025-06-12 13:13:53 -04:00
Luis Cossío
7e23fa0335 [phrase match] Restructure full_text_index::inverted_index module (#6638)
* move all inverted indexes to one module

Also, remove `old_mmap_postings` and `compressed_postings`

* move congruence test into its own file

* remove old de/serialize_tokenset functions
2025-06-12 09:43:24 -04: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
Tim Visée
4ce0c722f7 Feature flag RocksDB dependency (#6646)
* Flag index selector

* Flag take_database_snapshot

* Flag field index builder

* Flag bool index

* Flag full text index

* Flag geo index

* Flag map index

* Feature flag numeric index

* Flag skip_rocksdb

* Flag payload storage

* Flag segment

* Flag builder

* Flag backup

* Make RocksDB crate optional

* Tweak feature flag gate

* Disable default segment crate features from all dependents

* Handle flag in collection crate correctly

* Flag payload storage types in tests

* Temporarily disable on-disk check for sparse vectors

* Flag sparse vector RocksDB in GPU code

* Fix compilation error since recent merge

* Flag payload storage types in new function

* remove todo

* Explicitly implement default to more clearly state difference

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-06-11 14:29:30 +02:00
Tim Visée
7b16d953dc Buffer when writing into mmap dense vector storage (#6653)
* Buffer when writing into mmap dense vector storage

* Also flush newly written deletes

* Flush and sync data in one go
2025-06-11 12:39:03 +02:00
Luis Cossío
052ce9bb36 [phrase matching] populate point_to_doc structures (#6493)
* populate point_to_doc

* add phrase_matching=true case to tests

* CBOR ordered Vec and BTreeSet have same representation

* review nits
2025-06-10 13:07:25 -04:00
Tim Visée
13b45aeb98 Make load_rocksdb private everywhere (#6668) 2025-06-10 12:13:01 -04:00
Roman Titov
a04d887030 Simpler partial snapshots implementation based on immutable_files (#6599) 2025-06-09 10:55:26 +02:00
xzfc
a3897c2c3a migrate_point_on_level: heal up to level_m (#6624) 2025-06-06 17:33:04 +02:00
Tim Visée
5b92f84238 Migrate away from RocksDB based sparse vector storage (#6607)
* Reformat

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

* Actively migrate away from RocksDB based sparse vector storage

* Add test for simple sparse vector storage migration

* Fix test comments

* Also migrate vector deletes for sparse storage

* Use walkdir to list files
2025-06-06 17:09:14 +02:00
Tim Visée
07a9b98a35 Finalize mutable payload index on Gridstore (#6645)
* Don't implement Gridstore for boolean index, use mutable mmap instead

* Remove RocksDB placeholder in Gridstore index selector
2025-06-06 15:32:47 +02:00
xzfc
80bf1cefdb Introduce HnswM (#6647) 2025-06-06 11:13:07 +00:00
Tim Visée
e47a8753db Add mutable geo payload index on top of Gridstore (#6644)
* Add Gridstore backend for mutable geo payload index

* Add mutable geo payload index builder for Gridstore

* Add tests

* Define type for raw geo point

* Rework geo point loading in Gridstore, load per point ID

* Bump Gridstore options

* Fix panic when storing empty list of geo points in Gridstore

* Review remarks
2025-06-06 12:59:19 +02:00
Tim Visée
b9fa7a5103 Migrate away from RocksDB based multi dense vector storage (#6604)
* Add function to open all multi dense vector storage types

* Move list files function into common crate

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

* Actively migrate away from RocksDB based multi dense vector storage

* Add test for simple multi dense vector storage migration

* Also migrate vector deletes for multi dense storage
2025-06-06 09:16:36 +02:00
Arnaud Gourlay
1fb02a693c Fix vector_io_read for multivector recommendation (#6622)
* Fix vector_io_read for multivector recommendation

* fix

* cleanup

* single disposable

* do not use disposable hardware counter for quantized multivectors
2025-06-05 19:32:57 +02:00
Tim Visée
a328f3dd49 Add mutable full text payload index on top of Gridstore (#6639)
* Implement clear cache for immutable text index

* Add Gridstore backend for mutable full text payload index

* Add mutable full text payload index builder for Gridstore

* Fix compilation error

* Add tests

* Extract mutable inverted index builder to standalone type

* Return generic error in Gridstore iterator

* Remove intermediate buffer from Gridstore load, load index directly

* Minor fixes

* Remove TODO, no good solution

* Fix review remarks
2025-06-05 12:52:58 -04:00
Jojii
64364f37b3 Fix enormous memory usage in Distance Matrix API on high sample size (#6640)
* Fix memory leak in distance API

* Add tests
2025-06-05 17:46:26 +02:00
Tim Visée
4d71f063b9 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-06-05 09:53:58 +02:00
Tim Visée
fe49cd89e3 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-06-05 09:10:56 +02:00
Ivan Pleshkov
d2828d47eb reduce gpu vector storage tests amount (#6621) 2025-06-04 18:30:34 +02:00
Jojii
ebdd6b9dc2 Remove option from immutable_inverted_index (#6636) 2025-06-04 11:52:43 -04:00
Tim Visée
3fc51c69b0 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-06-04 17:40:13 +02:00
Andrey Vasnetsov
bc5b131c87 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-06-04 16:30:55 +02:00
Andrey Vasnetsov
59c034f08e Fix default replication factor (#6632) 2025-06-04 10:04:37 +02:00
Luis Cossío
9692614a6b [phrase match] Mmap full text index for phrase (#6602)
* enumify `.positions` field in immutable and mmap inverted index

* review fixes
2025-06-03 16:16:56 -04:00
Luis Cossío
96ca31a991 [phrase match] Generic mmap postings (#6619)
* generic MmapPostings<V>

impl MmapPostingValue for Positions

* simplify associated types
2025-06-03 15:21:00 -04:00
dependabot[bot]
8992b662fa 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-06-03 12:22:09 +02:00
Luis Cossío
f0525a3b6f [phrase match] ParsedQuery as enum (#6617)
* parsed query now specifies intersection match

* use tokenset in parsed query

* review nits
2025-06-02 14:26:17 -04:00
Luis Cossío
31384f1a5f [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-06-02 13:24:51 -04:00
Tim Visée
845d03b4c8 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-06-02 13:18:02 +02:00
Luis Cossío
d1699c08ac measure hardware in generic posting list (#6583) 2025-05-28 09:27:17 -04:00