Commit Graph

1780 Commits

Author SHA1 Message Date
Luis Cossío
03bbceaabb fix flaky welford calculation test (#6927)
* use most significant digits for comparison

* use absolute or relative tolerance
2025-07-25 08:47:45 -04:00
Andrey Vasnetsov
2f44084d7e Fix PointId Hash (#6932)
* fmt

* clippy
2025-07-24 08:31:29 +02:00
Andrey Vasnetsov
6fdf445570 UUID index bug (#6916)
* reproduce bug as unit test

* reproduce in even faster unit test

* fix alignment in mmap_hashmap

* clippy

* review fixes
2025-07-22 20:26:35 +02:00
xzfc
a959e8a671 MADV_POPULATE_READ on sequential mmaps (#6923) 2025-07-22 14:05:07 +02:00
dependabot[bot]
bd750eaf88 build(deps): bump roaring from 0.11.0 to 0.11.1 (#6921) 2025-07-22 06:46:43 +00:00
Tim Visée
6f4069e711 Preprocess query vectors, sort sparse vectors (#6895)
* Add test to assert behavior of unsorted sparse query

* Preprocess sparse vectors

* Fix typo
2025-07-17 16:11:44 +02:00
Jojii
16688a6a1b Replace Box with Either (#6887) 2025-07-17 11:04:43 +02:00
Tim Visée
5ddda7e409 Don't delete payload index RocksDB if we still use RocksDB storage type (#6888) 2025-07-17 10:14:18 +02:00
Andrey Vasnetsov
168674973a lowercase stemmer language for consistency (#6889) 2025-07-17 09:53:34 +02:00
Tim Visée
cd1a31448d Fix broken is_empty filter on new points (#6882)
* Add test to catch bug

Bug: <https://github.com/qdrant/qdrant/issues/6880>

* Fix loading null index from wrong path

* Simplify test

* Also bump total point count when removing a point

* Add debug assertion, ensure we don't create null index in selector

* Update bug link

* Remove unused import

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-07-16 14:25:09 +02:00
Tim Visée
edb460a5a6 After payload index migration, delete RocksDB files (#6873)
* After payload index migration, delete RocksDB files

* Add comment on why it is safe to not clean up RocksDB files in some cases

* Update lib/segment/src/index/struct_payload_index.rs

Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>

* Reformat

---------

Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>
2025-07-15 16:33:53 +02:00
Arnaud Gourlay
f95190c82e Do not track HW measurement when matching over a text index (#6833) 2025-07-15 11:30:48 +02:00
Arnaud Gourlay
a7ee4ceb51 Fix hardware counter vector_io for segment vector retrieval (#6863) 2025-07-15 11:30:22 +02:00
Tim Visée
70d231011b Fix payload index migration config and edge case handling (#6864)
* Minor comment and log tweaks

* Persist payload index config when changed based on dirty flag

* Persist new index type when indices are rebuilt, they might have changed

* Still load RocksDB if some index still depends on it

* Fix typo
2025-07-15 09:45:29 +02:00
dependabot[bot]
9d4b0929ad build(deps): bump sysinfo from 0.35.2 to 0.36.0 (#6869)
---
updated-dependencies:
- dependency-name: sysinfo
  dependency-version: 0.36.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-15 09:08:12 +02:00
Tim Visée
09bdbaf58d In mmap payload indices, replace boxing with Either (#6861) 2025-07-14 15:48:34 +02:00
Tim Visée
cd045b2e7d Naive migration of payload indices from RocksDB to Gridstore (#6810)
* Add function to detect if storage is using RocksDB

* Add feature flag to toggle payload index migration

* Add naive payload index migration, rebuild from scratch if RocksDB

* Adjust payload index rebuild logs

* When rebuilding payload indices, clean up existing storages

* Update OpenAPI spec

* Use weak references to Gridstore in mutable payload index flushers

* Rework payload index clear/wipe functions, make them consistent

* Naively migrate RocksDB before loading indices

* Fix mmap payload index load, staged like others (#6837)

* Add staged loading of mmap numeric payload index

* Add staged loading of mmap map payload index

* Add staged loading of mmap geo payload index

* Add staged loading of mmap full text payload index

* Add staged loading of mmap bool and null payload index

* Minor tweaks

* Don't fail clearing file cache if file does not exist

---------

Co-authored-by: jojii <jojii@gmx.net>
2025-07-14 13:26:18 +02:00
Arnaud Gourlay
b9454e4121 Optimize more ahash for u32 (#6851) 2025-07-11 16:38:14 -04:00
Luis Cossío
f50058aef4 some mmap indices are not mutable (#6856) 2025-07-11 17:47:33 +02:00
Jojii
58c70d2846 Store index type in payload index config (#6812)
* Store payload index type in config

* Fix CI

* Use new function

* Review remarks

* Fix Ci

* Update lib/segment/src/index/struct_payload_index.rs

* Add is_appendable function to storage type

* Fix storage: store index type in payload index config (#6852)

* Restructure payload index config for backwards compatibility

See: <https://github.com/qdrant/qdrant/pull/6812#issuecomment-3057928785>

* Use mapping of combined schema and type, use storage type for serde

* Replace common functions with defer

* Minor adjustments

* Don't deserialize skip_rocksdb field in payload config if not set

* Rename all payload index types to snake_case format when serializing

* Fix clippy warnings when building without RocksDB

* Change type of FullPayloadIndexType from enum to struct

* Remove both from mutability, assume mutable there

* Also rename the payload index type to snake case

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Tim Visée <tim+github@visee.me>
2025-07-11 16:12:25 +02:00
Andrey Vasnetsov
bb9c28d9ba fix cardinality estimation for has id (#6854)
* fix segment-specific cardinality estimation

* fmt
2025-07-11 13:52:43 +02:00
Andrey Vasnetsov
ee9b88c876 Adjust default values for better performance (#6844)
* adjsut default values for better performance

* upd openapi
2025-07-10 16:50:36 +02:00
Andrey Vasnetsov
f47e499825 fix check for pure primary condition filter (#6840)
* fix check for pure primary condition filter

* avoid cloning has_id for primary condition

* fix test

* add test

---------

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2025-07-10 11:40:11 +02:00
Luis Cossío
4201486864 rename SnowballParameters to SnowballParams (#6838) 2025-07-09 14:05:48 -04:00
Tim Visée
a1bd4d9130 Enable Gridstore in mutable payload indices, don't eagerly create storage (#6805)
* Enable Gridstore payload index storage, rename storage types

* Respect payload_index_skip_mutable_rocksdb feature flag

* Minor cleanup

* Fix map payload index Gridstore semantics, only create files if desired

The semantics of backing storages in payload indices are inconsistent.
This aligns the Gridstore backing storage to our RocksDB backing
storage, matching the create/open/load behavior. Now, it will only
create Gridstore files on disk if we request it to do so.

This commit only implements it on the map index. In following comments
the same will be implemented in all other payload indices too.

* Apply same Gridstore semantics to other payload index types

* Rename create parameter to create_if_missing

* Fix bench compilation errors
2025-07-08 18:22:58 +02:00
Luis Cossío
137d71ada8 [MMR] resolve at collection level (#6786)
* add mmr as a ScoringQuery

* add mmr to CollectionQueryRequest

* handle mmr after collecting from shards

* use unwrap_or_else

* include mmr as a vector query

* ordering for MMR is None

* fix score threshold

* fmt + todo comment

* remove unused function

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-07-07 17:18:44 -04:00
Luis Cossío
10de8cc595 [MMR] MMR internals (#6768)
* mmr at local shard

* cleaner impl

* handle timeout

* protect against small input

* fmt

* fix compilation

* add sparse vector raw scorer for volatile storage

* mmr tests

* clippy

* thx coderabbit

* mmr needs a query vector

* fix mmr computation

* don't measure vector_io_read in sparse scorer

* use indexset, and explain why use query score

* coderabbit + small input

* oopsie

* don't remove vectors from points
2025-07-07 16:51:26 -04:00
Arnaud Gourlay
a5bce06971 Optimize has_id with ahash (#6804)
* Optimize has_id with ahash

* apply same pattern to CustomIdChecker
2025-07-03 16:39:17 +02:00
dependabot[bot]
9e036ea699 build(deps): bump charabia from 0.9.3 to 0.9.6 (#6780)
* build(deps): bump charabia from 0.9.3 to 0.9.6

Bumps [charabia](https://github.com/meilisearch/charabia) from 0.9.3 to 0.9.6.
- [Release notes](https://github.com/meilisearch/charabia/releases)
- [Commits](https://github.com/meilisearch/charabia/compare/v0.9.3...v0.9.6)

---
updated-dependencies:
- dependency-name: charabia
  dependency-version: 0.9.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* cargo update jieba-rs

* fix chinese tokenizer tests

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2025-07-03 14:52:48 +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
Ivan Pleshkov
b414a402bb Merge pull request #6728
* # This is a combination of 7 commits.

* SameAsStorage default value

* fix coderabbit warnings

* neon for u8 bq

* sse for u8 bq

* fix windows build

* rename function

* add comments

* fmt

* fix arm build

* review remarks
2025-07-03 14:09:12 +02:00
Andrey Vasnetsov
3bd7ba423b Optimize detect when primary condition is sufficient review (#6794)
* Optimize payload filtering to avoid redundant matching

* No boxing

* review suggestions

---------

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2025-07-03 13:00:46 +02:00
Andrey Vasnetsov
485eeed76c use sequential reads for building quantized vectors (#6796)
* use sequential reads for building quantized vectors

* populate vector storages before indexing

* consistent naming

* Update lib/segment/src/fixtures/index_fixtures.rs

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
2025-07-03 12:15:57 +02:00
xzfc
c98017d6c4 GraphLayersHealer: use quantized vectors (#6795) 2025-07-02 23:06:44 +00:00
xzfc
038850a8ae Compare versions, not vectors (#6779) 2025-07-02 21:08:28 +00:00
Roman Titov
3ff0a34821 Create custom shards in Initializing state instead of Active (#6778) 2025-07-02 17:53:42 +02:00
Jojii
b00a9081ba Implement stemming (#6770)
* Implement stemming

* minor fix

* Add openapi specs

* Fix import

* Fix Test, rename API type

* update openapi

* fix rest models

* Review remarks

* Minor code cleanup

* make grpc naming aligned with Rest + use master branch for dependencies

* grpc docs

* use tagged version

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-07-02 15:29:27 +02:00
Luis Cossío
7c911abae0 [text index] don't optimize when loading a mmap-backed immutable index (#6785)
* don't optimize when loading a mmap-backed immutable index

* clear cache after laoding text index from mmap

* Revert "clear cache after laoding text index from mmap"

This reverts commit 110199e8eb.

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-07-01 22:14:37 +02:00
Tim Visée
488f13a93a Actively migrate payload storage from RocksDB to Gridstore (#6734)
* Migrate RocksDB based payload storage into Gridstore

* Add migrate_rocksdb_payload_storage feature flag

* Minor tweaks

* Use iter to migrate all payloads

* Fix clippy warning

* Update OpenAPI spec

* Track if mmap payload storage is populated, set memory/disk storage type

* Add test

* Log amount of bytes we migrate instead of point count

* Remove TODO

* Render storage size migrated in human human readable format, not bytes

* On migration failure, drop full payload storage directory

* Fix missing import
2025-06-30 16:22:38 +02:00
Jojii
bfc5706450 Implement new multilingual tokenizer (#6762)
* Implement new multilingual tokenizer

* Remove unnecessary clones

* Codespell

* filter stopwords before stemmer

* Fix Chinese stopwords (#6765)

* Fix Chinese stopwords

* remove todo

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2025-06-26 15:49:32 +02:00
Jojii
2e0cfeb1fa Add Japanese stopwords (#6683)
* Add Japanese stopwords

* Adjust list to be more close to source & update openapi
2025-06-25 15:06:46 +02:00
Tim Visée
393dd6f5cf Add in-memory payload storage on Gridstore (#6722)
* Add in-ram-mmap payload storage type

* When RocksDB is not compiled, select in-ram mmap payload storage

* Enable payload storage on-disk check again in config mismatch optimizer

* Add feature flag to build in-ram-mmap payload storage

* Tweak is_on_disk condition

* Bump version estimates in runtime feature flags
2025-06-25 14:37:45 +02:00
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
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
Arnaud Gourlay
9195483cce Fix hardware measurement for quantized multivector (#6724) 2025-06-24 13:11:06 +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