Commit Graph

405 Commits

Author SHA1 Message Date
generall
5e26b6cfc1 fix openapi generation for Fusion 2024-06-25 13:33:43 +02:00
Arnaud Gourlay
cf85af00cb universal-query: Add validations to query input (#4536)
* universal-query: Add validations to query input

* update openapi spec

* use raw request to by-pass local validations

* add validation for order_by and factorize
2024-06-25 13:33:32 +02:00
Luis Cossío
2c651b1147 order_by: Begin migration to order_value in Record [v1.10] (#4526)
* begin migration to order_value

* gen openapi and grpc docs

* cargo clippy --fix

* fixup
2024-06-25 13:33:09 +02:00
Andrey Vasnetsov
eba2c6be61 Api consistency update (#4533)
* rename search_params -> params

* rename multivector_config + generate schema

* upd tests
2024-06-25 13:32:31 +02:00
Andrey Vasnetsov
b4c5823491 bump version to v1.9.6 (#4531) 2024-06-22 00:32:56 +02:00
Luis Cossío
8a022a7b9d revert skip-serializing (#4527) 2024-06-21 23:44:28 +02:00
Arnaud Gourlay
b36783cce4 Fixing various API docs (#4520)
* Fixing various API docs

* more fixes
2024-06-21 23:44:08 +02:00
Arnaud Gourlay
19d878d277 universal-query: gRPC batch API (#4513)
* universal-query: gRPC batch API

* regen gRPC docs

* enable jwt access test
2024-06-21 23:43:16 +02:00
Tim Visée
ba9981e97f Fix the field indices in the abort shard transfer message (#4506) 2024-06-21 23:42:26 +02:00
Andrey Vasnetsov
05001598f4 fix: replace vector_count with dim (#4505) 2024-06-21 23:42:17 +02:00
Roman Titov
ed4e2fd106 Rework CommitHashRing consensus message into CommitRead/CommitWrite/Finish (#4417)
* Refactor `CommitHashRing` into `CommitRead`/`CommitWrite`/`Finish`

* Add `Resharding` filter condition

* Filter "resharded" points from search, scroll by, count and retrieve request results

* fixup! Refactor `CommitHashRing` into `CommitRead`/`CommitWrite`/`Finish`

`cargo clippy --fix`

* Apply suggestions from code review

* fixup! Filter "resharded" points from search, scroll by, count and retrieve request results

Add `Condition::is_local_only` method

* fixup! Add `Resharding` filter condition

* fixup! Filter "resharded" points from search, scroll by, count and retrieve request results

Clarified a few `TODO`s

* Fix clippy suggestions

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
Co-authored-by: timvisee <tim@visee.me>
2024-06-21 23:41:52 +02:00
Luis Cossío
70c7c4c847 Add layer of response structure specific to query (#4498) 2024-06-21 23:41:47 +02:00
Luis Cossío
ef23ab1d08 universal-query: Expose batch query in REST (#4497)
Exposes the ability to query in batch
2024-06-21 23:41:31 +02:00
Arnaud Gourlay
922fdefc6b universal-query: gRPC query API (#4495)
* universal-query: gRPC query API

* misc fixes

* more review

* add custom validation on QueryPoints.limit

* fix jwt_access test for gRPC query
2024-06-21 23:41:18 +02:00
Andrey Vasnetsov
49a9d05e7c Fix multivector for unnamed vectors (#4482)
* minor conversion improvement

* use NamedVectors in update_vectors

* remove merge from VectorStruct

* rename Multi -> Named in vector struct

* add multi-dense vectors option into VectorStruct

* generate openapi

* rename VectorStruct -> VectorStructInternal

* add conversion for anonymous multivec in grpc

* renames for BatchVectorStruct

* implement multi-dense for batch

* allow multi-dense in batch upserts

* test and fixes
2024-06-21 23:41:12 +02:00
Tim Visée
7a3f489655 Properly integrate replica set state switching in resharding transfers (#4480)
* Add serde/validate attributes to resharding operations, matching others

* Fix broken comment

* Add debug message for resharding driver entering stages

* Fix shard transfer start setting state of wrong replica for resharding

* Remove obsolete clones

* Add target shard ID to shard key, add relevant gRPC types

* Move target shard ID below source shard ID field

* Rename collection_name to collection_id

* Reformat

* Transferring point batches must merge points in case of resharding

* In resharding state, sync list of peers on start

* Add logic for setting replica set state through consensus dispatcher

* Properly start resharding transfer

* Properly finish resharding transfers, set shard state correctly

* Fix shard transfer initialisation with different target shard

* Fix shard state handling with resharding on all nodes on transfer start

* Don't reset locally disabled state if only existing shard is resharding

* Add important TODOs

* Update OpenAPI and gRPC specification

* Elaborate on some logic in code with comments

* Use user configured shard transfer method for replication

* Add debug assert, on transfer start we should not replace existing shard

* On transfer start, be aware of different sender/receiver local states

This fixes transfers where we might not have a replica on all nodes

* Fix shard transfer not setting cutoff point on target shard

* While resharding, migrate shards in numerical order

* On shard transfer initialisation, ensure transfer targets given shard
2024-06-21 23:41:04 +02:00
Luis Cossío
74918deecc universal-query: use batch implementation everywhere (#4492)
* use batch version everywhere, get rid of single query version

* extra renames
2024-06-21 23:40:52 +02:00
Andrey Vasnetsov
116e4c8ba2 fix generation of query types in openapi (#4494) 2024-06-21 23:40:46 +02:00
xzfc
b389b4e422 Add datatype option for sparse vector index (#4454)
* Add SparseVectorIndexDatatype

* Update tests

* Review fixes

* review

* gen openAPI

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-06-21 23:40:07 +02:00
Luis Cossío
1c7044d46a Skip serializing null fields in Record and ScoredPoint (REST) (#4394)
* skip serializing null fields in Record and ScoredPoint

* update tests

* fix consensus tests
2024-06-21 23:40:00 +02:00
Arnaud Gourlay
020da06356 universal-query: add lookups to query API definition (#4479)
* universal-query: add with_lookup to query API definition

* fix consistency doc check

* lookup_from and not lookup_with

* clean import

* improve doc for lookup location wrt using

* Suggestions for descriptions

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2024-06-21 23:39:24 +02:00
Luis Cossío
00961e7e95 Merge pull request #4473
* add batch query handling for internal service

* cargo clippy --fix
2024-06-21 23:37:47 +02:00
Arnaud Gourlay
6bc7c24587 universal-query: timeout support (#4449) 2024-06-21 23:34:07 +02:00
Tim Visée
ba82f60105 Bump version to 1.9.5 (#4443) 2024-06-11 13:54:26 +02:00
Luis Cossío
53516d53da universal-query: some interface renaming/edits (#4406)
in grpc:
- restructure `ContextInput`, so that it becomes easy to handle both pairs and positive/negative lists in the future

in rest: 
- restructure context queries so that they don't repeat the label in order to be used . E.g. turn `{ query: { context: { context: [ ... ] } } }` into `{ query: { context: [ ... ] } }` 
- fixes fusion so that `{query: { fusion: "rrf" } }` actually works

both:
- renames `RecommendInput` positives and negatives to singular (same as in reco api)
2024-06-11 13:17:26 +02:00
Luis Cossío
f26a10afdc universal-query: Expose REST endpoint (#4380)
Exposes `POST collections/{collection_name}/points/query` for single queries
2024-06-11 13:16:11 +02:00
Luis Cossío
2b171e7dba universal-query: validate REST query request (#4388)
Implements `Validate` for REST-facing `QueryRequest`
2024-06-11 13:16:09 +02:00
Tim Visée
671cf97bc2 Bump version to 1.9.4 (#4343) 2024-05-28 14:22:14 +02:00
Luis Cossío
f8a18dd8f5 universal-query: Converge API types into CollectionQueryRequest (#4304)
* rest -> collection

* grpc -> collection

* fix rebase

* use constants for defaults
2024-05-28 13:44:21 +02:00
Andrey Vasnetsov
1b72ee9eb7 bump version to v1.9.3 (#4327) 2024-05-26 15:53:13 +02:00
Luis Cossío
0cbc6a4578 universal-query: user-facing gRPC and REST request types (#4303)
* add grpc `QueryPoints`

* add rest types

* move to REST types to `api::rest::schema`, decouple `OrderByInterface` and `RecommendStrategy`

* openapi changes

* add score_threshold param

* decouple `ShardKeySelector`, add shard key param

* remove commented-out code

* new codespell
2024-05-26 12:54:25 +02:00
Arnaud Gourlay
1c5befe968 Cleanup unused dependencies (#4306) 2024-05-26 12:51:33 +02:00
Luis Cossío
9d8dd04716 universal-query: Introduce order_value field in ScoredPoint (#4291)
* - Fix ordering in group-by for custom scoring
- Rename `OrderingValue` -> `OrderedValue`
- Introduce `order_value` field in `ScoredPoint`

* modify `Ord` implementation

* rename to `OrderValue`

* `has_custom_scoring` -> `is_distance_scored`

* regen apis

* flip bools in `is_distance_scored`
2024-05-26 12:50:17 +02:00
Andrey Vasnetsov
9cf19d99d6 [universal-search] refactoring suggestions (#4262)
* rename some structures

* use enum for fusion
2024-05-26 12:34:28 +02:00
Luis Cossío
13de19afea Merge pull request #4261
* add `OrderBy` scoring, and add `scrolls` to `PlannedQuery`
2024-05-26 12:34:21 +02:00
Luis Cossío
914b19f75d universal-query: Test and fix PlannedQuery conversion (#4242)
* test and fix PlannedQuery conversion

* add `ScoringQuery::RRF`

* add more test cases, fix more
2024-05-26 12:33:18 +02:00
Luis Cossío
d7186e8094 universal-query: Connect grpc internal query service (#4223)
* add grpc -> internal conversions

* return `Status` instead of `CollectionError` in grpc -> internal conversions

* sketch points internal api connection of `query`
2024-05-26 12:32:26 +02:00
Luis Cossío
bd16dfa017 universal-query: Add query() to ShardOperation trait (#4210)
* add `query` to shard trait

* add missing conversions for query

* update grpc docs

* Query response has intermediate results

* add ShardQueryResponse description

* move pub use to the top, keep only one way of reaching reexports
2024-05-26 12:32:16 +02:00
Ivan Pleshkov
78b16a16a4 Float16 integration and API (#4234)
* f16 integration

tests

api

fix test

are you happy clippy

* fix build
2024-05-26 12:31:15 +02:00
Luis Cossío
a740f7944a universal-query: Introduce new RawVector and VectorInput messages (#4209)
* Introduce `RawVector` and `VectorInput` messages

* gen grpc docs

* remove extra `optional`

* gen grpc docs
2024-05-26 12:31:02 +02:00
Luis Cossío
8d59fb783a universal-query: Sketch request types pipeline (#4198)
* sketch types pipeline

* separate query, scroll, and search implementations into own files
2024-05-26 12:28:18 +02:00
Roman Titov
89b4be0241 Add basic resharding types (#4216) 2024-05-26 12:28:12 +02:00
xzfc
49e23ce784 Misc fixes (#4212)
* SparseVectorIndex: replace pub with feature-gated getters

* Fixup dev-dependencies

* Fixup rust doc comments
2024-05-26 12:27:05 +02:00
Tim Visée
34f7f8ec2d Bump version to 1.9.2 (#4207) 2024-05-10 09:11:27 +02:00
Jojii
974d57c111 make grpc service type enums unique for UpdateCollectionClusterSetupRequest and PointsUpdateOperation (#4205)
* make grpc service type enums unique
2024-05-09 14:28:31 +02:00
Arnaud Gourlay
8aec0def48 gRPC API multivector for write and retrieve (#4179)
* gRPC API multivector for write and retrieve

* improve naming

* validate multiv + sparse

* code review

* regen gRPC docs

* remove incorrect validation
2024-05-09 14:28:27 +02:00
Luis Cossío
6ed00113bb remove deprecated internal search api (#4178) 2024-05-09 14:27:34 +02:00
Arnaud Gourlay
f50adc272a REST API multivector for write and retrieve (#4117)
* REST API multivector for write and retrieve

* add test showing search is not supported

* use helper

* debug asserts

* better naming

* iterator style

* better naming

* add validation test for checking all inner vectors have the same size
2024-05-09 14:24:11 +02:00
Andrey Vasnetsov
97c107f21b bump version to v1.9.1 (#4160) 2024-05-02 20:33:23 +02:00
Tim Visée
fe1458dc2e Add API key field to snapshot restore, fix snapshot recovery with API key (#4155)
* Add API key to HTTP client

* Add API key field to snapshot recovery requests

* Add API key to channel service

* Provide API key when doing snapshot transfer

* Configure API key header name constant in a central place

* Reformat

* Update OpenAPI spec

* Remove suffixed spaces from configuration file

* Allow to specify HTTP headers in some consensus test utility functions

* Add snapshot transfer test with configured API key

* Use random API key in test

* Fix compilation errors and clippy warnings
2024-05-02 19:20:19 +02:00