Commit Graph

449 Commits

Author SHA1 Message Date
Kumar Shivendu
70c46bbb6f Track number of points optimized and expose in telemetry (#5000)
* Track number of points optimized and expose in telemetry

* refactor

* openapi specs

* remove dbg

* Return num points optimized from optimize() func

* fmt

* fix

* fix type in tests

* Store total points indexed on shard level instead of optimization level

* fmt

* fix test

* trigger ci

* fix openapi schema

* review fixes

* fmt

* improvements and fix test

* review fixes

* use const for indexing optimizer name

* fmt

* return segment id from optimize() func

* review fixes

* fix

* fix

* fik

* minor var name improvement

* Use Option<usize> to return segment id

* Use segment ID type rather than ambiguous usize

* fix test

* avoid intermediate check

* review fixes

* Rename total_indexed_points to total_optimized_points

* Update openapi schema

* optimize() should return number of points in new segment instead of segment id

* add else condition

* take read lock

* fmt

* remove flaky assert

* Count points on new segment without locking

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: generall <andrey@vasnetsov.com>
2024-09-17 15:28:00 +02:00
Tim Visée
4f7b675fe8 Remove max_segment_number from quick start and OpenAPI definition (#5058) 2024-09-17 15:27:53 +02:00
Andrey Vasnetsov
52700c52d8 custom key to hide kwt dashboard (#5056) 2024-09-17 15:27:12 +02:00
Tim Visée
41ea2bc75c Expose cluster metadata in telemetry (#5019)
* Expose cluster telemetry in metadata

* Only expose metadata in telemetry for details level 1 and up

* Update OpenAPI specification

* move metadata into cluster telemetry

* regen openapi

* use Option instead of raw hashmap

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-09-17 15:26:26 +02:00
Arnaud Gourlay
0de10604fb Distance matrix docs improvements (#5023)
* docs improvements

* improve openapi description
2024-09-17 15:26:19 +02:00
Kumar Shivendu
3568286132 Introduce grey collection status and expose shard status in telemetry (#4940)
* Expose shard status in telemetry API

* fmt

* Drop segment lock before using async fetching shard status

* Use Self in From implementation for ShardStatus to CollectionStatus mapping

* Improve comments

* Remove redundant clone

* Update openapi specs

* Isolate function for shard status

* Fix compiler error

* Avoid adding dedicated function for shard status

* review fixes

* define missing var

* lint err

* comment

* comment

* refactor

* improve comments

* Improve comments

* fix lint and update openapi specs

* improve comment
2024-09-17 15:26:09 +02:00
Arnaud Gourlay
ba57d63200 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-17 15:26:02 +02:00
Jojii
3377530c62 [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 15:24:11 +02:00
Luis Cossío
f7de6c9017 Facets: add consistency param to openapi (#4969)
* add consistency param to openapi

* interpret uuid map index as facet index too
2024-08-29 15:24:05 +02:00
Luis Cossío
4b429214cc 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-28 15:18:21 +02:00
Tim Visée
29f7861d31 Expose resharding operations for collection in telemetry (#4938)
* Expose resharding operations for collection in telemetry

* Update OpenAPI spec
2024-08-28 15:18:18 +02:00
Andrey Vasnetsov
9573162ffe include peers list into telemetry (#4947) 2024-08-27 01:14:45 +02:00
Andrey Vasnetsov
35e0ef8a7d 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-27 01:13:19 +02:00
Luis Cossío
5f5fd25d64 Add grpc endpoint for Facet (#4933)
* add grpc endpoint

* gen grpc docs
2024-08-27 01:13:12 +02:00
Luis Cossío
3185dd23c5 Exact facet mode (#4878) 2024-08-27 01:09:27 +02:00
Luis Cossío
ace8a90259 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-27 01:08:53 +02:00
Andrey Vasnetsov
e37a9ea2d5 make range and lookup params optional (#4905) 2024-08-27 01:07:00 +02:00
Arnaud Gourlay
faab853b86 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-27 01:06:50 +02:00
Tim Visée
6336395685 Bump version to 1.11.0 (#4865)
* Bump version to 1.11.0

* Update missed cherry picks

* Update OpenAPI spec and redoc
2024-08-12 16:29:32 +02:00
Andrey Vasnetsov
94ed6a1fb8 docs: Use // for proto comments (#4852)
* docs: Use // for proto comments

* docs: Update gRPC

* chore: regen

---------

Co-authored-by: Anush <anushshetty90@gmail.com>
2024-08-09 18:19:59 +02:00
xzfc
f6493e786b Add shell.nix (#4821) 2024-08-09 18:19:55 +02:00
Arnaud Gourlay
c2dca53e81 Add missing timeout query params in openapi specs (#4850)
* Add missing timeout query params in openapi specs

* get_points as well
2024-08-09 18:19:47 +02:00
Jojii
564c085d4b On-disk Uuid hybrid-index (#4825)
* Migrate uuid index to mmap

* add uuid numeric index

* select correct index + tenants

* Only serialize if necessary

* select correct index

* reset Cargo.toml

* review: use only map index for uuid for now

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-08-09 18:19:39 +02:00
Andrey Vasnetsov
649560fefd Use mmap lock as default vector storage (#4828)
* add force_ram parameter to chuncked mmap vector storage

* enable mlocked mmap vector storage on unix by default

* regen openapi

* add mlock on creation of chunck

* minor unrelated renaming

* rollback changes in LockedChunkedMmap

* fmt

* make AppendableMmapDenseVectorStorage generic of storage type

* make AppendableMmapMultiDenseVectorStorage generic of storage type

* implement initialization of InRamChunkedMmap

* implement MultiDenseAppendableInRam and variations

* enable InRamChunkedMmap for multivectors

* use same CHUNK_SIZE for mmap and regular chuncked vectors

* enable InRamChunkedMmap by default

* fix tests

* rollback usage of InRamChunkedMmap by default

* review changes

* add assertion on chunk_capacity [skip-ci]
2024-08-09 18:19:35 +02:00
Arnaud Gourlay
93f04a3f49 Add and fix missing timeout in the retrieve APIs (#4842)
* Add and fix missing timeout in the retrieve APIs

* no need for extra timeout handling as single ops are doing it

* don't surface timeout too high in shard transfer infra

* add todos for future work

* update timeout after first query
2024-08-09 18:19:09 +02:00
Arnaud Gourlay
8c730c88d5 Add missing integration steps to new API doc (#4824) 2024-08-09 18:18:16 +02:00
xzfc
f225e5865a chore: move tests/openapi/openapi_integration/* → tests/openapi/* (#4820) 2024-08-09 18:17:44 +02:00
Luis Cossío
88fa434f53 Facets in internal service (#4790)
* add `facet` to shard trait

* Add internal service

* gen grpc docs
2024-08-09 18:17:00 +02:00
Jojii
20b0199aff Rename tenant to principal for float,int,datetime (#4789)
* Rename tenant to principal for float,int,datetime

* Apply review proposal
2024-08-09 18:16:25 +02:00
Jojii
e6bc3af29c fix tenants not getting applied from API (#4763) 2024-08-09 18:15:19 +02:00
Tim Visée
67217002fe Implement resharding down (#4697)
Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>
2024-08-09 18:15:15 +02:00
Luis Cossío
aa5a6dda24 Switch to camelcase in Sample proto enum (#4758)
* Switch to camelcase

* grpc docs
2024-08-09 18:15:04 +02:00
Jojii
745b1621df UUID payload index (#4738)
* add UuidIndex

* fix clippy

* rebase to dev

* update api docs

* don't use wrapper type for Uuid index

* rebase to `dev`

* remove existence checking

* rename UuidPayloadKeyType => UuidIntType

* apply review changes

* rebase to dev

* post-rebase fixes

* Improve estimation

* Improve naming

* Apply suggestions from code review

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>

* use u128 in histogram and improve uuid sorting

* Also allow defragmentation for completely random Uuids

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-08-09 18:14:51 +02:00
xzfc
983df217d9 Add {Integer,Float,Datetime}IndexParams::on_disk to the API (#4755)
* Add {Keyword,Integer,Float,Datetime}IndexParams::on_disk to the API

* Add PayloadFieldSchema::is_on_disk()
2024-08-09 18:12:13 +02:00
Arnaud Gourlay
1db1e7e52e Fix Clippy 1.80 (#4752)
* Fix Clippy 1.80

* sync openapi spec

* add `check-cfg` setting to `workspace.lints.rust`

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2024-08-09 18:12:09 +02:00
Natanael Mojica
330eae8529 Refactor: Convert app and cluster info metrics from counters to gauges #4696 (#4733)
* Refactor: Convert app and cluster info metrics from counters to gauges

- Change app_info, app_status_recovery_mode, and cluster_enabled metrics from COUNTER to GAUGE
- Update metric values to use boolean as f64 for consistency and clarity
- Improve metric type accuracy for better representation of state information

* fix: Update docs regarding metrics type

* openapi: Update app_info metric type

* metrics: Update test to check for the right metric type
2024-08-09 18:11:35 +02:00
Kartik Gupta
c6b24b6425 schemars example for CollectionsResponse, ScrollResult, SnapshotDescription, AliasDescription (#4714)
* example for CollectionsResponse

* points_example for ScrollResult

* example for SnapshotDescription

* fix

* example for AliasDescription

* fix: Style nit: add newline

* fix time and id

* fix order_value

* upd openapi

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-08-09 18:11:31 +02:00
Luis Cossío
f64432686e universal-query: Expose random sampling query (#4657)
* expose random sampling query

* fix random query rescoring

* only ignore offset when there are no prefetches

* fix offset and with_payload/with_vector

* gen grpc docs

* make tests less flaky

* gen openapi schema

* Remove suffixed spaces

---------

Co-authored-by: timvisee <tim@visee.me>
2024-08-09 18:10:37 +02:00
Arnaud Gourlay
6a672d3aec universal-search: Query group API should support lookup_from (#4706)
* universal-search: Query group API should support lookup_from

* sync docs
2024-08-09 18:09:51 +02:00
Jojii
38522784b7 Basic defragmentation (#4610)
* sorting

* migrate tests and move logic into SegmentBuilder

* add test and improve implementation

* improve code

* review

* code review improvements

* add index building to test

* Do not clone ranges

* Resolve clippy warnings due to recent PR on dev

* review suggestions

* Defragmentation in api (#4684)

* add tenant config to api

* deduplicate used defragmentation keys

* rename is_tenant to is_primary

* use all values to defrag key

* rename is_primary -> is_tenant

* update schema

---------

Co-authored-by: generall <andrey@vasnetsov.com>
Co-authored-by: timvisee <tim@visee.me>
2024-08-09 18:08:52 +02:00
xzfc
6c2256b86d Unclutter repo root (#4678)
* Move CODE_OF_CONDUCT.md to docs

* Move CONTRIBUTING.md to docs

* Drop QUICK_START_GRPC.md

* Drop docs/favicon.ico as being unused

* Move QUICK_START.md to docs
2024-08-09 18:08:24 +02:00
Luis Cossío
602935ee32 universal-query: Distribution-Based Score Fusion (#4614)
* refactor fusion into method

* expose distribution-based score fusion

* gen openapi and docs

* Better rest description

* add basic integration test
2024-08-09 18:06:59 +02:00
Kartik Gupta
08f4d4f78d Fix examples for scored point (#4659)
* Revert "Merge pull request #4560"

This reverts commit 5b0536df39.

* point id examples

* payload example

* VectorStruct example

* fmt

* ShardKey example

* OrderValue example

* fix

* example for SeqNumberType, ScoreType
2024-08-09 18:06:41 +02:00
Arnaud Gourlay
445a70f42c universal-query: gRPC group API (#4656)
* universal-query: gRPC group API

* fix jwt test

* resolve default values for CollectionQueryGroupsRequest
2024-08-09 18:06:24 +02:00
Andrey Vasnetsov
cb7619e58f remove schemars examples from the enum (#4647) 2024-07-10 14:19:24 +02:00
George
85e8b1e249 fix: fix root response structure (#4643)
* fix: fix root response structure

* Update root endpoint response in OpenAPI template file

---------

Co-authored-by: timvisee <tim@visee.me>
2024-07-10 14:19:16 +02:00
Arnaud Gourlay
f660ce9427 universal-query: Grouping REST API (#4616)
* universal-query: Grouping REST API

* add API docs

* bump API count

* add jwt validation test

* fix API

* better test

* stay on CoreSearchRequest where possible

* use existing scoring helper

* push broken test to illustrate issue

* track best score per point_id to enable sort on payload

* add example test for query discover with groups

* track ScoredPoint instead of PointId

* add default values for smoother ux
2024-07-10 14:19:11 +02:00
Andrey Vasnetsov
5b0536df39 Merge pull request #4560
* schemars example for vectors in scored point

* schemars example for payload in scored point

* Using json! in schemars example for payload in scored point

* fix

* schemars example for shard_key in scored point

* schemars example for order_by in scored point

* schemars example for id, version, score in scored point

* schemars example for id, payload, vector, shard_key, order_value  in …

* point id examples

* remove id_example in schema.rs

* schemars example for vector, named_sparse_vector, named_vector

* schemars example for order_by

* schemars example for OrderByInterface

* schemars example for Fusion

* schemars example for MultiDenseVector,DenseVector in VectorInput

* schemars example for QueryRequest

* schemars example for QueryRequestBatch

* schemars example for QueryResponse

* schemars example for FusionQuery, OrderByQuery, ContextQuery, Discove…

* example for WithLookup, ContextPair, ContextInput, DiscoverInput, Rec…

* fix
2024-07-10 14:19:03 +02:00
xzfc
7e3de3e7bf Switch to poetry (#4518)
* Use poetry for openapi tests

* Use poetry for consensus tests

* Use poetry for gen_storage_compat_data/populate_db.py

* Make consensus_tests scripts executable

* Use poetry for test-consensus-compose

* Cleanup

* Don't call poetry run in scripts
2024-07-10 14:18:15 +02:00
xzfc
a74bf30f8d Extend PayloadSchemaParams to every PayloadSchemaType (#4613)
* Move IntegerIndexType and TextIndexType into a common file

* Formatting

* Extend PayloadSchemaParams to every PayloadSchemaType
2024-07-10 14:16:56 +02:00