Commit Graph

396 Commits

Author SHA1 Message Date
generall
5e26b6cfc1 fix openapi generation for Fusion 2024-06-25 13:33:43 +02:00
xzfc
7e7a96c80f Drop SparseVectorIndexDatatype in favor of VectorStorageDatatype (#4541)
* Drop SparseVectorIndexDatatype in favour of VectorStorageDatatype

* Split Datatype doc for VectorParams and SparseIndexParams
2024-06-25 13:33:37 +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
xzfc
a5cb30c208 U8 quantization for sparse vector index (#4514)
* U8 quantization for sparse index

* Spelling
2024-06-25 13:33:24 +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
Arnaud Gourlay
b36783cce4 Fixing various API docs (#4520)
* Fixing various API docs

* more fixes
2024-06-21 23:44:08 +02:00
Tim Visée
46ce9b4a1f Hide resharding types and parameters in OpenAPI spec until we release (#4515) 2024-06-21 23:43:44 +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
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
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
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
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
dependabot[bot]
8060c7dd3e Bump schemars from 0.8.20 to 0.8.21 (#4336)
* Bump schemars from 0.8.20 to 0.8.21

Bumps [schemars](https://github.com/GREsau/schemars) from 0.8.20 to 0.8.21.
- [Release notes](https://github.com/GREsau/schemars/releases)
- [Changelog](https://github.com/GREsau/schemars/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GREsau/schemars/compare/v0.8.20...v0.8.21)

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

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

* Update OpenAPI specification

---------

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>
2024-06-11 13:09:48 +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
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
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
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
generall
e204c2cd6f fix openapi schema consistency 2024-05-26 12:30:31 +02:00
AMIR
5a6cd1c2aa Simplify REST API nesting (#3323) (#3414)
* Simplify REST api nesting (#3323)

* tiny clarity refactor for test

* simpler generated openapi

* fix tests

* wrap deserializer functions into a struct impl

* fix null case

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2024-05-26 12:30:14 +02:00
Roman Titov
89b4be0241 Add basic resharding types (#4216) 2024-05-26 12:28:12 +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
dependabot[bot]
85e7d6225c Bump schemars from 0.8.17 to 0.8.19 (#4186)
* Bump schemars from 0.8.17 to 0.8.19

Bumps [schemars](https://github.com/GREsau/schemars) from 0.8.17 to 0.8.19.
- [Release notes](https://github.com/GREsau/schemars/releases)
- [Changelog](https://github.com/GREsau/schemars/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GREsau/schemars/compare/v0.8.17...v0.8.19)

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

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

* Update OpenAPI specification

---------

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>
2024-05-09 14:27:25 +02:00
Arnaud Gourlay
28a31bd5b0 Simplify MaxSim configuration (#4171)
* Simplify MaxSim configuration

* enable extension of multivectorconfig

* rename multi_vec_config to multivec_config
2024-05-09 14:26:03 +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
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
Luis Cossío
bc9b55d128 Issues API: Add clear_issues REST endpoint (#4125)
* add clear_issues rest endpoint

* review fixes

* update openapi

* fix number of apis checker
2024-05-02 19:16:51 +02:00
Andrey Vasnetsov
896cfe109d Sparse idf dot (#4126)
* introduce QueryContext, which accumulates runtime info needed for executing search

* fmt

* propagate query context into segment internals

* [WIP] prepare idf stats for search query context

* Split SparseVector and RemmapedSparseVector to guarantee we will not mix them up on the type level

* implement filling of the query context with IDF statistics

* implement re-weighting of the sparse query with idf

* fmt

* update idf param only if explicitly specified (more consistent with diff param update

* replace idf bool with modifier enum, improve further extensibility

* test and fixes

* Update lib/collection/src/operations/types.rs

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>

* review fixes

* fmt

---------

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2024-05-02 19:16:26 +02:00
Luis Cossío
8a986ea4fd Issues API: Enable GET /issues endpoint (#4118)
* enable `GET /issues` endpoint

* add access test
2024-05-02 19:15:35 +02:00
Tim Visée
b99d507496 Bump version to 1.9.0 (#4083)
* Bump version to 1.9.0

* Bump version number in OpenAPI spec
2024-04-22 11:58:32 +02:00
Andrey Vasnetsov
632ec541e2 Byte storage api support (#4065)
* wip: include datatype in vector params API

* generate api schemas

* propagate datatype to segment creation

* fix review

* fmt
2024-04-22 10:34:24 +02:00
Andrey Vasnetsov
419877a7a7 remove usage of vectors_count (#4052)
* remove usage of vectors_count

* skip serialization if none

* add deprecated mention

* Add colon after deprecation note

---------

Co-authored-by: timvisee <tim@visee.me>
2024-04-22 10:34:21 +02:00
Ivan Pleshkov
19cda34e07 Byte storage integration into segment (#4049)
* byte storage with quantization

raw scorer integration

config and test

are you happy fmt

fn renamings

cow refactor

use quantization branch

quantization update

* are you happy clippy

* don't use distance in quantized scorers

* fix build

* add fn quantization_preprocess

* apply preprocessing for only cosine float metric

* fix sparse vectors tests

* update openapi

* more complicated integration test

* update openapi comment

* mmap byte storages support

* fix async test

* move .unwrap closer to the actual check of the vector presence

* fmt

* remove distance similarity function

* avoid copying data while working with cow

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-04-22 10:34:09 +02:00
Mac Chaffee
bce80747e9 Update docs to mention safer production practices (#4028)
* Update docs to mention safer production practices

* Clarify that client-server is more performant, but still not prod ready
2024-04-22 10:33:57 +02:00
Arnaud Gourlay
86c7a92f44 Decouple named vector struct (#4014)
* Decouple NamedVectorStruct from REST API

* add NamedVectorStruct::MultiDense to segment

* update doc

* fully qualified segment types

* no need to ser/de anymore

* sprinkle required PartialEq

* new rbac code needs to convert
2024-04-22 10:31:29 +02:00
Arnaud Gourlay
ffa363cbff Multivec knob for SegmentConfig (#3963)
* Multivec knob for SegmentConfig

* regen openapi

* add TODO for next step

* introduce multivecconfig to support more similarity aggregation

* update openapi
2024-04-22 10:29:13 +02:00
Tim Visée
647d7e9dec Add grey collection status (#3962)
* Add grey color for collection info status

* Restructure locks in local shard info method

* Set collection status to grey if we have pending optimizations

* Update OpenAPI specification and gRPC documentation

* Set optimizer status instead of color for compatibility reasons

* Only set and check for grey status if there are no other statuses
2024-04-22 10:28:58 +02:00
Andrey Vasnetsov
772b31da70 add config property to disable jwt by default (#3923) 2024-04-22 10:28:01 +02:00
Ricardo Pallas
c35238f68e Removes method from abort shard transfer operation (#3803)
* Removes method from abort shard transfer operation

* Updates consensus test message assertion

* updates validation message
2024-04-22 10:27:53 +02:00
Tim Visée
79b137b794 Expose the WAL delta transfer method in our OpenAPI specification (#3884) 2024-04-22 10:26:14 +02:00
Tim Visée
caa03125ed Switch to Recovery state, deprecated PartialSnapshot, for Qdrant 1.9 (#3847)
* Deprecate PartialSnapshot replica set state

* Improve logging

* Update gRPC docs

* Remove now obsolete migration TODO
2024-04-22 10:23:02 +02:00