Commit Graph
100 Commits
Author SHA1 Message Date
Jojii 940cdab357 Move deferred iter into PointMappings. (#10156) 2026-09-03 12:36:33 +02:00
Jojii f494cb6cde Batched deletion checks in full-scan/exact search (10-35% faster Turbo4) (#10042)
* Batched bitmap checks in full-scan/exact search

Instead of walking the deleted bitmap bit by bit and re-checking every
point, the new peek_top_visible reads all bitmaps one u64 at a time and
handles 64 points in one step.

About 1.5x QPS on unfiltered full scans.

* Remove debug statement

* Extract parallel bitmap scaning into separate helper

* Optimizing `BatchedBitmapScan`

* Also apply to HNSW full-scan fallback
2026-09-03 12:36:32 +02:00
Jojii adc789240a [Payload bytes] decode raw payload directly (#10032)
* Deserialize raw payload directly to Payload during conversion

* Treat empty payloads equally

* Fix edge
2026-08-04 11:18:44 +02:00
Jojii 3c979b88f7 Payload bytes gRPC (#9949)
* Prepare GRPC for raw payload bytes

* Make RawPayload a separate protobuf message
2026-08-04 11:18:44 +02:00
Jojii 98c1ed0fae Make folder structure consistent (#9990) 2026-08-04 11:18:43 +02:00
Jojii b2194f2109 Remove wrong debug assertion (#9945) 2026-08-04 11:18:42 +02:00
Jojii 4efc5ead9f Rename WrongVectorBytesSize -> MalformedVectorBlob (#9929) 2026-08-04 11:18:42 +02:00
Jojii f7ab9103c5 [TQDT] upsert raw malformed blob multi + sparse vectors (#9904)
* Fix malformed vector upsertion for multivecs and sparse-vecs too

* Shorten comment

* Fix after rebase
2026-08-04 11:18:42 +02:00
Jojii 6f67c47603 Less generics in retrieve raw (#9874) 2026-08-04 11:18:40 +02:00
Jojii 41f386c270 Add openapi tests for TQDT (#9884) 2026-08-04 11:17:04 +02:00
Jojii 214d82c71c IO uring for TQDT (#9852) 2026-08-04 11:17:03 +02:00
Jojii 651b737484 [TQDT] Roundtrip fix for clone_and_mutate_point (#9761)
* Fix TQDT roundtrip issue for `clone_and_mutate_point`

* Use TinyMap

* Fix doc string

* Rebase docstring fixes

* [TQDT] Reduce allocations (#9833)

* Reduce allocations

* Fix edge
2026-08-04 11:17:03 +02:00
Jojii 5cc4485d5d [TQDT] fix lossy roundtrip in apply_points_with_conditional_move (#9734)
* TQDT fix lossy roundtrip in apply_points_with_conditional_move

* Reduce allocations + Fix debug_assert

* Refactor _raw methods to reduce allocations

* Rename refactored function

* Drop omitted named vectors in the CoW upsert path.

* Revert refactor of *_raw functions

* Avoid allocations

* Review remarks
2026-08-04 11:17:00 +02:00
Jojii 23a751f2e9 Rename ambiguous build_multivec_segment test fixture (#9713) 2026-08-04 11:16:59 +02:00
Jojii 9ecf1a7c43 Batch io_uring reads in retrieve_raw (#9724) 2026-08-04 11:16:59 +02:00
Jojii 27b5b6f369 [TQDT] TurboMultiVectorStorage (#9414)
* TurboQuant Datatype for Multivectors

* Fix update_from and add non-appendable open()

* Fix unnecessary allocations + wrap chunk boundaries

* Congruence tests TurboVectorStorage <-> TurboMultiVectorStorage(vecs=1)

* Only use appendable backend for turbo4-multivectors

* Simplify update_from

* Never place multivectors across chunk boundaries (skip tail, reject oversized)

* Review remarks
2026-08-04 11:16:51 +02:00
Jojii cb7e1e3ea9 Fix inverted delete_vector return in appendable mmap storages (#9410) 2026-08-04 11:16:50 +02:00
Jojii ce36f38ed0 [TQDT] Integration into VectorStorageEnum (#9399)
* Integrate TurboVectorStorage into VectorStorageEnum

# Conflicts:
#	lib/segment/src/segment_constructor/batched_reader.rs
#	lib/segment/src/vector_storage/vector_storage_base.rs

* Review remarks

* Allow Turbo4 datatype as inlined HNSW vector
2026-08-04 11:16:50 +02:00
Jojii 9ecc186a08 [TQDT] TurboVectorStorage Implementation (#9331)
* Partial function impls for TurboVectorStorage

* create/load functionality + tests

# Conflicts:
#	lib/segment/src/vector_storage/turbo/mod.rs
#	lib/segment/src/vector_storage/turbo/turbo_encoded_vectors.rs

* Fix vectors are not rotated back

* update_from impl

* Rebase fixes

* Proper update_from for ChunkedMmap + better tests

* Improve test coverage

* Move update_from to new DenseTQVectorStorage trait

* Review remark quantization::DistanceType

* Add populate and clear_cache to TurboVectorStorage and TurboEncodedVectorStorage
2026-08-04 11:16:49 +02:00
Jojii a1d0c47f11 Fix CI (caused by indirectly related merge-conflicts) (#9360) 2026-08-04 11:16:48 +02:00
Jojii d8f5bc1e02 [TQDT] Basic structure for TurboVectorStorage (#9326)
* Basic structure for TurboVectorStorage

* use UIO BitvecFlags
2026-08-04 11:16:48 +02:00
Jojii 0b7e45658a is_on_disk fix for Quantized Chunked Mmap Storage (#9328)
* is_on_disk fix for quantized_chunked_mmap_storage

* Don't needlessly pin the storage type
2026-08-04 11:16:48 +02:00
Jojii 0fb69c33cd Revert "[TQDT] Asymmetric query support in scorer (#9177)" (#9293)
This reverts commit 98270150c8.
2026-08-04 11:16:47 +02:00
Jojii cde6e82b1e Attempt to fix flaky test_hw_metrics_cancellation test (#9233)
* Fix flaky test_hw_metrics_cancellation test

* Speedup test duration
2026-06-03 14:55:06 +02:00
Jojii e58be0c380 [TQDT] API (#9172)
* [ai] TQDT in the API

* [ai] unify new sparse error for TQDT

* Rename to `turbo4`

* Add `Turbo4` to comments and doc strings.

* Also validate named sparse vector creation
2026-06-03 14:53:11 +02:00
Jojii d97ec9e3a2 [TQDT] Static Rotations (#9106)
* static rotations

* Review remarks
2026-06-03 14:53:10 +02:00
Jojii 703cde58a0 Refactor TurboQuantizer (#9095)
* Refactor TurboQuant into common/

# Conflicts:
#	lib/common/turboquant/src/math.rs
#	lib/quantization/src/encoded_vectors_tq.rs
#	lib/quantization/tests/integration/test_tq.rs

* [ai] fix docs

* [ai] tighten function visibilities

* Review remark

* include turboquant in amalgamate

* Rebase

* Move common/turboqunat back (but keep the refactor)

* Move vector_stats.rs back
2026-06-03 14:51:12 +02:00
Jojii e1e7d0474e fix: Make HNSW discover test deterministic (#9203) 2026-06-03 14:49:46 +02:00
Jojii 1acb4d8166 Determinism for TQ Bits2 HNSW tests (#9036) 2026-05-22 10:40:01 +02:00
Jojii 5f5e802395 Fix flaky oversampling assertion in HNSW quantization tests (#9029) 2026-05-22 10:38:59 +02:00
Jojii 603c62eb0d API Adjustments for TQ (#8914)
* API Adjustments for TQ

* Clippy
2026-05-08 13:48:27 +02:00
Jojii 2d075b4998 TQ Hadamard SIMD (#8883)
* [ai+manual] hadamard SIMD

* [ai] Neon

* Minor refactor

* fix import
2026-05-08 13:48:24 +02:00
Jojii 12c1e7fee0 [ai] Test gpu falls back to half-precision float for Turboquant (#8844) 2026-05-08 13:47:44 +02:00
Jojii 4bf6f4d183 [ai] OpenApi tests for TurboQuant (#8845) 2026-05-08 13:47:44 +02:00
Jojii 8c5fa453b4 [ai + manual] Add renorm (#8837) 2026-05-08 13:47:44 +02:00
Jojii 12acb7da5c [ai] Implement lazy evaluation of TqVectorExtras (#8823) 2026-05-08 13:47:43 +02:00
Jojii 1baf2f6769 TurboQuant E2E segment-level HNSW tests (#8799)
* [ai + manual] HNSW Quantization tests for TQ + better error calculation

* Compare TQ 1/1.5 bits to binary quantization
2026-05-08 13:47:42 +02:00
Jojii 8d3e388912 [ai] e2e tests in quantization/tests (#8788) 2026-05-08 13:47:30 +02:00
JojiiandIvan Pleshkov 361b195f2a TQ Scoring (#8753)
* [AI + Manual] Cosine scoring

* [ai + manual] Add support for dot product

* [ai] re-implement tests including covering both distances (dot+cosine)

* Clarify Cosine/Dot equivalence behavior for pre-TQ quantization storages

* review remarks

---------

Co-authored-by: Ivan Pleshkov <pleshkov.ivan@gmail.com>
2026-05-08 13:47:20 +02:00
Jojii f48e0cfeee TurboQuant basic Quantization + Encoding (#8692)
* [AI + Manual] TurboQuant quantization

* Code spell

* [Ai + Manual] Integrate TurboQuantizer

* [Ai + Manual] Review tests

* Add Todos for unimplemented parts

* Fix bench

* [manual + ai] Add TqVectorExtras for additional metadata in quantized vectors

* Direct get_centroids implementation
2026-05-08 13:47:17 +02:00
Jojii 3489788a22 Fix grpc stop words (#8728)
* Fix stopwords always being lowered in grpc path only

* [ai] add integration test, stopwords grpc vs rest
2026-05-08 13:46:49 +02:00
Jojii a4af14f737 TurboQuant Lloyd Max Codebook (#8672)
* [AI] Add lloyd_max calculation test and constants

* [AI] use closed-form formula

* Review remarks
2026-05-08 13:46:44 +02:00
65e401d4b4 API Changes for TurboQuant (#8686)
* [ai + manual] API changes for TQ

* CI

* Add TurboQuant types to Python type stubs

Made-with: Cursor

* Revert "Add TurboQuant types to Python type stubs"

This reverts commit 6543af3244.

---------

Co-authored-by: Cursor Agent <agent@cursor.com>
Co-authored-by: generall <andrey@vasnetsov.com>
2026-05-08 13:46:44 +02:00
Jojii 522f0ed592 TurboQuant hadamard Rotation (#8657)
* [ai + manual] Implement Hadamard rotation

# Conflicts:
#	lib/quantization/src/turboquant/mod.rs

* [ai + manual] Defer normalization and reduce iterations

* Test improvements + Clippy

* [AI] Don't use fixed-size chunks

* [AI + Manual] Extract permutations and add more tests

* Add normalization + Remove signs2

* Remove signs2 too and improve chunk size function

* [ai] Improve code

* [ai] use reversible LCG for O(1) memory shuffle

* Bench fixes + Remove constant in seed

* [ai] Review Remarks

* [ai] Review remarks

* [ai + manual] In-Place rotations
2026-05-08 13:46:44 +02:00
Jojii 14ef2b256a Don't insert deferred points into sparse index (#8435)
* Don't insert deferred points into sparse index

# Conflicts:
#	lib/segment/src/segment/tests.rs
#	lib/segment/src/segment_constructor/segment_constructor_base.rs

# Conflicts:
#	lib/segment/src/segment_constructor/segment_constructor_base.rs

* Clippy

* Assert consistency of deferred_internal_id var

* Return before SparseVector conversion in case of deferred point

* Use debug_assert instead
2026-03-26 18:48:47 +01:00
Jojii 804f738c6a Fix deferred point count across multiple shards (#8496)
* Fix deferred point count across multiple shards

* Count def-points correctly if first shard has no def-points
2026-03-26 18:43:46 +01:00
Jojii b59e7addad Deferred point count in metrics (#8415) 2026-03-26 18:33:46 +01:00
Jojii 39028a9031 Add deferred point count to UpdateQueueInfo (#8414)
* Add deferred point count to UpdateQueueInfo

* Hide if prevent_unoptimized is false

* Clippy

* Openapi

* Iterate over appendable segments only

* Only calculate deferred point count if prevent_unoptimized is true

* Rebase fixes

* Codespell
2026-03-26 18:24:55 +01:00
JojiiandAndrey Vasnetsov 7b196be231 Correct calculation of deferred point counts (#8366)
* Don't account for deferred points in some places

# Conflicts:
#	lib/collection/src/shards/local_shard/scroll.rs

* Add in QueryContext

* Cover more places

* Coderabbit review remarks

* Properly count amount of deleted deferred points (#8386)

* Properly count amount of deleted deferred points

* Prevent double-counting of the same point

* Remove hints to estimations

* Properly handle counts in ProxySegment

* Add tests and fix deleted point count issue

* Adjusts tests + fix issues

* Separte fields for deferred points in telemetry (SegmentInfo)

* Remove deferred_points_count()

* openapi

* Fix test by manually calculating visible points

* Adjust ProxySegment test to revertion of SegmentInfo

* Throw error if collection was not found in telemetry (e2e Test)

* Update lib/segment/src/segment/segment_ops.rs

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>

* Make new fields in API optional

* Don't take range if no deferred point exist

* Review remarks

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2026-03-26 18:24:36 +01:00
Jojii a1525d0ee6 Use dedup() instead of unique() (#8376)
* Use dedup() instead of unique()

* Assert iterator to be ordered
2026-03-26 17:57:35 +01:00
Jojii 24aeed6bbe Filter deferred points: facets (#8313)
* Filter deferred: facets

* Add test (facet)

* Review remark

* Review remarks

* Fix unique_values returning values even if occurring only in deferred
points

* Clippy

* Rename Filter=>Exclude
2026-03-26 17:51:43 +01:00
987db54135 Disable deferred point filtering in resharding (#8310)
* Add ignore_deferred flag for internal scroll API

* Ignore deferred points in ProxyShard::update

* Use enum instead of bool as type in function parameters

* Use consistent parameter name

* fmt

* Apply suggestions from code review

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

* More explicit naming

* Add DeferredBehavior to `count()` and disable filtering in stream_records

* Don't filter `retrieve()` everywhere

* Use consistent filter behavior in read operations

* Add TODO for ignored parameter in remote_shard

* Rebase fixes

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Tim Visée <tim+github@visee.me>
2026-03-26 17:51:34 +01:00
Jojii c7db5df05b Filter deferred points: retrieve (#8315)
* Filter deferred points: Retrieve

* Add tests
2026-03-26 17:50:17 +01:00
Jojii b7c69dbcba Filter deferred points sparse search (#8299)
* Implement filtering deferred: Sparse search

* Add tests for deferred sparse vectors

* Clippy

* Review remark
2026-03-26 17:49:52 +01:00
JojiiandIvan Pleshkov a8f5b19128 Filter deferred points in read operations Part 1 (Search, Scroll, Count) (#8283)
* Implement filtering: Search

* Add tests for search and read_filtered

* Implement filtering: read_ordered_filtered + Tests

* Codespell + Clippy

* Reduce code duplication in tests

* Use helper methods of Id tracker

* Implement filtering: Random Scroll

* fixes after rebase

* [Unittest] Only set deferred ID if deferred points exist

* [Unit test] Reduce combinations in segment creation test

---------

Co-authored-by: Ivan Pleshkov <pleshkov.ivan@gmail.com>
2026-03-26 17:49:46 +01:00
Jojiiandtimvisee dfe8d8a797 Use spawn_blocking for segment locking (#8069)
* Use spawn_blocking for segment locking

* Wrap blocking task in AbortOnDropHandle

* Use single blocking thread for fetching all segment size information

---------

Co-authored-by: timvisee <tim@visee.me>
2026-02-10 00:05:58 +01:00
Jojiiandgenerall 65d6b7d016 Don't lock SegmentHolder for the entire duration of read operations (#8056)
* Don't lock SegmentHolder during read operations

* Add comment clarifying eager segment allocation

* review fixes

* Remove TODO

* Shorter locking of segment holder in calculate_local_shard_stats

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2026-02-10 00:03:52 +01:00
Jojii 985885d0b1 Fix test consistency in random memory id tracker (#8043) 2026-02-09 23:56:02 +01:00
Jojii f6c3010a97 Metrics incoming and outgoing shard transfers (#7701)
* Metrics incoming and outgoing shard transfers

* clippy

* Revert counting separately
2025-12-18 17:27:19 +01:00
Jojii 4426dd97b3 Metrics cluster working state and last update (#7670)
* cluster working state and last update in metrics

* Rename metric

* Remove error string

* Use timestamp instead

* Fix prometheus help text

* Change metric type to counter
2025-12-18 17:26:37 +01:00
Jojii 625d796bcf Avoid panics on empty metric families (#7479) 2025-12-03 10:23:55 +01:00
Jojii 3a19714f49 Make indexed-only-excluded-points metric default to 0 (#7649)
* Make indexed_only_excluded in metrics default to 0

* Fix tests
2025-12-03 10:23:55 +01:00
Jojiiandtimvisee 0f191bfcf6 Metrics for snapshots (#7497)
* Add atomic counter for running snapshots

* Refactor collection telemetry + export prometheus metric

* Handle collection in ToC + current recovery measurements

* Fix openapi tests

* Fix tests

* Add snapshot metrics for streaming and partial snapshots.

* Fix typo in metrics name

* Adjust metrics names

---------

Co-authored-by: timvisee <tim@visee.me>
2025-11-14 12:31:06 +01:00
Jojii 8ec08c4cd8 Fix panic on empty collections (#7478) 2025-11-14 12:31:03 +01:00
Jojii ed8e9dce76 Add global metrics prefix (#7438)
* Qdrant prefix for metrics

* Update metrics tests

* Update openapi docs

* Make prefix configurable

* don't enable metrics prefix by default

* Adjust tests and openapi specs

* Custom validation for metrics_prefix setting
2025-11-14 12:30:22 +01:00
Jojiiandtimvisee f220845f84 Procfs metrics (#7451)
* Procfs metrics

* Clippy

* Fix compiling on non linux targets

* Move procfs up

---------

Co-authored-by: timvisee <tim@visee.me>
2025-11-14 12:30:16 +01:00
Jojii df2b1c6232 Metrics vectors by name per collection (#7441)
* Add vector count per vector-name to metrics API

* Add to metrics API

* Improve TinyMap::get_or_insert_default and add tests

* Minor improvements

* Update openapi

* Review remarks

* Remove `collection_vectors` since it can be calculated manually
2025-11-14 12:30:15 +01:00
JojiiandTim Visée cc4bff1615 Dead shards in /metrics (#7310)
* Dead shards in /metrics

* Update src/common/metrics.rs

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

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
2025-11-14 12:30:15 +01:00
Jojiiandtimvisee 40acac3c37 Add unindexed vectors to telemetry and metrics API (#7307)
* New metric for excluded vectors in indexed_only requests

* Make metric name align with prometheus naming convention

* Fix nit

* Fix tests

* Fix openapi

* Rename index_only into indexed_only

---------

Co-authored-by: timvisee <tim@visee.me>
2025-11-14 12:30:15 +01:00
Jojii debb913da5 Add num points/vectors to metrics API (#7302) 2025-11-14 12:30:15 +01:00
Jojiiandtimvisee 69d3198248 Add replica metrics (#7301)
* Add replica metrics

* Clippy

* Properly ignore shards with resharding status

* Include 0 as value in metrics

* Remove total_active_replicas and total_expected_replicas

* Improve minimum active replica count in case of resharding

* Reorder metrics calls min < max (to trigger CI)

* Fix metrics help

* Fix typo

---------

Co-authored-by: timvisee <tim@visee.me>
2025-11-14 12:30:15 +01:00
Jojii 30fc847643 Add avx512vl and avx512vpopcntdq in telemetry (#7471) 2025-11-14 12:30:14 +01:00
Jojii 3fd07eb082 Currently running optimizers in Metrics (#7316)
* Currently running optimizer count in metrics

* Clearly state the prerequisites of count_optimizers_running()

* Minor improvements

* improve metric naming
2025-11-14 12:29:36 +01:00
Jojiiandtimvisee b737601a19 Bump segment version on {delete,update,upsert}-by-filter requests (#7157)
* Bump segment versions on *-by-filter operations to acknowledge WAL

* Assert exactly one segment with the new operation version

* Review remarks

* Separate segment version number to not affect partial snapshots

* Adjust unit test

* Remove old bump_segment_version implementations

* Clarify max_persisted_segment_version_overwrite in flush_all

* Move trait implementations - Clippy

* Apply segment bumping to all *-by-filter functions

* Remove AtomicOptionU64

* Update function name and comments

* Remove max condition, start with overwrite value

* Add assertion, can never have zero segments

* Make max_persisted_segment_version_overwrite monotonic with fetch_max

---------

Co-authored-by: timvisee <tim@visee.me>
2025-09-29 11:28:28 +02:00
Jojiiandtimvisee 81c6ab2911 Mirgate from old shard key format on load (#7110)
* Migrate shard-key format

* Reduce visibility of was_old_format attribute

* Add debug message when we migrate persisted shard key format

---------

Co-authored-by: timvisee <tim@visee.me>
2025-08-26 13:18:36 +02:00
Jojii 6ae07f0fd8 Always load InferenceService (#7050)
* Always load InferenceService

* Add BM25 openapi test

* Add warning to development.yaml config (#7051)
2025-08-14 14:30:26 +02:00
Jojii e8907324cb Improve h-sum in dot_avx calculation (#7002)
* Reduce amount of h-sum calculations in dot_avx

* Improve HSUM calculation and apply 4way-hsum to other places
2025-08-14 14:30:25 +02:00
26a496b40e BM25 in the Core (#6891)
* Uncouple tokenizer and TextIndexParams

* Refactor token processing in `TokenizerConfig` (#6912)

* Refactor token processing in TokenizerConfig

* fix max length checking

* [Bm25] Execution implementation (#6939)

* Add Bm25

* Execute BM25 if config available

* cargo format

* Add mocked tests for inference and bm25

* Properly apply InferenceType

* Fix tests

* Review remarks

* Review remarks

* Add overwritten model name fix again

* use enum instead of multiple constants

* ensure handling all fields of InferenceInput in infer_local

---------

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

* review fixes

* fmt

* spell-check

* deduplicate code

---------

Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>
Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2025-08-11 13:16:15 +02:00
Jojii 9ab1fcabc8 Fix config path & Webui Assets in Debian package (#6958)
* Fix debian config location & WebUI assets

* remove config overwrite env variable again
2025-08-11 13:15:52 +02:00
Jojii 3297d36f5f Minor inference code improvements (#6890) 2025-07-24 08:44:44 +02:00
Jojii e3738b38f6 Replace Box with Either (#6887) 2025-07-17 14:33:15 +02:00
JojiiandLuis Cossío b59c188795 [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-17 13:57:12 +02:00
154fb27377 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-17 13:56:33 +02:00
Jojii 09cc3c7722 Fix duplicates in hardware counter metrics (#6803)
* Fix duplicates in hardware counter metrics

* Minor cleanup
2025-07-17 13:46:49 +02:00
Jojiiandgenerall 8fa3dd4478 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-17 13:38:36 +02:00
JojiiandAndrey Vasnetsov a44801b14d 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-07-17 13:34:44 +02:00
Jojii 3feecb5970 Add Japanese stopwords (#6683)
* Add Japanese stopwords

* Adjust list to be more close to source & update openapi
2025-07-17 13:27:40 +02:00
edc299b0cb 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-07-17 13:25:31 +02:00
Jojii 07dae94119 Fix broken CI on Dev (RocksDB test) (#6680)
* Attempt to fix CI

* Remove unused imports
2025-07-17 13:07:39 +02:00
Jojii b5fe0e76fb Fix enormous memory usage in Distance Matrix API on high sample size (#6640)
* Fix memory leak in distance API

* Add tests
2025-07-17 11:36:52 +02:00
Jojii de030bae5b Remove option from immutable_inverted_index (#6636) 2025-07-17 11:23:42 +02:00
0d2c1ce254 Make gridstore Advise::Random and add function for sequential read (#6510)
* 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>
2025-05-22 23:12:43 +02:00
Jojii 41f59d683c HardwareCounterCell::disposable() Performance Improvement (#6511)
* Improve performance of HardwareCounterCell::disposable() by 72x

* Fix ci
2025-05-22 23:03:54 +02:00
Jojii 121b2d543e Fix some wrong vector-read IO measurements (#6365)
* Fix some wrong vector_storage io measurements

* Review remarks
2025-04-21 00:02:45 +02:00
Jojii 4585c3571c Fix measuring in memory inverted index (#6316)
* Fix measuring in memory inverted index

* Reduce overhead of get_token_id

* Remove not used function
2025-04-20 23:51:43 +02:00
Jojii 231d579f70 Don't measure in memory geo, map and numeric indices (#6311) 2025-04-20 23:51:37 +02:00
JojiiandTim Visée dcd5674ebb Writeback counter cell (#6190)
* Add WritebackCounterCell

* Replace custom counting with WritebackCounterCell

* Update lib/common/common/src/counter/counter_cell.rs

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

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
2025-04-20 23:51:26 +02:00
Jojii 07fbe5465b Don't measure in-memory hw for full text indices (#6309)
* Don't measure in-memory full text index

* Clippy

* Fix mmap_postings conditioned counting
2025-04-20 23:51:17 +02:00
Jojii 5117e24758 Only measure HW if on disk for bool index (#6296)
* Only measure HW if on disk for bool index

* Remove missed measurement
2025-04-20 23:51:08 +02:00
Jojii a276ffec1e Add ConditionedCounter (#6295) 2025-04-20 23:49:49 +02:00