Commit Graph

560 Commits

Author SHA1 Message Date
Arnaud Gourlay
eaaa4e4ee1 Validate IntegerIndexParams (#6494)
* Validate IntegerIndexParams

* focus
2025-05-22 23:00:52 +02:00
Arnaud Gourlay
92d324c0c7 Fix missing gRPC query validations (#6485) 2025-05-22 22:59:02 +02:00
LesserPanda
aaf3832003 fix-typo (#6465)
* fix-typo

* Update openapi.json fix-typo
2025-05-22 22:54:47 +02:00
Andrey Vasnetsov
f1884161cc Faster wal-delta transfer (#6458)
* implement internal batch-update api

* use batch update in wal-delta

* fix ci
2025-05-22 22:53:56 +02:00
Tim Visée
3b11a8f505 Use smol string as shard key (#6420)
* Use SmolStr as shard key type

* Simplify conversion
2025-05-22 22:49:03 +02:00
Andrey Vasnetsov
9eab25fc75 bump v1.14.0 (#6404) 2025-04-21 12:17:44 +02:00
Tim Visée
e59d395d80 Use ahash for maps/sets holding point IDs, offsets or similar (#6388) 2025-04-21 00:10:22 +02:00
Luis Cossío
317f1e0dbe [strict mode | score boosting] Strict mode for formula queries (#6317)
* move problems.rs to collection crate

* change type on datetime_key expression

* extract from expression

* check for unindexed fields in formula

* clippy

* dedup code

* Only implement verification for `CollectionQuery` types (#6319)

* verify CollectionQuery's Prefetch

* remove implementation for REST query

* remove implementation for REST query groups

* add basic openapi test
2025-04-20 23:52:36 +02:00
Luis Cossío
e114801ebf sum_scores recommendation strategy (#6256)
* Add in rest and grpc

* add to QueryEnum

* implement Query trait

* connect to scorer creation

* upd tests

* additional changes

* fmt

* gen openapi and grpc docs

* coderabbit fix

* add changes in async scorer

* test sum_scores in more places, refactor to remove repetition
2025-04-20 23:47:58 +02:00
Luis Cossío
8084f4cac1 [score boosting] support datetime expressions (#6196)
* use f64 as internal expression score

* allow datetime as expression

* add test cases

* fix schema, generate openapi and grpc docs

* fmt

* clippy

* fix test precision

* graceful handling of too large numbers, more tests

* rename to DatetimeExpression for consistency

* use datetime's timestamp as seconds

* capture variable name when parsing

* homogenize DateTime into Datetime

* use interface distinction between datetime strings and payload keys

* fix rebase

* fix after rebase
2025-04-20 23:47:20 +02:00
Tim Visée
4db98ecdbf Bump version to 1.13.6 (#6277) 2025-03-31 21:30:28 +02:00
Andrey Vasnetsov
2baa8cda53 implement missing validation for sparse and milti-vectors in grpc (#6274) 2025-03-31 16:21:25 +02:00
Jojii
5cd7239b61 Measure Payload Index IO Writes (#6137)
* Prepare measurement of index creation + Remove vector deletion
measurement

* add hw_counter to add_point functions

* Adjust add_point(..) function signatures

* Add new measurement type: payload index IO write

* Measure payload index IO writes

* Some Hw measurement performance improvements

* Review remarks

* Fix measurements in distributed setups

* review fixes

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-03-31 16:19:19 +02:00
Andrey Vasnetsov
ad4743a85f vector-io-read measurement on query (#6197)
* remove mut getters from HardwareCounterCell, as mutability is not useful

* introduce vector-io multiplier

* remove RealCpuMeasurement structure

* set vector-io reads multipliers

* account vector reads in dense scorers

* fmt

* fix tests

* propagate hw_counter into posting list iterator

* fmt

* fix test

* wip: measure of sparse iterator

* fmt

* optimize skip_to

* minor refactoring

* keep current PointOffset in iterator to prevent unnecessary reads from memory

* adjust sparse search cpu cost - account for datatype

* fix test

* refactor search_context tests

* move tests into a module

* introduce more tests

* grammar

* review fixes

* fix clippy

* fix clippy again

* change disposable -> new
2025-03-31 16:19:02 +02:00
Tim Visée
e282ed91e1 Bump version to 1.13.5 (#6223)
* Bump version to 1.13.5

* Update missed cherry picks
2025-03-21 14:01:57 +01:00
Luis Cossío
7428eba455 [score boosting] Add decay expressions (#6154)
* Add decay expressions

* remove code duplication in conversion

* test and fix lambda roundtrip

* Remove debug print in decay midpoint validation

* Improve error messages for decay midpoint and scale validation

* use similar lambda for gauss and exp decays

* avoid abs before squaring

* add comment about decay range

* add debug assertion
2025-03-21 11:45:46 +01:00
xzfc
d5fe14a44e Add Anonymize macro (#6160)
* Add Anonymize macro

* Use Anonymize macro

* anonymize metadata

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-03-21 11:44:06 +01:00
Jojii
6d53bd9184 IO read measurements for most Payload indices (#5951)
* Add payload index filtering IO measurements for some indices

* Add payload index metric to api and telemetry

* Also account for index access overhead

* Review remarks

* Anonymize new HardwareUsage field

* Fix tests
2025-03-21 11:43:45 +01:00
Arnaud Gourlay
af5b5bedd7 Separate StrictModeConfig output structure (#6114)
* Separate StrictModeConfig output structure

* happy regen

* add strict sparse config

* introduce CollectionConfigTelemetry

* upd openapi

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2025-03-21 11:42:11 +01:00
Jojii
78f0428f3e Measure hardware IO for update operations (#5922)
* Measure update operations hardware IO

* Add support for distributed setups

* also measure update_local

* Add consensus tests for HW metrics of update operations

* add test for upserting without waiting

* Disable HW usage reporting when not waiting for update API

* Review remarks

* Fix resharding collecting hw measurements

* Fix metric type

* New struct HardwareData for better accumulation

* Ensure we always apply CPU multiplier

* Apply suggestions from code review

* Update src/actix/api/update_api.rs

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

* Fix assert_with_upper_bound_error threshold calculation.

* Clarifying why we don't measure shard cleanup

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
2025-03-21 11:42:08 +01:00
xzfc
a17e122557 Anonymize ShardKey in ReplicaSetTelemetry (#6115)
* Anonymize ShardKey in ReplicaSetTelemetry

* Anonymize vector names in CollectionConfigInternal

* no-op: impl HardwareUsage for HardwareUsage (used in HardwareTelemetry)

* no-op: impl Anonymize for OptimizersStatus (used in OptimizerTelemetry and CollectionsAggregatedTelemetry)

* no-op: impl Anonymize for TrackerStatus in (used in TrackerTelemetry)

* no-op: Anonymize VectorParams in VectorsConfig

* no-op: Copy fields explicitly in OperationDurationStatistics

* no-op: `.clone().map(|x| x.anonymize())` -> `.anonymize()`

* no-op: impl Anonymize for ConsensusThreadStatus (used in PeerInfo and ClusterStatusTelemetry)
2025-03-21 11:41:54 +01:00
Luis Cossío
34fe874e77 [score boosting] Only accept finite numbers (#6092)
* return error for non-finite numbers in expression

* no internal default for division by zero

* add tests

* review suggestions
2025-03-21 11:41:33 +01:00
Arnaud Gourlay
820c9e17d1 Remove validation on CollectionInfo response type (#6107) 2025-03-21 11:41:26 +01:00
Andrey Vasnetsov
706b1a3166 IsEmpty/IsNull index (#6088)
* create initial strucutres

* clippy

* start field-query refactoring

* start field-query refactoring (2/N)

* start field-query refactoring (3/N): duplicate is_empty/null condiftions as field condition

* start field-query refactoring (4/N): re-instate is_empty fallback in case new index is not built yet

* filter for is_empty/is_null

* implement add/remove point

* upd schema

* open and create of null-index

* create null-index

* fix test

* Update lib/segment/src/index/query_optimization/condition_converter.rs

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

* unit test for null-index

* more unit tests

* add openapi tests

* fmt

* fix for integartion tests

* rabbit review fix

* make [null] non-empty

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
2025-03-21 11:41:12 +01:00
Arnaud Gourlay
b5de28db80 Struct deconstruction leftovers (#6071) 2025-03-21 11:40:13 +01:00
Luis Cossío
1a23ebc4b9 [score boosting] openapi test for formula (#6064)
* add formula to internal grpc api

* add openapi test for formula
2025-03-21 11:40:07 +01:00
Luis Cossío
58c23cabe1 add formula to internal grpc api (#6057) 2025-03-21 11:40:04 +01:00
Luis Cossío
9899b6fda7 [score boosting] add more expressions (#6054)
* sqrt, pow, exp, log, ln, abs

* upd openapi and grpc

* handle undefined math as negative infinity
2025-03-21 11:40:00 +01:00
Arnaud Gourlay
8426b52644 Struct deconstruction in conversions (#6066)
* Struct deconstruction in conversions

* payload ops conversions

* inference conversions

* RecordInternal conversion

* shard operation conversions
2025-03-21 11:39:46 +01:00
Arnaud Gourlay
8e665317c0 Struct deconstruction in gRPC conversions (#6062)
* Struct deconstruction in gRPC conversions

* explicit conversion
2025-03-21 11:39:39 +01:00
Tim Visée
8ad2b34265 Bump Rust edition to 2024 (#6042)
* Bump Rust edition to 2024

* gen is a reserved keyword now

* Remove ref mut on references

* Mark extern C as unsafe

* Wrap unsafe function bodies in unsafe block

* Geo hash implements Copy, don't reference but pass by value instead

* Replace secluded self import with parent

* Update execute_cluster_read_operation with new match semantics

* Fix lifetime issue

* Replace map_or with is_none_or

* set_var is unsafe now

* Reformat
2025-03-21 11:38:56 +01:00
Luis Cossío
a6043c5db4 [score boosting] add gRPC structures (#6035)
* add grpc structures

* grpc docs

* make by_zero_default optional
2025-03-21 11:38:19 +01:00
Luis Cossío
88701bdb82 [score boosting] Connect formula to query (#6024)
* finish connecting formula query

* upd openapi
2025-03-21 11:37:59 +01:00
Luis Cossío
7fe99c6f43 [score boosting] create query structures and parse them (#5990)
* create REST, CollectionQuery, and ShardQuery structures. Parse all variables and conditions

* move stuff around, rename segment Expression to ParsedExpression

* rename to MultExpression

* add Div in REST, use unique geo_distance tag

* review fixes

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-03-21 11:37:53 +01:00
Tim Visée
13178a4dc9 Fix mix ups in read/write rate limit settings (#6029) 2025-03-21 11:37:20 +01:00
Arnaud Gourlay
798f14cafb Fix Clippy 1.85 (#6011)
* Fix Clippy 1.85

* fix false positive
2025-03-21 11:36:07 +01:00
Tim Visée
7abc684361 Bump version to 1.13.4 (#5995)
* Bump version to 1.13.4

* Update missed cherry picks
2025-02-17 11:00:26 +01:00
Arnaud Gourlay
cb1f3220df Add strict mode for max points count (#5967)
* Add strict mode for max points count

* clarify estimated nature
2025-02-17 10:20:50 +01:00
Tim Visée
c2faaf90da Bump version to 1.13.3 (#5970)
* Bump version to 1.13.3

* Update missed cherry picks
2025-02-11 15:22:04 +01:00
Kumar Shivendu
dd1fb3798b fix typo (#5960) 2025-02-11 14:41:29 +01:00
Jojii
ec0762a560 Measure IO reads for vectors (#5912) 2025-02-11 14:40:21 +01:00
Jojii
77f65ef95f HwCounter rename IO metrics (#5898)
* Rename io metrics and add vector_io_write

* Chore: Cleanup obsolete TODOs and simplify retrieving HardwareCounterCells (#5899)
2025-02-11 14:37:24 +01:00
Luis Cossío
f110328296 bump and migrate to rand 0.9.0 (#5892)
* bump and migrate to rand 0.9.0

also bump rand_distr to 0.5.0 to match it

* Migrate AVX2 and SSE implementations

* Remove unused thread_rng placeholders

* More random migrations

* Migrate GPU tests

* bump seed

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2025-02-11 14:36:20 +01:00
Tim Visée
80bfc03aa0 Bump version to 1.13.2 (#5893)
* Bump version to 1.13.2

* Update missed cherry picks
2025-01-28 11:44:22 +01:00
xzfc
e85a9f18b4 Add VectorName type alias (#5763)
* Add VectorName/VectorNameBuf type aliases [1/2]

* Add VectorName/VectorNameBuf type aliases [2/2]
2025-01-27 18:25:41 +01:00
n0x29a
00933d07ae Strict mode sparsevector (#5841)
* Strict mode sparse vectors
* Update gRPC docs
* Use deny_unknown_fields (#5868)

---------

Co-authored-by: n0x29a <n0x29a@example.com>
Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Tim Visée <tim+github@visee.me>
Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2025-01-27 18:25:34 +01:00
Tim Visée
a72a5f43e8 Bump version to v1.13.1 (#5864)
* Bump version to 1.13.1

* Update missed cherry picks
2025-01-23 15:22:55 +01:00
xzfc
eaaa31e34d Fix cargo doc warnings (#5854) 2025-01-23 14:29:19 +01:00
Arnaud Gourlay
0140eb83fc Strict mode multivector (#5757)
* strict mode for multivector

* simplify impl

* regen docs
2025-01-23 14:28:01 +01:00
Tim Visée
ffda0b90c8 Bump version to v1.13.0 (#5814)
* Bump version to 1.13

* Update OpenAPI specification

* Update missed cherry picks
2025-01-16 15:06:38 +01:00