Commit Graph

3618 Commits

Author SHA1 Message Date
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
Jojii
d9a83cda4d [MMR] Optimize SymmetricMatrix (#6813)
* Add DiagonalMatrix for mmr

* Add column OOB checking in debug mode

* Fix Clippy; Reduce allocations in scorers loop

* rename to symmetric matrix

* extra test

* Don't call 'resize' in each iteration

* Clippy

* review nits

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2025-07-11 17:44:24 -04: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
Luis Cossío
6307510476 [MMR] expose as query variant in rest and grpc (#6797)
* expose mmr in rest and grpc

* fix referenced vectors in mmr queries

* rename to MmrInput in grpc for consistency

* mmr is now an optional parameter of nearest query

* fix score_threshold at local shard

* fix conversion of rest -> collection

* fix and refactor planned query

* nits

* rename `lambda` to `diversity` in interface

* handle score_threshold within mmr calculation

* add openapi test

* fix candidate limit at collection level

* candidate_limit -> candidates_limit

* finish rename to candidates_limit

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-07-11 10:39:12 -04: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
Ivan Pleshkov
bac28164ed use vector statistics for scalar bq query (#6835)
* use vector statistics for scalar bq query

* fix minor error

* remove test_binary_scalar_internal test

* do NOT use special file for storing vector stats

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-07-11 10:15:28 +02:00
Arnaud Gourlay
4ec0adf941 Bump http 1.3.1 (#6849) 2025-07-11 09:32:41 +02:00
Arnaud Gourlay
b606c1be8c Fix HW vector io for scalar quantization (#6848) 2025-07-11 07:56:20 +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
5a7972daf3 rename snowball params in grpc (#6839) 2025-07-09 15:40:06 -04:00
Luis Cossío
4201486864 rename SnowballParameters to SnowballParams (#6838) 2025-07-09 14:05:48 -04:00
Arnaud Gourlay
d90570fb0e Remove fallback eager allocation (#6829) 2025-07-08 19:40:45 +02: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
Tim Visée
5ba72b96b3 Change retain to extract_if where we depend on retain result (#6802) 2025-07-08 16:39:01 +02:00
Andrey Vasnetsov
9ece0a27f1 rename stemming -> stemmer (#6827)
* rename stemming -> stemmer

* docs
2025-07-08 12:59:09 +02:00
Ivan Pleshkov
a38fd0a1e5 simplify 2bit encoding method (#6824) 2025-07-08 12:19:04 +02:00
Roman Titov
68a653649e Wait until replicas are activated, when creating custom shards (#6817)
Co-authored-by: generall <andrey@vasnetsov.com>
Co-authored-by: timvisee <tim@visee.me>
2025-07-08 12:18:53 +02:00
Kumar Shivendu
8b5b244521 Use peer_id instead of default_peer_id (#6815) 2025-07-08 13:49:12 +05:30
Arnaud Gourlay
c5f1db345f Optimize fast path for finding chunk in positing list (#6811) 2025-07-08 09:59:57 +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
Tim Visée
6fabab4452 Remove is_optimization_failed debug log (#6807) 2025-07-07 10:17:19 +02:00
Kumar Shivendu
d123b4fb84 Introduce new config to set default peer ID (#6783)
* Introduce new config to set default peer ID

* Add unit test to check persistence of default peer ID

* add missing update to main.rs

* fix clippy

* Log if using default peer ID

* Use non default peer id

* Move default_peer_id config to cluster config

* update main.rs

* minor var name refactor

* Add validation for default peer ID range

* Fix validation and ensure we dont generate Peer ID 0 randomly

* fmt
2025-07-04 17:35:37 +05:30
Andrey Vasnetsov
c964beee71 add flag to break optimization loop on panic (#6787)
* WIP: add flag to break optimization loop on panic

* notification on manual budget change only

* move check for disk size before creting a temp segment
2025-07-03 17:54:06 +02:00
Jojii
2a29432983 Fix duplicates in hardware counter metrics (#6803)
* Fix duplicates in hardware counter metrics

* Minor cleanup
2025-07-03 17:04:13 +02: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
Arnaud Gourlay
e950937724 Optimize SearchResultAggregator by hashing only once (#6776) 2025-06-30 13:17:38 +02:00
Kumar Shivendu
c656c06145 Log when aborting resharding (#6771)
* Log when aborting resharding

* Log in the outer function

* fmt

* add log in both functions

* fmt
2025-06-27 22:49:13 +05:30
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
Ivan Pleshkov
5895877577 Fix sq internal vector encoding (#6763)
* Fix SQ internal vector encoding

* add test

* clippy warning
2025-06-26 15:08:50 +02:00
Roman Titov
4705bff773 Improve read request handling during partial-snapshot recovery (#6725)
* Fix read request handling during partial snapshot recovery

* fixup! Fix read request handling during partial snapshot recovery

Just use a second lock 😔

* fixup! Fix read request handling during partial snapshot recovery

Remove accidental `\`

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

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
2025-06-26 10:35:34 +02:00
Andrey Vasnetsov
c11b96301b remove max indexing threads from config (#6760)
* remove max_optimization_threads from config.yaml

* fmt
2025-06-26 10:26:09 +02:00
Jason Mobarak
64f9cd85a4 Enable pod role based auth for s3 snapshots (#6757) 2025-06-26 10:05:39 +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
Andrey Vasnetsov
c29ab98a40 check if we try to deactivate last initializing replica (#6755)
* check if we try to deactivate last initializing replica

* consider more cases

* Update lib/collection/src/shards/replica_set/mod.rs

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

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
2025-06-25 14:04:22 +02:00