Commit Graph

1642 Commits

Author SHA1 Message Date
Andrey Vasnetsov
037c27200f use mutex to ensure sequential segment flushed + await on drop (#7416) 2025-10-17 13:49:55 +02:00
eltu
aa0f49798e Full-Text Index ASCII Folding (Normalization) (#7408)
* Add ASCII folding to tokenization process

Introduced an optional ASCII folding feature within the `TokensProcessor` to normalize non-ASCII characters to their ASCII equivalents. Updated tests and documentation to reflect the changes.

* Refactor tokenization code for improved readability and maintainability

Reorganized and reformatted the tokenization module, including `TokensProcessor` initialization and ASCII folding mappings for better clarity. Updated tests to align with the changes.

* Update test cases to reflect optional tokenizer settings changes

Adjusted `ascii_folding`, `lowercase`, and `phrase_matching` settings in tests to `None` where applicable, aligning with updates in tokenizer configuration defaults.

* address review remarks

* fix codespell

* thx coderabbit

* Don't copy tokens that are already ASCII

* Shrink folded string to fit

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
Co-authored-by: timvisee <tim@visee.me>
2025-10-16 13:53:01 +02:00
xzfc
e640a78316 Refactor: merge _search_on_level into search_on_level (#7403)
* Call search_on_level instead of _search_on_level

* Inline _search_on_level into search_on_level

* Inline _search_on_level_with_vectors into search_on_level_with_vectors
2025-10-16 09:30:45 +00:00
Luis Cossío
163222930d Feedback query scorer (#7359)
* no manual impl for Serialize and Hash

* new feedback query

* construct query scorer

* simplify formula

* better comment

* make it easier to add other feedback formulas

* rename query -> target

* rename in async raw scorer

* rename formula -> strategy

* better comments

* rename to Simple strategy

* clippyyyyy

* oops, reenable conditional compilation

* Fundamental refactor to precompute pair score

* rename FeedbackScorer -> FeedbackQuery

This type implements `Query` trait, not `Scorer`.`
2025-10-15 10:31:18 -03:00
Andrey Vasnetsov
8b2d73ac19 address parallel flushing problem in snapshot creation (#7404)
* address parallel flushing problem in snapshot creation

* explicit flush in test
2025-10-14 18:28:25 +02:00
Andrey Vasnetsov
b8590a9a24 single thread flush (#7388)
* flush all segments in one thread sequentially

* bonus: move flush-related functions into dedicated file

* Minor comment tweaks

* await for flush on segment holder level

* fmt

* Minor improvement, preallocate vector for payload index flushers

* Remove invalid comment

---------

Co-authored-by: timvisee <tim@visee.me>
2025-10-14 16:39:28 +02:00
Andrey Vasnetsov
02de826748 fix segment repair on load (#7400)
* fix segment repair on load

* workaround for rocksdb

* Minor comment tweaks

* In in memory ID tracker, unset version first before dropping mapping

* rename cleanup_versions into fix inconsistencies

---------

Co-authored-by: timvisee <tim@visee.me>
2025-10-14 14:06:50 +02:00
xzfc
10ebd1851d Use fs_err::exists and fs_err::tokio::try_exists (#7401) 2025-10-14 09:16:55 +00:00
dependabot[bot]
03c1b607ad build(deps): bump jsonwebtoken from 9.3.1 to 10.0.0 (#7397)
* build(deps): bump jsonwebtoken from 9.3.1 to 10.0.0

Bumps [jsonwebtoken](https://github.com/Keats/jsonwebtoken) from 9.3.1 to 10.0.0.
- [Changelog](https://github.com/Keats/jsonwebtoken/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Keats/jsonwebtoken/compare/v9.3.1...v10.0.0)

---
updated-dependencies:
- dependency-name: jsonwebtoken
  dependency-version: 10.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

* Bump jsonwebtoken to 10.0, use rust_crypto backend

* Fix deprecation warning

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: timvisee <tim@visee.me>
2025-10-14 10:49:50 +02:00
xzfc
95b4bbf978 Rename HnswConfig::{copy_vectors -> inline_storage} (#7389) 2025-10-13 10:08:06 +00:00
Arnaud Gourlay
a24d380ee0 Investigate flaky snapshot transfer test (#7339) 2025-10-09 10:47:23 +02:00
Andrey Vasnetsov
8dd915c0b1 non appendable proxies (#7345)
* WIP: make proxy segment non-appendable

* make deleted points and index changes private to Proxy Segment

* consistently remove empty unused segment from holder on unproxifying and the end of optimization

* remove/fix obsolete test

* Fix comment, some general adjustments

* Also don't remove non-original segments

* Use ahash for map of proxy index changes

* Inline format arguments

* Simplify has point branching

* Assert that proxy flushes to latest wrapped segment version

* make vector deletetion a CoW operation

* relax debug assertions

* Update lib/shard/src/proxy_segment/mod.rs

* fix test_partial_snapshot_empty

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Tim Visée <tim+github@visee.me>
2025-10-08 00:19:41 +02:00
Roman Titov
1004b93ae5 Python bindings for Qdrant on Edge (#7312)
* Qdrant Edge Python binding 🐍⛓️💥

* fixup! Qdrant Edge Python binding 🐍⛓️💥

Fix example + cleanup

* review: move QueryEnum + mark search as deprecated

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-10-03 12:48:26 +02:00
Arnaud Gourlay
159c7ffdb3 Force flush when taking a snapshot to capture on-going batches (#7342) 2025-10-02 13:33:15 +02:00
xzfc
23a0a0e8b8 DiffConfig: replace serde-based impl with explicit impl (#7294)
* refactor: replace serde-based DiffConfig implementation with macro

* refactor: macroexpand impl_diff_config

* refactor: drop `merge` dependency as unused
2025-09-29 18:55:50 +00:00
Roman Titov
895318913a Qdrant on Edge prototype (#7170) 2025-09-29 15:01:44 +02:00
xzfc
a0d62330c7 Use fs-err (#7319) 2025-09-29 12:47:10 +00:00
dependabot[bot]
ae0e4e4305 build(deps): bump anyhow from 1.0.99 to 1.0.100 (#7287)
* build(deps): bump anyhow from 1.0.99 to 1.0.100

Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.99 to 1.0.100.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.99...1.0.100)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-version: 1.0.100
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* Inline formatting argument

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: timvisee <tim@visee.me>
2025-09-23 10:30:52 +02:00
Andrey Vasnetsov
e86d60e6b0 slow requests log (#7188)
* wip: generalization trait for queries

* implement generalization for point operations

* fmt

* log priority queue

* wip: SlowRequestsListener

* fmt

* fix clippy

* simplify generalization

* fmt

* implement collection of requests profiles for update API

* implement API for viewing slow requests log

* add collection name to update worker

* add datetime to log

* fmt

* probabilistic counter of unique requests

* rename

* compute hash before converting into json value

* move logable out of generalizable

* fmt

* log query request

* fmt

* some fixes

* move measurement into local shard

* fmt

* upd openapi (not important)

* For enum variants, has discriminant

* Make SearchParams Copy

* Hash 0.0 and -0.0 the same

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

* Correctly hash enum variants and float values

* Hash through ordered float instead

* Fix priority queue not keeping longest request for hash

* SearchParams implements Copy

* Fix clippy warning

* Add unordered_hash_unique

* skip serialization if none

* Use OrderedFloat for hashing a float

* Use OrderedFloat for hashing a float

* only log updates if they are performed

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Tim Visée <tim+github@visee.me>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: xzfc <xzfcpw@gmail.com>
2025-09-19 19:59:25 +02:00
xzfc
22df6bc30a Integrate hnsw_with_vectors (#7232)
* StorageGraphLinksVectors::try_new, make GraphLinksVectorsLayout non-fallible

* Integrate hnsw_with_vectors

* remove unused function

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-09-18 17:36:48 +00:00
Arnaud Gourlay
e79100a2f2 Fix phrase match to not match with unknown tokens (#7252)
* Fix phrase match to not match with unknown tokens

* add tests

* spelling
2025-09-16 11:16:17 +02:00
Andrey Vasnetsov
dbe71d44a8 Fix missing flush, flush before sync (#7263)
* add missed flush buffer

* For all BufWriters, wrap owned type and explicitly flush

---------

Co-authored-by: timvisee <tim@visee.me>
2025-09-16 10:34:12 +02:00
dependabot[bot]
eae65547b7 build(deps): bump serde-untagged from 0.1.8 to 0.1.9 (#7257)
Bumps [serde-untagged](https://github.com/dtolnay/serde-untagged) from 0.1.8 to 0.1.9.
- [Release notes](https://github.com/dtolnay/serde-untagged/releases)
- [Commits](https://github.com/dtolnay/serde-untagged/compare/0.1.8...0.1.9)

---
updated-dependencies:
- dependency-name: serde-untagged
  dependency-version: 0.1.9
  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-09-16 09:28:29 +02:00
Arnaud Gourlay
360d7bc26d Clippy 1.90 (#7253)
* Fix Clippy 1.90

* fmt
2025-09-15 20:12:11 +02:00
Arnaud Gourlay
bc13f01680 [strict-mode] Add max number of payload index count (#7222)
* [strict-mode] Add max number of payload index count

* improve docs and validation for StrictModeConfig

* fix from coderabbit

* test blocking access to payload indexes

* polish test
2025-09-15 13:12:40 +02:00
Tim Visée
b29e59a871 Better immutable ID tracker load errors (#7240)
* Construct proper error when reading immutable ID tracker mapping fails

* Use new error builder for other use case too

* Even better error messages
2025-09-10 17:50:35 +02:00
Jojii
1e1d683391 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-05 14:29:14 +02:00
Arnaud Gourlay
dd30fce77f Fix missing REST API Filter validations (#7218) 2025-09-05 13:53:18 +02:00
Arnaud Gourlay
3420311fd7 Fix missing API validation for MinShould (#7217) 2025-09-05 13:16:09 +02:00
Andrey Vasnetsov
852c58e689 make sure that grpc::Vector can always use new format (#7185)
* make sure that grpc::Vector can always use new format

* specify target version for ToDo

* Update lib/api/src/conversions/vectors.rs

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2025-09-05 13:13:06 +02:00
xzfc
3baa7d9d7d HNSW: use new graph format during search (#7195)
* point_scorer: generic `Filters` -> non-generic `ScorerFilters`

point_scorer: rename FilteredQuantizedScorer -> FilteredBytesScorer

* Use ScorerFilters when appropriate

* {CustomQueryScorer,MetricQueryScorer}: SupportsBytes = True

* Add GraphLayersWithVectors::search_with_vectors

* Use GraphLayersWithVectors::search_with_vectors in HNSWIndex::search_with_graph

* Move `BoxCow` and `SimpleCow` to a common module

* Review remarks
2025-09-04 11:48:26 +00:00
xzfc
193306f2d7 Fixup remaining PeerId anonymization (#7207) 2025-09-04 09:54:39 +02:00
Ivan Pleshkov
33837423e9 Enable BQ in appendable segments (#7145)
* Create and load for an appendable quantization

remove feature flag

more todo

review remarks

review remarks

* fix after rebase

* Enable BQ in appendable segments

* remove const placeholder

* fix after rebase

* fix after rebase

* fix config mismatch optimizer

* fix sq infinity loop

* add comment
2025-09-03 13:56:32 +02:00
xzfc
1e4a39a5a0 CompressedWithVectors: include base/full vectors (#7171)
* Add VectorStorageEnum::{get_vector_bytes_opt, get_vector_layout}

* Update CompressedWithVectors format to include base vectors

* StorageGraphLinksVectors

* Clarify code
2025-09-03 07:28:28 +00:00
dependabot[bot]
db9b29aed9 build(deps): bump procfs from 0.17.0 to 0.18.0 (#7200)
Bumps [procfs](https://github.com/eminence/procfs) from 0.17.0 to 0.18.0.
- [Release notes](https://github.com/eminence/procfs/releases)
- [Commits](https://github.com/eminence/procfs/compare/v0.17.0...v0.18.0)

---
updated-dependencies:
- dependency-name: procfs
  dependency-version: 0.18.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-09-02 13:20:16 +02:00
dependabot[bot]
d313d3c73c build(deps): bump geo from 0.30.0 to 0.31.0 (#7199)
Bumps [geo](https://github.com/georust/geo) from 0.30.0 to 0.31.0.
- [Changelog](https://github.com/georust/geo/blob/main/CHANGES.md)
- [Commits](https://github.com/georust/geo/compare/geo-0.30.0...geo-0.31.0)

---
updated-dependencies:
- dependency-name: geo
  dependency-version: 0.31.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-09-02 12:13:43 +02:00
Ivan Pleshkov
2d1b92c16b Create and load for an appendable quantization (#7193)
* Create and load for an appendable quantization

remove feature flag

more todo

review remarks

review remarks

* fix after rebase

* Rename is_appendable to supports_appendable

---------

Co-authored-by: timvisee <tim@visee.me>
2025-09-01 15:49:09 +02:00
xzfc
febf72a47e Generic AccessPattern (#7166) 2025-09-01 11:16:20 +00:00
Ivan Pleshkov
b03853c33e Quantization storage builder for chunked mmap (#7174)
* Quantization storage builder for chunked mmap

* fix after rebase

* Update lib/segment/src/vector_storage/quantized/quantized_chunked_mmap_storage.rs

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
2025-08-29 16:10:30 +02:00
Ivan Pleshkov
3be4ca8805 Populate multivector quantization offsets (#7173) 2025-08-29 14:05:48 +02:00
Ivan Pleshkov
4b52affe52 Dont use quantization in exact plain search (#7179) 2025-08-29 14:05:06 +02:00
Tim Visée
894692919c Remove chunked mmap vectors mlock flag (#7165) 2025-08-28 15:40:13 +02:00
tellet-q
6c75566ac4 Add tests for immutable text index (#7153)
* Add unit test

* Flush text index deletes before reopening them

* Fix unused warning if compiling without RocksDB

* Add e2e test

---------

Co-authored-by: timvisee <tim@visee.me>
2025-08-27 12:18:58 +02:00
Andrey Vasnetsov
e744bd6014 implement custom collection metadata (#7123)
* implement custom collection metadata

* persist metadata change

* Also unset a key in the test

---------

Co-authored-by: timvisee <tim@visee.me>
2025-08-26 11:49:17 +02:00
dependabot[bot]
bef3e88340 build(deps): bump tinyvec from 1.9.0 to 1.10.0 (#7139)
Bumps [tinyvec](https://github.com/Lokathor/tinyvec) from 1.9.0 to 1.10.0.
- [Changelog](https://github.com/Lokathor/tinyvec/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Lokathor/tinyvec/compare/v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: tinyvec
  dependency-version: 1.10.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-08-26 10:43:09 +02:00
dependabot[bot]
0c937a3801 build(deps): bump io-uring from 0.7.9 to 0.7.10 (#7142)
Bumps [io-uring](https://github.com/tokio-rs/io-uring) from 0.7.9 to 0.7.10.
- [Commits](https://github.com/tokio-rs/io-uring/commits)

---
updated-dependencies:
- dependency-name: io-uring
  dependency-version: 0.7.10
  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-08-26 10:34:39 +02:00
dependabot[bot]
8434547690 build(deps): bump charabia from 0.9.6 to 0.9.7 (#7140)
Bumps [charabia](https://github.com/meilisearch/charabia) from 0.9.6 to 0.9.7.
- [Release notes](https://github.com/meilisearch/charabia/releases)
- [Commits](https://github.com/meilisearch/charabia/compare/v0.9.6...v0.9.7)

---
updated-dependencies:
- dependency-name: charabia
  dependency-version: 0.9.7
  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-08-26 10:34:29 +02:00
Andrey Vasnetsov
55b0f86122 restore missed index laoding (#7133) 2025-08-26 09:48:52 +02:00
xzfc
937cd477ac Misc fixes (#7134)
* PrimitiveVectorElement: use zerocopy

* PrimitiveVectorElement: also use zerocopy::FromBytes

* serialize_graph_links: back_index is Vec<PointOffsetType>

* for_each_link_with_vector: loosen lifetimes
2025-08-26 09:43:37 +02:00
xzfc
0bcdcffb69 Clean up GraphLayers::search_entry_on_level a bit (#6946)
review remarks

are you happy fmt

don't do unnecessary scoring
2025-08-25 19:07:35 +02:00