Commit Graph

617 Commits

Author SHA1 Message Date
Luis Cossío
33afc616ce Expose & benchmark binary index (#2174)
* expose boolean index

* benchmark against keyword and no index

* add integration tests

* rename benchmark groups
2023-07-05 09:29:34 -04:00
Tim Visée
cb9dbbff87 Validate oversampling (#2100)
* Use unwrap_or_default rather than constructing it manually

* Validate oversampling parameter and surrounding structs

* Validate search limit to be 1 or higher

* Validate hnsw_ef parameter to be 4 or higher

* Also validate parameters in in gRPC

* Update OpenAPI specification

* Add unlikely to reach comment

* Remove hnsw_ef validation rules for now

* Update OpenAPI specification
2023-06-28 14:57:26 +02:00
Andrey Vasnetsov
d4f44a56d8 add recovery mode flag to telemetry (#2101) 2023-06-19 14:30:13 +02:00
Andrey Vasnetsov
010e1686f3 oversampling (#2070)
* wip: add rest param

* WIP: Refactor `search_with_graph` to use oversampling

* fixup! WIP: Refactor `search_with_graph` to use oversampling

Fix `search_with_graph` quantization config handling

* fixup! WIP: Refactor `search_with_graph` to use oversampling

Use `truncate` instead of `shrink_to` 🤦‍♀️

* schrink -> truncate

* protection against wrong oversampling value

* Revert second "fixup! WIP: Refactor `search_with_graph` to use oversampling"

Accidentally commited the wrong file 🤦‍♀️

* fix max method notation

* rollbacK: max notation

* Add `oversampling` field to `QuantizationSearchParams` gRPC type

* Simplify `oversampled_top` calculation

* `./tools/generate_grpc_docs.sh`

* `./tools/generate_openapi_models.sh`

---------

Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>
2023-06-15 11:57:57 +02:00
Luis Cossío
56712b5cc7 Lookup: expose feature to REST and gRPC interfaces (#2011)
* rename `Lookup` -> `RetrievedLookup`

* feat: expose lookup in groups

- make `with_vectors` and `with_payload` optional
- include in grpc
- move GroupId to inside of PointGroup message
- include `WithLookup` inside of `GroupRequest`, doesn't make sense to keep them separated

* chore: remove allow(dead_code) from builder

* feat: introduce `WithLookupInterface` to allow specifying only the name of the lookup collection

* fix: WithLookupInterface with collection name only brings all payload and vectors

* fix: update grpc docs

* add tests and set better defaults

* remove `RetrievedLookup` from proto

* short-circuit `fill_search_result_with_payload` when it's not needed

* cargo fmt

* proto: revert putting `GroupId` inside `PointGroup`

* update grpc docs

* Remove WithLookupInterface sugar from grpc

- set with_vectors of lookup default to false
- set with_payload of lookup default to true

* update integration tests

* use singular lookup

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-06-07 18:50:09 +02:00
Andrey Vasnetsov
fbc47e8957 revert extensive validation (#2021) 2023-06-05 16:03:57 +02:00
Luis Cossío
aac0a286b2 Lookup: add lookup feature to group_by (#1996)
* feat: add GroupBy builder
- move PointGroup to `collection` crate
- make GroupBy struct to add lookup feature in a builder pattern

* test: add happy GroupBy tests
- restructure grouping tests into own file
- fix GroupId precedence of i64 vs u64

* update openapi schema

* fix rebase

* tests: minor refactor

* refactor: integrate lookup params into GroupRequest
- rename `Lookup` -> `RetrievedLookup`
- rename `LookupRequest` -> `WithLookup`

* fix: rename `lookup` -> `with_lookup` and set options on tests
- use @timvisee 's suggestion on builder.rs

* refactor: remove `RetrievedLookup` enum

* update openapi
2023-06-02 14:26:50 -04:00
Luis Cossío
b92d3f45cd Lookup internals (#1981)
* feat: add lookup_ids function
- rename GroupId -> PseudoId
- impl try_from PseudoId to PointIdType
- create lookup_ids function
- add tests

* fix: keep `GroupId` name in the openapi schema

* refactor: make new type for PseudoId

* refactor: make new `Lookup` output for lookup_ids()

* changes from review, thanks @agourlay
2023-05-31 14:23:46 -04:00
Luis Cossío
5810d05882 docs: update roadmap with quantization (#1961)
* check quantization goals

* , and
2023-05-31 10:51:54 +02:00
Roman Titov
99ff6164f7 Add optional tracing support (#1708)
* Add optional `tracing` support

TODO:
- add documentation

* Add explicit compile-time check for `--cfg tokio_unstable` rust flags...

...if `console-subscriber` feature is enabled

* Add basic documentation

* fixup! Add basic documentation

Add links, reworded few phrases and document `tracing` feature

* fixup! fixup! Add basic documentation

- Fix `tokio-tracing` link

* fixup! Add basic documentation

Too much code-blocks...

* Move tracing setup into a separate function

* fixup! Move tracing setup into a separate function

- move tracing setup to a separate file
- fix error handling

* fixup! Move tracing setup into a separate function

Add missing file 🙈
2023-05-26 17:31:27 +02:00
Arnaud Gourlay
4df4b99d88 Fix gRPC doc for shard_number (#1979) 2023-05-26 16:03:17 +02:00
Andrey Vasnetsov
d624512a94 Fixes for group-by (#1938)
* fix payload seletor

* clippy

* except cardinality estimation

* implement match except iterator and api

* use except instead of must-not + test

* Fix doc error

* Update lib/collection/src/grouping/group_by.rs

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

* Update lib/segment/src/index/field_index/map_index.rs

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

* Update lib/segment/src/index/field_index/map_index.rs

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

* Update lib/segment/src/index/field_index/map_index.rs

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

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

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

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

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

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

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

* Update lib/segment/src/vector_storage/mod.rs

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

* Update lib/segment/src/index/field_index/map_index.rs

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

* Update lib/collection/src/grouping/group_by.rs

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

* Update lib/segment/src/index/field_index/map_index.rs

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

* Update lib/segment/src/index/field_index/map_index.rs [skip ci]

Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>

* fix: `except_on` and `match_on` now produce `Vec<Condition>`s

* Apply suggestions from code review (lib/segment/src/index/field_index/map_index.rs)

* fix: reset review suggestion

* Remove unnecessary move

* Use Rust idiomatic map_else rather than match-none-false

* is-null -> is-empty

* de-comment drop_collection

---------

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>
Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>
Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2023-05-22 20:32:35 +02:00
Andrey Vasnetsov
2b373dba48 reorder conditions (#1923) 2023-05-18 12:33:17 +02:00
Andrey Vasnetsov
be99de3e27 rename nested container (#1922) 2023-05-18 10:45:16 +02:00
Andrey Vasnetsov
6042e2cfd4 Update default vector with proto (#1918)
* allow to use default vector in update api

* fmt
2023-05-17 23:24:39 +02:00
Tim Visée
14327e5e1c Refactor segment config (#1894)
* Clone current segment config to deprecated type

* Remove segment level quantization config from segment config

* Also deprecate current VectorDataConfig

* Update old segment migration to work with new refactoring

* Move index into vector data config

* Move vector data config migration logic into segment level

* Remove hnsw_config from vector data config

* Rename collection params to vector data conversions function

* Move storage type into vector data config

* Set appendable flag correctly

* Clean up and reformat

* Make segment on disk flag not optional

* Add appendable flag to segment config to replace storage type

* Remove storage type from segment config

* Deprecate storage type enum

* Use consistent variable naming

* Cleanup

* Add segment config migration for v0.5.0 to current

* Bump segment to 0.6.0

* Remove serde defaults for new storage and vector data config types

These default value configurations are not needed anymore, because these
structs are not used to deserialize old data. All current fields should
always be available in these structs. When new fields are added in new
functions, the serde default annotation must be set again.

* Cleanup

* Update OpenAPI specification

This updates the returned data structure on telemetry endpoints, as a
result of segment configuration refactoring.

* Fix quantization configuration not falling back to collection config

* Fix compiler warning when building in release mode

* Move deprecated type structs into compat module

* Update allow deprecated attributes

* Assign quantization config only in segment optimizer

* Remove unsued parameter

* Add vector storage type enum to vector data config

* Remove appendable and on_disk flags from segment and vector config

* Update OpenAPI specification

* add tests

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-05-17 09:49:55 +02:00
Tim Visée
febe321ab4 Simplify/flatten point selection in delete vectors REST endpoint (#1898)
* Flatten points selector in delete vectors REST endpoint

This makes the vector deletion API consistent with other endpoints using
the point selector.

* Update tests for flattened delete vectors point selector

* make api consistent with existing ones

* update openapi

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-05-16 18:15:57 +02:00
Luis Cossío
e90a03e00b Group by key (#1768)
* test: test must_not is_null

* vcs: ignore vscode files

* feat: group-by initial implementation

* cargo fmt

* refactor: same request behavior on reco and search

* refactor: get rid of RefCell

* refactor-fix: correct hashmap keys, and early stops

* chore: small improvements

* feat: groups aggregator

* fix: pull changes from other files

* cargo fix

* cargo fmt

* docs: edit docstrings

* allow dead code (while the complete feature is beint built)

* chore: restructure

* feat: introduce GroupKey, minor other improvements

* cargo fmt

* chore: specify aggregator visibility

* fix: oops, leaking "private" type

* refactor-fix: restructure and refactor group_by

* cargo fix

* fix: don't panic when there is no group-by field

* remove print statements

* amend: `>=`  -> `==`

* perf: remove double clone

* chore: sync aggregator from other branch

* chore: cleanup print statemets

* test: ignore big tests

* cargo fmt

* refactor: add early stop when the groups have been filled, improve code

* chore: sync aggregator, remove print from test

* refactor: consider shard_selection, improve collection_by_name handling

* feat: add bucketing to table of content

* refactor: better errors, improve tests

* test: add integration tests

* feat: add endpoints

* refactor: introduce ScoredPoint wrapper, restructure types

* sync aggregator

* edit internal grouping visibility

* feat: group_by internals

* cargo fmt

* cargo fmt

* refactor: turn inner fn into closure

* test: fix test to support new vector output representation

* feat: wire up grouping with actix

* expose grouped_by field

* fix: change output group format

* feat: wire up openapi

* fix: finish wiring up grouping in actix

* tests: fix test_group.py

* cargo fmt

* refactor: extract constants

* remove Hash from ScoredPoint

* `Option<collection_by_name>` -> `collection_by_name`

* fix: handle better cases on `match_on`

* fix: consider that subsequent calls can bring better results

* cargo fmt

* fix clippy warnings

* cargo fmt

* refactor: move `Group` to `types`, localize `hydrate_from`, remove `Deref` impls

* refactor `add_points`

* refactor: turn `GroupKey` into enum

* refactor: make `HashablePoint` inner struct private

* feat: add grpc layer, make new `PointGroup` type to use as output

* fix: update openapi models

* docs: update grpc docs

* fix merge errors

* refactor: add BaseGroupRequest to make code DRYer, improve doc comments

* cargo fmt

* perf: increase precision; choose best groups by score

* misc: add more integration tests, fix review comments

* cargo fmt

* fix: reimplement interface to flatten search and recommend requests, excluding offset

* cargo fmt

* refactor: move `r#do` impl to `GroupRequest`

* fix: update grpc docs

* perf: sort in reverse order

* fix: use fist value of a Value::Array

* fix: validate group_by to not support bracket notation, fix int. tests

* fix: update grpc validation

* tests: update collection_tests

* refactor: move validation to the api layers

* Oops: reupdate tests

* refactor: let the derives derive (thanks @ffuugoo)

* refactor: use a new GroupId on the output

also increases performance by copying less

* remove hashable set, take ordering into an account, fix mutliple groups values support

* fmt

* refactor group_id + rename per_group -> group_size, fix clippy

* remove GroupKey wrapper

* @agourlay review fixes

* refactor: `group_min_scores` and `group_max_scores` ->  `group_best_scores`

* refactor: use set difference on `keys_of_unfilled_best_groups`

* refactor: use set intersection on `len_of_filled_best_groups`

* refactor: turn best_group_keys into iterator

* fix: remove [] syntax limitation

* fix: update openapi.json

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-05-15 23:05:20 +02:00
Tim Visée
c112e6609b Fix WalConfigDiff not being validated (#1881)
* Fix WalConfigDiff not being validated

* Update OpenAPI specification
2023-05-11 17:28:57 +02:00
Ivan Pleshkov
e0848a37da Product quantization (#1615)
* product quantization

* update quantization version

* refactor

* change api

* PQ -> product rename

* fix grpc comment

* fix tests

* are you happy clippy

* quantization version up

* update quantization

* provide max threads for kmeans

* fix test build

* pq unit tests

* update quantization lib

* update quantization version

* update deleted flags for quantized raw scorer

* fix build

* are you happy fmt

* update grpc docs

* update openapi

* restore storage_builder.try_reserve_exact

* Update lib/segment/src/segment_constructor/segment_builder.rs

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

* Update lib/segment/src/vector_storage/quantized/quantized_raw_scorer.rs

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

* change pub to pub(super)

* Update lib/segment/src/vector_storage/quantized/quantized_vectors.rs

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

* rename to config_exists

* Product quantization compression api (#1834)

* product quantization compression api

* update openapi and grpc docs

* Update lib/api/src/grpc/proto/collections.proto

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

* fix test build

* are you happy fmt

* update grpc docs

---------

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

* product quantization with stopper (#1874)

* product quantization with stopper

* quantization version up

* fix build

* small comment fix

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
2023-05-10 20:20:52 +04:00
Arnaud Gourlay
a18f5e9802 Nested object filter (#1602)
* nested object filter

* code review

* add support for must_not in nested

* extract functions

* support and test must_not in SimpleConditionChecker

* add index matching unit test (to be continued)

* remove extra clone

* test with should

* WIP: Nested object filter suggestions (#1855)

* switch to bitvec

* fix clippy

* more tests

* fmt

* fix some tests

* add test with text

* support for nested should

* do not rely on indexes for nested queries & fix test

* use index to make index-aware checks in nested payload

* fix value-count tests

* re-fa-cto-ring

* fmt

---------

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

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-05-10 14:20:12 +02:00
Andrey Vasnetsov
83f8b50aca Dynamic mmap vector storage (#1838)
* wip: chunked mmap

* Fix typo

* insert and get methods

* dynamic bitvec

* clippy

* wip: vector storage

* wip: fmt

* wip: mmap chunks

* wip: mmap problems

* Share transmuted mutable reference over mmap

* option to enable appendable mmap vectors

* fmt

* rename storage status file

* update tests

* fix get deleted value range

* add recovery to vector storage tests

* add flush to tests

* fix transmute from immutable to mutable

* make transmuted pointer private

* remove unused unsafe functions

* force WAL flush if wait=true

* move wal flush into updater thread

* remove flush from update api

* Minimize pub visibility for specialized/dangerous functions

* Allocate vector with predefined capacity

* Inline format parameters

* Assert we have multiple chunks while testing, test is useless otherwise

* Remove unnecessary scope

* Remove unnecessary dereference

* Random bool has 0.5 as standard distribution, use iter::repeat_with

* Replace RemovableMmap::new with Default derive

* Rename len to num_flags

* Use Option replace as it is convention alongside take

* Add FileId enum to replace error prone manual ID rotating

* Use debug_assert_eq where applicable

* Refactor drop and set to replace

* Change default chunk size for chunked mmap vectors to 32MB

This change is made as per GitHub review, because allocating a few
storages with 128MB would take a significant amount of time and storage.

See: https://github.com/qdrant/qdrant/pull/1838#discussion_r1187215475

* Replace for-loops with iterators

* Draft: add typed mmap to improve code safety (#1860)

* Add typed mmap

* Replace some crude mmap usages with typed mmap

* Use typed mmap for deleted flags

* Simplify dynamic mmap flags a lot with new typed mmap, remove flags option

* Reformat

* Remove old mmap functions that are now unused

* Reimplement mmap locking for mmap_vectors

* Add MmapBitSlice tests

* Replace MmapChunk with new typed mmap

* Update docs

* Clean-up

* Disable alignment assertions on Windows for now

* Rename mmap lock to mlock to prevent confusion with lockable types

* one more small test

* Some review fixes

* Add aliasing note

* Add basic error handling in typed mmap constructors

* Use typed mmap error handling throughout project

* Move mmap type module to common

* Fix transmute functions being unsound

See https://github.com/qdrant/qdrant/pull/1860#discussion_r1188593854

---------

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

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Tim Visée <tim+github@visee.me>
2023-05-09 18:01:01 +02:00
Tim Visée
eb794795d6 Add REST interface to update/delete optional named vectors (#1836)
* Add update/delete REST endpoints

* Add update/delete vector REST endpoints to OpenAPI specification

* Fix update vector with no changes not triggering a validation error

* Update OpenAPI specification for updated request type
2023-05-05 16:10:46 +02:00
Tim Visée
effac50dad Add gRPC interface to update/delete optional named vectors (#1816)
* Add segment entry function to update named vectors

* Use already available function to update existing vectors

We already had a segment function to update existing named vectors. This
change ensure we use that instead of separating it separately. As a
bonus, this adds support for setting multiple named vectors at once.

* Update set vectors ourselves, don't drop omitted vectors

* Refactor vector updating functions, separate update and replace

* Add basic vector ops, add update/delete functionality to segment updater

* Add internal and public gRPC types and actions for vectors

* Add gRPC API actions

* Reformat

* Add VectorOperations to vector ops, add basic validation

* Validate gRPC vector types

* Validate vector operation structs

* Construct PointIdsList through From trait

* Update gRPC docs

* Use VectorsSelector for vector deletions in gRPC

* Add support for updating multiple points/vectors in update vectors API

* Update gRPC docs

* Fix incorrect gRPC type numbering

* Return point ID error from vector update/delete functions if not found

* Fix disbalanced vectors test
2023-05-05 15:18:19 +02:00
Luis Cossío
d89d2ec24b Disable indexing and memmap with 0 (#1824)
* feat: use 0 as disable for indexing and memmap

* amend: edit test, update doc comments, remove validation

* fix: use constant instead of literal, reword doc comments

* test: update test for loop and timeout

* fix: remove validation on OptimizerConfigDiff and fix test_validatioin.py

* fix: remove validation from build.rs, remove internal hack from  doccomments

* fix: update grpc docs

* revert max_optimization_threads validation in test

* update config comments and minor test change

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-05-05 10:10:35 +02:00
Andrey Vasnetsov
bf3561d2eb remove invalid validation (#1840) 2023-05-05 10:10:16 +02:00
Andrey Perelygin
964bfb3922 Collection Cluster API via GRPC (#1774)
* Collection Cluster API via GRPC

* Conversations fix; map_err fix
2023-05-01 10:28:11 +02:00
Ivan Pleshkov
17c1cd9b05 remove m validation for hnswconfig (#1798) 2023-04-27 18:01:20 +02:00
Ivan Pleshkov
531abf5da7 Revert hnsw m min value validation (#1797)
* revert hnsw m min value

* grpc goo

* update openapi
2023-04-27 17:44:09 +02:00
Luis Cossío
abbe6bf5a9 Allow indexing_threshold=null to disable indexing (#1702)
* feat: allow indexing_threshold=null to disable indexing

* fix: continue refactor

* amend: continue refactor

* amend: restore docstring

* update openapi.json

* test: add sanity test

* test: refactor test
2023-04-15 00:03:13 +02:00
Luis Cossío
d6dd8c8738 [WIP] Include startup date in telemetry (#1676)
* feat: add boot time to telemetry

* refactor: rename boot -> startup

* review fixes

* update openapi

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-04-11 00:35:24 +02:00
Tim Visée
f5a14449a0 Add vector specific quantization configuration (#1680)
* Add QuantizationConfigDiff type

* Add quantization config diff to vector parameters

* Prefer vector config over collection config for quantization

* Update OpenAPI specification

* Validate quantization configuration quantile in 0.5-1.0 range

As per https://github.com/qdrant/qdrant/pull/1681

* Add test if check if vector specific quantization config is persisted

* Alias quantization to quantization_config in vector parameters

* Remove quantization config diff, use full vector specific config instead

* Regenerate OpenAPI specification and gRPC docs

* Fix compilation error

* Add error handling to quantization config conversions

* Fix quantization integration test, make HNSW test stricter
2023-04-10 21:39:43 +02:00
Luis Cossío
139d3eb1e2 Include "last_responded" in telemetry (#1668)
* feat: include "last_queried" in /telemetry

* fix: anonymize responses in the WebApiTelemetry and GrpcTelemetry Anonymize impls

* fix: anonymize the last_queried field

* fix: use YYYY/MM/DD hh:mm:ss format on 'last_queried'

* tests: add and fix telemetry test

* refactor: rename last_queried -> last_responded

* cargo fmt

* update openapi models

* refactor: rename last_request_time -> last_response_date

* tests: update test

* review changes

* add chrono to schemars

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-04-10 20:20:00 +02:00
Tim Visée
b7c1ecfd5f Add vector specific HNSW configuration (#1675)
* Validate VectorConfig/VectorParams, remove obsolete validation

* Add HNSW config diff to vector parameters

* Validate params in collection config

* Add HNSW config to segment vector data config

* Add VectorsConfig params iterator for more elegant conversions

* Prefer vector HNSW config over collection config for building HNSW index

* Base segment vector param HNSW config on collection config

* General improvements

* Rewrite HNSW ef_construct extract function to also consider vector configs

* Update OpenAPI specification

* Add test to check if vector specific HNSW config is persisted

* review changes

* review changes

* Regenerate gRPC docs

* Fix test on Windows

* Regenerate OpenAPI specification

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-04-10 17:16:56 +02:00
Tim Visée
f446f5c7ad Verify quantization configuration on collection creation (#1681)
* Verify quantization configuration on collection creation

* Update OpenAPI specification

* Update range in doc to match validation definition

* Update OpenAPI specification
2023-04-10 16:02:11 +02:00
Tim Visée
d74bfa088c Add CI job to enforce generated OpenAPI and gRPC file consistency (#1667)
* Add test script to ensure OpenAPI files are consistent with sources

* Add CI job to test OpenAPI file consistency

* Add CI task to test gRPC file consistency

* Tweak consistency scripts a bit, touch temp file to trigger gRPC rebuild

* Don't test .gitignored files

* Mention updating the OpenAPI specification is enforced by CI

* Update CI job configuration

* Also check consistency of gRPC docs

* Rename temporary files to have a .diff prefix

* Add docs to consistency checking scripts
2023-04-10 14:38:53 +02:00
Arnaud Gourlay
c412e0ae3d cleanup and document openapi issue (#1665) 2023-04-05 13:15:01 +02:00
Alex Huang
d1e5498ff8 feat: add wait param for all snapshot API (#1571)
* feat: add wait parm for all snapshot API

* update openAPI

* avoid unwrap

* remove all unwarp

* return HTTP 202 when no waiting on snapshot creation

* return 202 when non wait

* update open API

* update param on python test

* update and test api

* optimize the test

* return 202 when non-wait delete

* recover fixes

---------

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-04-04 12:08:13 +02:00
Ibrahim M. Akrab
f85ae02ab6 add isNull condition for payload filtering (#1617)
* add minimal working is_null filter

* add is_null condition to grpc api (backward compatible)

* add unit tests is_null and is_empty conditions

* add is_null to  points.proto file

* add some failing OpenAPI tests

* fix a failing test due to change in collection data

* refactor MultiValue's check for is_null

* fix is_empty condition not picking up "key":[]

* remove duplicate OpenAPI integration test

* reuse same variable in condition checker tests

* update grpc docs

* fix is_null cardinality estimation to match is_empty

* update openapi specs

* remove unused debug statements

* add new test points to original test_collection

* fix failing tests according to newly added points

* add the `"key":[null]` test_case
2023-04-01 20:46:50 +02:00
Tushar Dahiya
d632cfbf27 fixed typos in *.proto files (#1569)
* Update README.md

* Update DEVELOPMENT.md

* Update docs.md

* Update roadmap-2022.md

* Update collections.proto

* Update collections.proto

* Update json_with_int.proto

* Update points.proto

* Update points_service.proto

* fixes and resync

---------

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2023-03-22 16:05:37 +01:00
Moaz bin Mokhtar
1465e5c314 doc: added steps to install Qdrant in local dev env (#1576)
* doc: added steps to install Qdrant in local dev env

* doc: move local dev guidance to development.md

* Update DEVELOPMENT.md

fix `rm` command
2023-03-22 00:30:54 +01:00
Ibrahim M. Akrab
f8e6c58a84 add upload snapshot functionality using multipart request (#1578)
* add upload snapshot functionality using multipart request

* remove unnecessary printing

* Add proper error handling

* add snapshot upload integration tests

* Fix maximum uploaded snapshot size limit

* review changes

* update OpenAPI with upload endpoint

* add missed query param in openapi

* remove unused function

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-03-21 17:17:25 +01:00
Tim Visée
0ec2e1d160 Add /metrics endpoint for OpenTelemetry/Prometheus (#1494, #1541) 2023-03-15 12:04:49 +01:00
Andrey Vasnetsov
c6dd977c5e Quantization re scoring param (#1538)
* parameter to disable rescoring with quantization

* fix

* fix default

* review fixes

* upd api autogen
2023-03-09 11:51:29 +01:00
Andrey Vasnetsov
167fb518da Fix recover snapshot peer (#1534)
* allow to recover distributed snapshot on local intance + allow recover non-existing collections

* async snapshot recovery

* fix tests

* be polite earlier
2023-03-07 17:03:01 +01:00
Ivan Pleshkov
5174388ab4 integrate quantized data to storages (#1311)
* integrate quantized data to storages

* revert gitignore

* are you happy clippy

* quantize in optimizer

* provide flag

* fix segfault

* skip quantization flag, update scores

* use quantization flag

* are you happy fmt

* use quantization flag

* quantized search test

* are you happy fmt

* refactor test, refactor scorer choosing

* are you happy fmt

* run quantization on segment builder

* decrease testing parameters

* simplify segment

* update version

* remove use_quantization flag

* provide quantization config

* quantization version up

* euclid dist

* add euclid test

* saveload

* fix initialization bugs

* quantization lib version up

* fix arm build

* refactor scorer selecting

* quant lib version up

* are you happy fmt

* are you happy fmt

* are you happy clippy

* add save/load test for simple storage

* add comments

* quantiles

* quantization mmap

* remove f32

* mmap test

* fix mmap slice

* fix mmap test

* use chunks for quantization storage

* fix build

* are you happy fmt

* update quantization library

* update quantization lib

* update quantization lib

* integrate api changes

* are you happy fmt

* change quantization api

* additional checks in tests

* update quantization version

* fix unit tests

* add quantization to storage config

* use quantization for all cardinality search cases

* Integrate quantization suggestions 2 (#1520)

* review api

* wip: refactor quantization integrations

* wip: refactor quantization integrations

* wip: fmt

* include quantization into snapshot

* fmt

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-03-03 17:46:17 +01:00
Luis Cossío
c15fec2a2a feat: add "any" to "match" statements (#1466)
* feat: add "any" to "match" statements

Adds support for using "any" to match on a list of different possible values

* enable proper counting in cardinality estimation

* fmt

* upd OpenAPI

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-02-15 11:11:20 +01:00
Roman Titov
cf04b1a92b Add /cluster/recover API endpoint (#1451)
- Add required internal `raft::raw_node::RawNode::report_snapshot` calls
- Add methods to propagate `raft::raw_node::RawNode::request_snapshot` call to the consensus thread
- Add `/cluster/recover` API endpooint
- Add `test_collection_recovery.py` integration test (disabled on CI; documents current, incorrect behavior)
2023-02-15 04:19:11 +10:00
Andrey Vasnetsov
c485b96d95 RFC for 2023 roadmap (#1309)
* RFC for 2023 roadmap

* upd bage

* upd titles
2023-02-07 08:54:09 +01:00
Andrey Vasnetsov
9d6c9e49b1 remove /collections/aliases (#1440) 2023-02-07 08:43:39 +01:00