Commit Graph

3618 Commits

Author SHA1 Message Date
xzfc
706571d8b4 Configurable HNSW healing threshold (#6756) 2025-06-25 10:22:18 +00:00
Jojii
4959debadf Add new multilingual tokenizer (#6678)
* Add new tokenizer for multilingual

* Make codespell happy

* improve handling of when to apply stemming

* Fix stemming implementation

* Fix Japanese language detection. Add tests for MultilingualV2

* Update lib/segment/src/index/field_index/full_text_index/tokenizers/japanese.rs

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

* Update lib/segment/src/index/field_index/full_text_index/tokenizers/japanese.rs

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

* Update lib/segment/src/index/field_index/full_text_index/tokenizers/multilingual.rs

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

* Make init() private

* move model into segment, filter non-alphanumeric tokens

* fmt

* exclude punctuation from tokenizer result

* fm

---------

Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>
Co-authored-by: generall <andrey@vasnetsov.com>
2025-06-25 11:39:46 +02:00
Kumar Shivendu
37919f5b10 Partial snapshot is recovering telemetry (#6677)
* Tweak partial snaposhot `recover` and `recover_from` response...

...to return `status: already_in_progress` instead of error

* Tweak partial snapshot integration tests

* Add new telemetry field is_recovering for partial snapshots

* Update OpenAPI spec

---------

Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>
2025-06-25 13:50:41 +05:30
Luis Cossío
6919e3ae5b [phrase matching] expose phrase condition (#6670)
* add `"match": { "phrase": ... }` condition

* gen grpc and openapi

* [phrase matching] expose `phrase_matching` flag in rest and grpc (#6620)

* expose setting in rest and grpc

* phrase matching openapi test

* regen openapi

* [phrase matching] Text index fixes (#6730)

* allow rocksdb-based immutable text index

* fix repeated-token phrases

* fmt

* Update OpenAPI spec

---------

Co-authored-by: timvisee <tim@visee.me>

* add repeated word case in openapi test

* [phrase match | strict mode] Allow phrase condition when enabled in index (#6749)

* allow phrase filter when index is present

* prettier error message

* clippppppy

---------

Co-authored-by: timvisee <tim@visee.me>
2025-06-24 16:56:36 -04:00
Tim Visée
42de66d5e6 Fix debug panic in issues API, specify integer index param defaults (#6753)
* Fix incorrect defaults for integer index params in issues API

* Specify default for integer index params in comment

* Update OpenAPI and gRPC spec
2025-06-24 17:23:32 +02:00
Tim Visée
5e1728dadd Add validation for legacy collection names (#6752)
* Add function for validating legacy collection names

* Apply legacy collection name validation everywhere

* Add more validation to gRPC endpoints

* Adjust tests
2025-06-24 20:02:40 +05:30
Arnaud Gourlay
9195483cce Fix hardware measurement for quantized multivector (#6724) 2025-06-24 13:11:06 +02:00
Luis Cossío
dd63603e98 use seq mmap in iter (#6750)
Also refactor to use const generics
2025-06-24 12:56:30 +02:00
Andrey Vasnetsov
3d76eec660 use indexed vectors instead of available points for IDF computation (#6739) 2025-06-24 12:50:31 +02:00
dependabot[bot]
5431482cb9 build(deps): bump io-uring from 0.7.7 to 0.7.8 (#6741)
Bumps [io-uring](https://github.com/tokio-rs/io-uring) from 0.7.7 to 0.7.8.
- [Commits](https://github.com/tokio-rs/io-uring/commits)

---
updated-dependencies:
- dependency-name: io-uring
  dependency-version: 0.7.8
  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-24 11:22:13 +02:00
dependabot[bot]
867b30e9f5 build(deps): bump roaring from 0.10.12 to 0.11.0 (#6744) 2025-06-23 21:53:52 +00:00
dependabot[bot]
aadb0bd7e6 build(deps): bump lz4_flex from 0.11.4 to 0.11.5 (#6746) 2025-06-23 21:52:09 +00:00
Luis Cossío
be6e425a75 [gridstore] update a selection instead of a range of regions (#6713)
* update a selection instead of a range of regions

* extend instead of loop

* use div_ceil to calculate region_id range
2025-06-23 15:23:54 -04:00
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
dependabot[bot]
3a6c2ec412 build(deps): bump lz4_flex from 0.11.3 to 0.11.4 (#6702) 2025-06-17 01:47:15 +00:00
dependabot[bot]
aea004a475 build(deps): bump object_store from 0.12.1 to 0.12.2 (#6701) 2025-06-17 01:45:41 +00:00
Andrey Vasnetsov
8792f51d0c check filesystem on start (#6682)
* check filesystem on start and do some simple mmap test to make sure it is persisted

* fmt

* fix fs type read on non-linux

* feature-flag for fs-check supported platforms + fs check with sub-folder

* fmt

* try larger magic file

* minor fixes

* fix compile on windows

* Add FAT, exFAT and APFS file systems

* Update lib/common/memory/src/checkfs.rs

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

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Tim Visée <tim+github@visee.me>
2025-06-16 18:12:59 +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
17040ecaa1 flush before dropping in ignored test (#6688) 2025-06-16 16:00:16 +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
Roman Titov
d0f8a552bd Tweak partial snapshot recover and recover_from response (#6610) 2025-06-12 13:34:04 +02:00
Tim Visée
0530ee5964 In the collection crate, propagate the RocksDB feature flag (#6674) 2025-06-11 16:03:36 +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
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
Tim Visée
fd4dba96f2 Expose runtime feature flags in telemetry (#6667)
* Expose runtime feature flags in telemetry

* Update OpenAPI spec
2025-06-11 11:36:01 +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
dependabot[bot]
85e260e31b build(deps): bump flate2 from 1.1.1 to 1.1.2 (#6659) 2025-06-09 21:06:25 +00: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