Commit Graph

453 Commits

Author SHA1 Message Date
Redouan El Rhazouani
0c55bcc53d Optimize JSON-Proto Conversion, Improve Memory Allocation, and Add Unit Tests (#5591)
* Optimize JSON-Proto conversion and add unit tests
 * mproved memory allocation by eliminating raw loops
 * Enhanced readability by reducing nesting and restructuring logic for clarity
 * Added tests to assert correctness and reliability of the JSON-Proto conversion process

* Resolve clippy issues
2024-12-06 10:43:58 +01:00
Jojii
42fd2e27e2 Strict mode max collection vector size (#5501)
* Strict mode config: Max collection size

* api specs

* Add tests + set/update payload check

* Improve function names and add comments

* rename config to separate vectors and payload

* fix tests

* Adjust configs docs

* add benchmark

* improve performance by caching shard info

* add bench for size_info() and fix tests

* Also limit the batch-size for vector updates (#5508)

* Also limit the batch-size for vector updates

* clippy

* add lost commit

* Load cache on collection initialization

* add unit type to parameter name

* fix renaming in test

* clearer error message

* fix test

* review remarks

* remove unused function for now

---------

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2024-12-05 17:28:09 +01:00
Luis Cossío
5003b85719 Friendlier untagged enum errors (#5580)
* add friendlier errors for untagged enums

* alias with_vector and with_vectors in query api
2024-12-03 17:53:22 -06:00
Luis Cossío
ed668c636f improve QueryInterface error message (#5546) 2024-11-28 16:26:37 -06:00
Arnaud Gourlay
36d07a5444 Return complete error for sparse vector validation (#5536)
* Return complete error for sparse vector validation

* remove unecessary path

* update test to show new value
2024-11-28 12:27:12 +01:00
Jojii
5417428951 Add max upsert batch size strict mode option (#5485) 2024-11-19 19:06:57 +01:00
Jojii
55b193a2c8 Add hardware metrics to /metrics and /telemetry API (#5408)
* add hardware metrics to /telemetry and /metrics

* move all_hw_metrics function
2024-11-19 15:08:04 +01:00
Tim Visée
1ade25901a Bump dev version to 1.12.5-dev (#5476) 2024-11-19 13:09:47 +01:00
Luis Cossío
b895bcd872 Transfer blob_store into this repo (#5436)
* copy-paste blob_storage

* get rid of copied utils

* fix clippy

* fmt

* audit blob_store manifest

* move `Payload` into `fixtures.rs`

* fix clippy

* put csv in google storage

* ignore hm test

* fix codespell

* improve files test

* test different block sizes

* remove unused deps

* replace StdRng with SmallRng for faster tests
2024-11-18 12:43:52 -06:00
Jojii
b83ace82f0 Per collection hardware measurements (#5453)
* Add HwMeasurementCollector

* Add hardware reporting to TOC + RequestHwCounter

* Pass HwMeasurementAcc by reference + Update accumulation

* Update tests and benchmarks

* update REST API

* Update gRPC API

* codespell

* Adjust internal API

* improve docs

* introduce drain to the HwMeasurementAcc

* fmt

* use drain to report to the collection counter

* implement hw metrics drain for internal and external queries

* fix drinage

* refactor rest models: move away from grpc crate

* fmt

* implement usage reporting to collection acc for rest api

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-11-17 12:46:01 +01:00
n0x29a
7833fba05f allow inference for Documents in points (grpc + rest) (#5447)
* allow inference for Documents in points (grpc + rest)
* move validation to documents & images

---------

Co-authored-by: n0x29a <n0x29a@example.com>
Co-authored-by: generall <andrey@vasnetsov.com>
2024-11-15 10:31:05 +01:00
George
15656e9110 Make model name field mandatory in inference structures (#5431)
* Make model name field mandatory in inference structures

* fix batch tests
2024-11-12 17:00:27 +01:00
Tim Visée
9d83ef2a6d Bump dev version to 1.12.4-dev (#5432) 2024-11-12 16:56:12 +01:00
George
ccc5551701 update Image.image type to Value instead of string (#5403)
* update Image.image type to Value instead of string

* apply cargo fmt

* fix tests
2024-11-08 20:50:27 +01:00
Tim Visée
48c02b29c7 Bump dev version to 1.12.3-dev (#5407) 2024-11-08 17:33:39 +01:00
Tim Visée
f81b119ce0 Bump dev version to 1.12.2-dev (#5392) 2024-11-07 11:45:46 +01:00
Jojii
7b677fb7fa Hardware counting for quantization (#5369)
* add cpu measurement for quantization

* clippy

* fix tests

* discard hardware counters in benchmarks

* Forwarding hardware counter in distributed setup (#5371)

* make hardware counter available in distributed setup

* clippy

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-11-06 16:23:02 +01:00
Jojii
e35ec150df Add hardware usage to grpc API (#5333)
* Add hardware usage to grpc API

* generate grpc docs
2024-11-05 16:15:39 +01:00
n0x29a
717594bdf5 Inference Service, query requests (batch processing) (#5329)
* Inference Service, query requests (batch processing)

---------

Co-authored-by: n0x29a <n0x29a@example.com>
Co-authored-by: generall <andrey@vasnetsov.com>
2024-11-04 14:19:37 +01:00
Jojii
70646af7a8 Add hardware measurements in API (#5306)
* add HwMeasurementAcc and API helpers+types

* add config to API to toggle hardware reporting in API responses

* add Default impl for HwMeasurementAcc

* comments

* review remarks

* include usage into API schema

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-10-29 09:53:22 +01:00
Andrey Vasnetsov
633d996e61 HasVector filtering condition (#5303)
* include vector storage into struct vector index

* implement has_vector

* generate schemas

* refactor query filter optimizer so avoid too many function arguments

* test + fix for sparse vectors

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

Co-authored-by: Jojii <15957865+JojiiOfficial@users.noreply.github.com>

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

Co-authored-by: Jojii <15957865+JojiiOfficial@users.noreply.github.com>

* fmt

---------

Co-authored-by: Jojii <15957865+JojiiOfficial@users.noreply.github.com>
2024-10-25 18:47:03 +02:00
n0x29a
bd93b59c80 Inference Service, query requests (rest) (#5295)
* Inference Service, query requests (rest)

---------

Co-authored-by: n0x29a <n0x29a@example.com>
Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2024-10-23 15:25:01 +02:00
Tim Visée
3dc809f1e0 Make some or's more lazy (#5255)
* In config merge, lazily replace overrides versus proactively taking out

* Add helper function to replace option if value is some

* Make some eager ors more lazy

* Do not aggressively take out
2024-10-17 13:53:27 +02:00
Jojii
27883dbb41 Add strict mode config to update collection API + Populate strict mode in API (#5187)
* add strict mode to update collection API

* update API specs

* clippy

* Update lib/storage/src/content_manager/toc/collection_meta_ops.rs

* Strict mode integration tests (#5189)

* Add integration tests for strict mode

* add full update test

* Apply suggestions from code review

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

* Adjust error messages

* improve checking of error response

---------

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

* prefer explicit structu conversion

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
Co-authored-by: generall <andrey@vasnetsov.com>
2024-10-14 10:27:00 +02:00
Tim Visée
df1c587c68 Bump dev version to 1.12.1-dev (#5213) 2024-10-10 12:56:28 +02:00
Andrey Vasnetsov
e0d507dac7 Inference interface in REST and gRPC (#5165)
* include document & image objects into grpc API

* introduce image and object to rest api

* minor refactoring

* rename Vector -> VectorInternal

* decompose vector data structures

* add schema

* fmt

* grpc docs

* fix conversion

* fix clippy

* fix another conversion

* rename VectorInput -> VectorInputInternal

* replace grpc TryFrom with async functions

* fmt

* replace rest TryFrom with async functions

* add image and object into query rest

* separate inference related conversions

* move json-related conversions into a separate file

* move vector-related transformations into a separate file

* move more vector related-conversions into dedicated module
2024-10-09 10:15:46 +02:00
Ivan Pleshkov
080352cc56 mmap geo index api (#5163)
* define mmap geo index

fix compilation

deleted flags

load new mmap

geo index tests

fix tests

fix build after rebase

add files list

* refactor get_stored_sub_regions output type

* review remanings

* mmap geo index api

* fix after rebase
2024-10-07 14:35:17 +02:00
Luis Cossío
045779233a Facets: Support for bool payload (#5100)
* enable faceting with boolean index

* test and fix

* also test uuid
2024-10-01 09:17:50 -03:00
Jojii
8980483416 [Strict mode] Merge StrictMode config types (#5137)
* merge StrictModeConfig and StrictModeConfigDiff into one type

* review remarks
2024-09-26 12:36:39 +02:00
Jojii
791d064bde [Strict mode] default config (#5037)
* add default config for strict mode

* add default values as example to config/config.yaml

* improve implementation

* update grpc docs
2024-09-25 14:22:36 +02:00
Tim Visée
e804720551 Bump dev version to 1.11.6-dev (#5122) 2024-09-23 17:38:01 +02:00
Tim Visée
bcd9bfd5ac Bump dev version to 1.11.5-dev (#5099) 2024-09-17 17:06:23 +02:00
Luis Cossío
025f4e3066 Expose on_disk text index (#5074)
* map index: fix reachable code marked as unreachable

* plumber work to get mmap text index to interfaces

* test: add fixture for mmap text index, always create mmap segment

* various fixes

- ensure dir is created for mmap
- implement is_on_disk() for text index
- invert deleted condition for filter in mmap inverted index

* update grpc docs and openapi

* implement return of files

* review nit

* fix after rebase

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-09-16 21:27:30 +02:00
Tim Visée
8b0aa6f549 Allow shard transfer from/to the same peer if from/to shard ID is different (#5034) 2024-09-09 09:15:42 +02:00
Andrey Vasnetsov
1712da623b Better json path parsing errors (#5035)
* report malformed json path inside error

* fmt
2024-09-06 14:53:44 +02:00
Arnaud Gourlay
ee6e760b1c Distance matrix docs improvements (#5023)
* docs improvements

* improve openapi description
2024-09-06 08:24:46 +02:00
Arnaud Gourlay
4f1ccbb031 gRPC API for Distance Matrix (#5011)
* gRPC API for Distance Matrix

* generate API docs

* apply correct limit to sample

* add JWT tests

* pluralitiy

* fix COO naming

* drops COO as it trips codespell and is redundant

* clarify docs
2024-09-04 20:25:00 +02:00
Tim Visée
6f8dd8176a Bump dev version to 1.11.4-dev (#4986) 2024-08-29 17:07:04 +02:00
Jojii
e9bad464ff [Strict-Mode] Basic implementation (#4887)
* add CollectionRequestVerification

* add to api

* rebase

* improve implementation

* implement strict mode for SearchRequest+Batch

* improve code + fix Clippy

* improve error handling

* restructure StrictModeVerification trait

* generate docs

* check `enabled` option

* review remarks

* rename StrictModeConfigDiff in grpc

* use missing payload detection from issue api

* performance improvement

* decouple extractor from issues (#4945)

* some review remarks

* don't default to empty functions in StrictModeVerification trait

* update openapi

* filter_limit => query_limit

* replace discovery_max_context_size and recommend_max_examples with max_input_examples

* review remarks

* review fix: include possible index types into error message

* review remarks

---------

Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>
Co-authored-by: generall <andrey@vasnetsov.com>
2024-08-29 10:49:23 +02:00
Tim Visée
2eff2c7227 Bump dev version to 1.11.3-dev (#4975) 2024-08-28 16:14:02 +02:00
Luis Cossío
b49e416382 Integer and UUID facets (#4946)
* move FacetIndex into facet_index.rs

* add support for integer facets

* add support for uuid facets

* use separate internal structure

* rename FacetValue::Keyword into FacetValue::String in REST

* fix after rebase
2024-08-27 11:30:57 -04:00
Tim Visée
6f11e748c3 Bump dev version to 1.11.2-dev (#4965) 2024-08-27 11:47:56 +02:00
Andrey Vasnetsov
abd51d984a Implement better handling of UUID index (#4961)
* rename keyword -> string for internal data structures

* implement MatchAny and expect for filter on UUID mmap index

* implement MatchAny and expect for cardinality estimation on UUID mmap index

* refactor PayloadFieldIndex filter for handling incorrect empty query parsing case
2024-08-27 00:53:30 +02:00
Andrey Vasnetsov
1d0a3303d3 Data structures for inference (#4936)
* add document to VectorStruct

* fmt

* add document to BatchVectorStruct

* add document to VectorInput

* add document to Vector

* upd openapi
2024-08-22 16:38:55 +02:00
Luis Cossío
b92908f602 Add grpc endpoint for Facet (#4933)
* add grpc endpoint

* gen grpc docs
2024-08-22 14:27:25 +02:00
Luis Cossío
99f6d99fba Exact facet mode (#4878) 2024-08-19 23:21:17 -04:00
Luis Cossío
045fb7038c Facets in REST (#4848)
* rename to FacetRequestInternal

* add rest endpoint

* fix correctness by fetching the whole list of values

* fix mmap map index variant

Also removes test for sorted output, for now

* add ytt spec

* fix clippy

* use hashmap inside of local shard

* rename operation to `facet`, add access test

* whitelist endpoint

* change api

* make limit optional
2024-08-19 16:03:26 -04:00
Andrey Vasnetsov
6e0086b6c2 make range and lookup params optional (#4905) 2024-08-19 10:52:27 +02:00
Arnaud Gourlay
caeb262e86 Search distance matrix REST API (#4884)
* Search distance matrix REST API

* apply Validator upgrade

* min sample size is 2 thanks Luis

* review: rethink pair view

* remove rows-based similarity matrix output

* fmt

* upd openapi

* we have only 70 apis now

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-08-19 00:21:55 +02:00
Arnaud Gourlay
c8844388d7 Update Validator 0.18 (#4894)
* Update Validator 0.18

* fix new test error message

* clearer geo error message

* fix error message

* fix unit tests

* Put spaces back

---------

Co-authored-by: timvisee <tim@visee.me>
2024-08-15 15:22:51 +02:00