diff --git a/docs/CODE_OF_CONDUCT.md b/docs/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000000000000000000000000000000000..0925c8ae23a7b57fa36ae9c8157f688e4c6fda5c --- /dev/null +++ b/docs/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +email: andrey@vasnetsov.com. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md new file mode 100644 index 0000000000000000000000000000000000000000..10124458f2788da30df649180334f440faba0415 --- /dev/null +++ b/docs/CONTRIBUTING.md @@ -0,0 +1,49 @@ +# Contributing to Qdrant +We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's: + +- Reporting a bug +- Discussing the current state of the code +- Submitting a fix +- Proposing new features + +## We Develop with GitHub +We use github to host code, to track issues and feature requests, as well as accept pull requests. + +## We Use [GitHub Flow](https://guides.github.com/introduction/flow/index.html), So All Code Changes Happen Through Pull Requests +Pull requests are the best way to propose changes to the codebase (we use [GitHub Flow](https://docs.github.com/en/get-started/quickstart/github-flow)). We actively welcome your pull requests: + +1. Fork the repo and create your branch from `dev`. +2. If you've added code that should be tested, add tests. +3. If you've changed APIs, update the documentation and API Schema definitions (see [development docs](https://github.com/qdrant/qdrant/blob/master/docs/DEVELOPMENT.md#api-changes)) +4. Ensure the test suite passes. +5. Make sure your code lints (with cargo). +6. Issue that pull request! + +## Any contributions you make will be under the Apache License 2.0 +In short, when you submit code changes, your submissions are understood to be under the same [Apache License 2.0](https://choosealicense.com/licenses/apache-2.0/) that covers the project. Feel free to contact the maintainers if that's a concern. + +## Report bugs using GitHub's [issues](https://github.com/qdrant/qdrant/issues) +We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/qdrant/qdrant/issues/new/choose); it's that easy! + +## Write bug reports with detail, background, and sample code + +**Great Bug Reports** tend to have: + +- A quick summary and/or background +- Steps to reproduce + - Be specific! + - Give sample code if you can. +- What you expected would happen +- What actually happens +- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work) + +## Use a Consistent Coding Style + +If you are modifying Rust code, make sure it has no warnings from Cargo and follow [Rust code style](https://doc.rust-lang.org/1.0.0/style/). +The project uses [rustfmt](https://github.com/rust-lang/rustfmt) formatter. Please ensure to run it using the +```cargo +nightly fmt --all``` command. The project also use [clippy](https://github.com/rust-lang/rust-clippy) lint collection, +so please ensure running ``cargo clippy --workspace --all-features`` before submitting the PR. + +## License +By contributing, you agree that your contributions will be licensed under its Apache License 2.0. + diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md new file mode 100644 index 0000000000000000000000000000000000000000..891ea319495d7f69eccf8bb6636add76215bf64e --- /dev/null +++ b/docs/DEVELOPMENT.md @@ -0,0 +1,247 @@ + +# Developer's guide to Qdrant + + +## Build Qdrant + +### Docker 🐳 + +Build your own from source + +```bash +docker build . --tag=qdrant/qdrant +``` + +Or use latest pre-built image from [DockerHub](https://hub.docker.com/r/qdrant/qdrant) + +```bash +docker pull qdrant/qdrant +``` + +To run the container, use the command: + +```bash +docker run -p 6333:6333 qdrant/qdrant +``` + +And once you need a fine-grained setup, you can also define a storage path and custom configuration: + +```bash +docker run -p 6333:6333 \ + -v $(pwd)/path/to/data:/qdrant/storage \ + -v $(pwd)/path/to/snapshots:/qdrant/snapshots \ + -v $(pwd)/path/to/custom_config.yaml:/qdrant/config/production.yaml \ + qdrant/qdrant +``` + +* `/qdrant/storage` - is the place where Qdrant persists all your data. +Make sure to mount it as a volume, otherwise docker will drop it with the container. +- `/qdrant/snapshots` - is the place where Qdrant stores [snapshots](https://qdrant.tech/documentation/concepts/snapshots/) +* `/qdrant/config/production.yaml` - is the file with engine configuration. You can override any value from the [reference config](https://github.com/qdrant/qdrant/blob/master/config/config.yaml) + +Now Qdrant should be accessible at [localhost:6333](http://localhost:6333/). + + +### Local development +#### Linux/Debian/MacOS +To run Qdrant on local development environment you need to install below: +- Install Rust, follow: [install rust](https://www.rust-lang.org/tools/install) +- Install `rustfmt` toolchain for Rust + ```shell + rustup component add rustfmt + ``` +- Install dependencies: + ```shell + sudo apt-get update -y + sudo apt-get upgrade -y + sudo apt-get install -y curl unzip gcc-multilib \ + clang cmake jq \ + g++-9-aarch64-linux-gnu \ + gcc-9-aarch64-linux-gnu + ``` +- Install `protoc` from source + ```shell + PROTOC_VERSION=22.2 + PKG_NAME=$(uname -s | awk '{print ($1 == "Darwin") ? "osx-universal_binary" : (($1 == "Linux") ? "linux-x86_64" : "")}') + + # curl `proto` source file + curl -LO https://github.com/protocolbuffers/protobuf/releases//download/v$PROTOC_VERSION/protoc-$PROTOC_VERSION-$PKG_NAME.zip + + unzip protoc-$PROTOC_VERSION-$PKG_NAME.zip -d $HOME/.local + + export PATH="$PATH:$HOME/.local/bin" + + # remove source file if not needed + rm protoc-$PROTOC_VERSION-$PKG_NAME.zip + + # check installed `protoc` version + protoc --version + ``` +- Build and run the app + ```shell + cargo build --release --bin qdrant + + ./target/release/qdrant + ``` +- Install Python dependencies for testing + ```shell + poetry -C tests install --sync + ``` + Then you could use `poetry -C run pytest tests/openapi` and `poetry -C run pytest tests/consensus_tests` to run the tests. +- Use the web UI + + Web UI repo is [in a separate repo](https://github.com/qdrant/qdrant-web-ui), but there's a utility script to sync it to the `static` folder: + ```shell + ./tools/sync-web-ui.sh + ``` + +### Nix/NixOS +If you are using [Nix package manager](https://nixos.org/) (available for Linux and MacOS), you can run `nix-shell` in the project root to get a shell with all dependencies installed. +It includes dependencies to build Rust code as well as to run Python tests and various tools in the `./tools` directory. + +## Profiling + +There are several benchmarks implemented in Qdrant. Benchmarks are not included in CI/CD and might take some time to execute. +So the expected approach to benchmarking is to run only ones which might be affected by your changes. + +To run benchmark, use the following command inside a related sub-crate: + +```bash +cargo bench --bench name_of_benchmark +``` + +In this case you will see the execution timings and, if you launched this bench earlier, the difference in execution time. + +Example output: + +``` +scoring-vector/basic-score-point + time: [111.81 us 112.07 us 112.31 us] + change: [+19.567% +20.454% +21.404%] (p = 0.00 < 0.05) + Performance has regressed. +Found 9 outliers among 100 measurements (9.00%) + 3 (3.00%) low severe + 3 (3.00%) low mild + 2 (2.00%) high mild + 1 (1.00%) high severe +scoring-vector/basic-score-point-10x + time: [111.86 us 112.44 us 113.04 us] + change: [-1.6120% -0.5554% +0.5103%] (p = 0.32 > 0.05) + No change in performance detected. +Found 1 outliers among 100 measurements (1.00%) + 1 (1.00%) high mild +``` + + +### FlameGraph and call-graph visualisation +To run benchmarks with profiler to generate FlameGraph - use the following command: + +```bash +cargo bench --bench name_of_benchmark -- --profile-time=60 +``` + +This command will run each benchmark iterator for `60` seconds and generate FlameGraph svg along with profiling records files. +These records could later be used to generate visualisation of the call-graph. + +![FlameGraph example](./imgs/flamegraph-profile.png) + +Use [pprof](https://github.com/google/pprof) and the following command to generate `svg` with a call graph: + +```bash +~/go/bin/pprof -output=profile.svg -svg ${qdrant_root}/target/criterion/${benchmark_name}/${function_name}/profile/profile.pb +``` + +![call-graph example](./imgs/call-graph-profile.png) + +### Real-time profiling + +Qdrant have basic [`tracing`] support with [`Tracy`] profiler and [`tokio-console`] integrations +that can be enabled with optional features. + +- [`tracing`] is an _optional_ dependency that can be enabled with `tracing` feature +- `tracy` feature enables [`Tracy`] profiler integration +- `console` feature enables [`tokio-console`] integration + - note, that you'll also have to [pass `--cfg tokio_unstable` arguments to `rustc`][tokio-tracing] to enable this feature + - by default [`tokio-console`] binds to `127.0.0.1:6669` + - if you want to connect [`tokio-console`] to Qdrant instance running inside a Docker container + or on remote server, you can define `TOKIO_CONSOLE_BIND` when running Qdrant to override it + (e.g., `TOKIO_CONSOLE_BIND=0.0.0.0:6669` to listen on all interfaces) +- `tokio-tracing` feature explicitly enables [`Tokio` crate tracing][tokio-tracing] + - note, that you'll also have to [pass `--cfg tokio_unstable` arguments to `rustc`][tokio-tracing] to enable this feature + - this is required (and enabled automatically) by the `console` feature + - but you can enable it explicitly with the `tracy` feature, to see Tokio traces in [`Tracy`] profiler + +Qdrant code is **not** instrumented by default, so you'll have to manually add `#[tracing::instrument]` attributes +on functions and methods that you want to profile. + +Qdrant uses [`tracing-log`] as the [`log`] backend, so `log` and `log-always` features of the [`tracing`] crate +[should _not_ be enabled][tracing-log-warning]! + +```rust +// `tracing` crate is an *optional* dependency in `lib/*` crates, so if you want the code to compile +// when `tracing` feature is disabled, you have to use `#[cfg_attr(...)]`... +// +// See https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute +#[cfg_attr(feature = "tracing", tracing::instrument)] +fn my_function(some_parameter: String) { + // ... +} + +// ...or if you just want to do some quick-and-dirty profiling, you can use `#[tracing::instrument]` +// directly, just don't forget to add `--features tracing` when running `cargo` (or add `tracing` +// to default features in `Cargo.toml`) +#[tracing::instrument] +fn some_other_function() { + // ... +} +``` + +[`tracing`]: https://docs.rs/tracing/latest/tracing/ +[`Tracy`]: https://github.com/wolfpld/tracy +[`tokio-console`]: https://docs.rs/tokio-console/latest/tokio_console/ +[tokio-tracing]: https://docs.rs/tokio/latest/tokio/#unstable-features +[`tracing-log`]: https://docs.rs/tracing-log/latest/tracing_log/ +[`log`]: https://docs.rs/log/latest/log/ +[tracing-log-warning]: https://docs.rs/tracing-log/latest/tracing_log/#caution-mixing-both-conversions + +## API changes + +### REST + +Qdrant uses the [openapi](https://spec.openapis.org/oas/latest.html) specification to document its API. + +This means changes to the API must be followed by changes to the specification. +This is enforced by CI. + +Here is a quick step-by-step guide: + +1. code endpoints and model in Rust +2. change specs in `/openapi/*ytt.yaml` +3. add new schema definitions to `src/schema_generator.rs` +4. run `./tools/generate_openapi_models.sh` to generate specs +5. update integration tests `tests/openapi` and run them with `pytest tests/openapi` (use poetry or nix to get `pytest`) +6. expose file by starting an HTTP server, for instance `python -m http.server`, in `/docs/redoc` +7. validate specs by browsing redoc on `http://localhost:8000/?v=master` +8. validate `openapi-merged.yaml` using [swagger editor](https://editor.swagger.io/) + +### gRPC + +Qdrant uses [tonic](https://github.com/hyperium/tonic) to serve gRPC traffic. + +Our protocol buffers are defined in `lib/api/src/grpc/proto/*.proto` + +1. define request and response types using protocol buffers (use [oneOf](https://developers.google.com/protocol-buffers/docs/proto3#oneof) for enums payloads) +2. specify RPC methods inside the service definition using protocol buffers +3. `cargo build` will generate the struct definitions and a service trait +4. implement the service trait in Rust +5. start server `cargo run --bin qdrant` +6. run integration test `./tests/basic_grpc_test.sh` +7. generate docs `./tools/generate_grpc_docs.sh` + +Here is a good [tonic tutorial](https://github.com/hyperium/tonic/blob/master/examples/routeguide-tutorial.md#defining-the-service) for reference. + +### System integration + +On top of the API definitions, Qdrant has a few system integrations that need to be considered when making changes: +1. add new endpoints to the metrics allow lists in `src/common/metrics.rs` +2. test the JWT integration in `tests/auth_tests` \ No newline at end of file diff --git a/docs/QUICK_START.md b/docs/QUICK_START.md new file mode 100644 index 0000000000000000000000000000000000000000..4454405f2a217b02e2f1c7d2c66cc73c8e502be5 --- /dev/null +++ b/docs/QUICK_START.md @@ -0,0 +1,209 @@ +# Quick Start + +This example covers the most basic use-case - collection creation and basic vector search. +For additional information please refer to the [API documentation](https://api.qdrant.tech/). + +## Docker 🐳 + +Use latest pre-built image from [DockerHub](https://hub.docker.com/r/qdrant/qdrant) + +```bash +docker pull qdrant/qdrant +``` + +Run it with default configuration: + +```bash +docker run -p 6333:6333 qdrant/qdrant +``` + +Build your own from source + +```bash +docker build . --tag=qdrant/qdrant +``` + +And once you need a fine-grained setup, you can also define a storage path and custom configuration: + +```bash +docker run -p 6333:6333 \ + -v $(pwd)/path/to/data:/qdrant/storage \ + -v $(pwd)/path/to/snapshots:/qdrant/snapshots \ + -v $(pwd)/path/to/custom_config.yaml:/qdrant/config/production.yaml \ + qdrant/qdrant +``` + +- `/qdrant/storage` - is the place where Qdrant persists all your data. + Make sure to mount it as a volume, otherwise docker will drop it with the container. +- `/qdrant/snapshots` - is the place where Qdrant stores [snapshots](https://qdrant.tech/documentation/concepts/snapshots/) +- `/qdrant/config/production.yaml` - is the file with engine configuration. You can override any value from the [reference config](https://github.com/qdrant/qdrant/blob/master/config/config.yaml). In a real production environment, you should enable authentication by setting `service.apiKey`. +- For production environments, consider also setting [`--read-only`](https://docs.docker.com/reference/cli/docker/container/run/#read-only) and `--user=1000:2000` to further secure your Qdrant instance. Or use [our Helm chart](https://github.com/qdrant/qdrant-helm) or [Qdrant Cloud](https://qdrant.tech/documentation/cloud/) which sets these by default. + +Now Qdrant should be accessible at [localhost:6333](http://localhost:6333/). + +## Create collection + +First - let's create a collection with dot-production metric. + +```bash +curl -X PUT 'http://localhost:6333/collections/test_collection' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "vectors": { + "size": 4, + "distance": "Dot" + } + }' +``` + +Expected response: + +```json +{ + "result": true, + "status": "ok", + "time": 0.031095451 +} +``` + +We can ensure that collection was created: + +```bash +curl 'http://localhost:6333/collections/test_collection' +``` + +Expected response: + +```json +{ + "result": { + "status": "green", + "vectors_count": 0, + "segments_count": 5, + "disk_data_size": 0, + "ram_data_size": 0, + "config": { + "params": { + "vectors": { + "size": 4, + "distance": "Dot" + } + }, + "hnsw_config": { + "m": 16, + "ef_construct": 100, + "full_scan_threshold": 10000 + }, + "optimizer_config": { + "deleted_threshold": 0.2, + "vacuum_min_vector_number": 1000, + "default_segment_number": 2, + "max_segment_size": null, + "memmap_threshold": null, + "indexing_threshold": 20000, + "flush_interval_sec": 5, + "max_optimization_threads": null + }, + "wal_config": { + "wal_capacity_mb": 32, + "wal_segments_ahead": 0 + } + } + }, + "status": "ok", + "time": 2.1199e-5 +} +``` + +## Add points + +Let's now add vectors with some payload: + +```bash +curl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "points": [ + {"id": 1, "vector": [0.05, 0.61, 0.76, 0.74], "payload": {"city": "Berlin"}}, + {"id": 2, "vector": [0.19, 0.81, 0.75, 0.11], "payload": {"city": ["Berlin", "London"] }}, + {"id": 3, "vector": [0.36, 0.55, 0.47, 0.94], "payload": {"city": ["Berlin", "Moscow"] }}, + {"id": 4, "vector": [0.18, 0.01, 0.85, 0.80], "payload": {"city": ["London", "Moscow"] }}, + {"id": 5, "vector": [0.24, 0.18, 0.22, 0.44], "payload": {"count": [0] }}, + {"id": 6, "vector": [0.35, 0.08, 0.11, 0.44]} + ] + }' +``` + +Expected response: + +```json +{ + "result": { + "operation_id": 0, + "status": "completed" + }, + "status": "ok", + "time": 0.000206061 +} +``` + +## Search with filtering + +Let's start with a basic request: + +```bash +curl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "vector": [0.2,0.1,0.9,0.7], + "top": 3 + }' +``` + +Expected response: + +```json +{ + "result": [ + { "id": 4, "score": 1.362, "payload": null, "version": 0 }, + { "id": 1, "score": 1.273, "payload": null, "version": 0 }, + { "id": 3, "score": 1.208, "payload": null, "version": 0 } + ], + "status": "ok", + "time": 0.000055785 +} +``` + +But result is different if we add a filter: + +```bash +curl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "filter": { + "should": [ + { + "key": "city", + "match": { + "value": "London" + } + } + ] + }, + "vector": [0.2, 0.1, 0.9, 0.7], + "top": 3 + }' +``` + +Expected response: + +```json +{ + "result": [ + { "id": 4, "score": 1.362 }, + { "id": 2, "score": 0.871 } + ], + "status": "ok", + "time": 0.000093972 +} +``` diff --git a/docs/grpc/docs.md b/docs/grpc/docs.md new file mode 100644 index 0000000000000000000000000000000000000000..93c5ad694ff17d5fc3fe894b3607ec606aaaff41 --- /dev/null +++ b/docs/grpc/docs.md @@ -0,0 +1,5132 @@ +# Protocol Documentation + + +## Table of Contents + +- [collections.proto](#collections-proto) + - [AbortShardTransfer](#qdrant-AbortShardTransfer) + - [AliasDescription](#qdrant-AliasDescription) + - [AliasOperations](#qdrant-AliasOperations) + - [BinaryQuantization](#qdrant-BinaryQuantization) + - [BoolIndexParams](#qdrant-BoolIndexParams) + - [ChangeAliases](#qdrant-ChangeAliases) + - [CollectionClusterInfoRequest](#qdrant-CollectionClusterInfoRequest) + - [CollectionClusterInfoResponse](#qdrant-CollectionClusterInfoResponse) + - [CollectionConfig](#qdrant-CollectionConfig) + - [CollectionDescription](#qdrant-CollectionDescription) + - [CollectionExists](#qdrant-CollectionExists) + - [CollectionExistsRequest](#qdrant-CollectionExistsRequest) + - [CollectionExistsResponse](#qdrant-CollectionExistsResponse) + - [CollectionInfo](#qdrant-CollectionInfo) + - [CollectionInfo.PayloadSchemaEntry](#qdrant-CollectionInfo-PayloadSchemaEntry) + - [CollectionOperationResponse](#qdrant-CollectionOperationResponse) + - [CollectionParams](#qdrant-CollectionParams) + - [CollectionParamsDiff](#qdrant-CollectionParamsDiff) + - [CreateAlias](#qdrant-CreateAlias) + - [CreateCollection](#qdrant-CreateCollection) + - [CreateShardKey](#qdrant-CreateShardKey) + - [CreateShardKeyRequest](#qdrant-CreateShardKeyRequest) + - [CreateShardKeyResponse](#qdrant-CreateShardKeyResponse) + - [DatetimeIndexParams](#qdrant-DatetimeIndexParams) + - [DeleteAlias](#qdrant-DeleteAlias) + - [DeleteCollection](#qdrant-DeleteCollection) + - [DeleteShardKey](#qdrant-DeleteShardKey) + - [DeleteShardKeyRequest](#qdrant-DeleteShardKeyRequest) + - [DeleteShardKeyResponse](#qdrant-DeleteShardKeyResponse) + - [Disabled](#qdrant-Disabled) + - [FloatIndexParams](#qdrant-FloatIndexParams) + - [GeoIndexParams](#qdrant-GeoIndexParams) + - [GetCollectionInfoRequest](#qdrant-GetCollectionInfoRequest) + - [GetCollectionInfoResponse](#qdrant-GetCollectionInfoResponse) + - [HnswConfigDiff](#qdrant-HnswConfigDiff) + - [IntegerIndexParams](#qdrant-IntegerIndexParams) + - [KeywordIndexParams](#qdrant-KeywordIndexParams) + - [ListAliasesRequest](#qdrant-ListAliasesRequest) + - [ListAliasesResponse](#qdrant-ListAliasesResponse) + - [ListCollectionAliasesRequest](#qdrant-ListCollectionAliasesRequest) + - [ListCollectionsRequest](#qdrant-ListCollectionsRequest) + - [ListCollectionsResponse](#qdrant-ListCollectionsResponse) + - [LocalShardInfo](#qdrant-LocalShardInfo) + - [MoveShard](#qdrant-MoveShard) + - [MultiVectorConfig](#qdrant-MultiVectorConfig) + - [OptimizerStatus](#qdrant-OptimizerStatus) + - [OptimizersConfigDiff](#qdrant-OptimizersConfigDiff) + - [PayloadIndexParams](#qdrant-PayloadIndexParams) + - [PayloadSchemaInfo](#qdrant-PayloadSchemaInfo) + - [ProductQuantization](#qdrant-ProductQuantization) + - [QuantizationConfig](#qdrant-QuantizationConfig) + - [QuantizationConfigDiff](#qdrant-QuantizationConfigDiff) + - [RemoteShardInfo](#qdrant-RemoteShardInfo) + - [RenameAlias](#qdrant-RenameAlias) + - [Replica](#qdrant-Replica) + - [ReplicateShard](#qdrant-ReplicateShard) + - [ReshardingInfo](#qdrant-ReshardingInfo) + - [RestartTransfer](#qdrant-RestartTransfer) + - [ScalarQuantization](#qdrant-ScalarQuantization) + - [ShardKey](#qdrant-ShardKey) + - [ShardTransferInfo](#qdrant-ShardTransferInfo) + - [SparseIndexConfig](#qdrant-SparseIndexConfig) + - [SparseVectorConfig](#qdrant-SparseVectorConfig) + - [SparseVectorConfig.MapEntry](#qdrant-SparseVectorConfig-MapEntry) + - [SparseVectorParams](#qdrant-SparseVectorParams) + - [StrictModeConfig](#qdrant-StrictModeConfig) + - [TextIndexParams](#qdrant-TextIndexParams) + - [UpdateCollection](#qdrant-UpdateCollection) + - [UpdateCollectionClusterSetupRequest](#qdrant-UpdateCollectionClusterSetupRequest) + - [UpdateCollectionClusterSetupResponse](#qdrant-UpdateCollectionClusterSetupResponse) + - [UuidIndexParams](#qdrant-UuidIndexParams) + - [VectorParams](#qdrant-VectorParams) + - [VectorParamsDiff](#qdrant-VectorParamsDiff) + - [VectorParamsDiffMap](#qdrant-VectorParamsDiffMap) + - [VectorParamsDiffMap.MapEntry](#qdrant-VectorParamsDiffMap-MapEntry) + - [VectorParamsMap](#qdrant-VectorParamsMap) + - [VectorParamsMap.MapEntry](#qdrant-VectorParamsMap-MapEntry) + - [VectorsConfig](#qdrant-VectorsConfig) + - [VectorsConfigDiff](#qdrant-VectorsConfigDiff) + - [WalConfigDiff](#qdrant-WalConfigDiff) + + - [CollectionStatus](#qdrant-CollectionStatus) + - [CompressionRatio](#qdrant-CompressionRatio) + - [Datatype](#qdrant-Datatype) + - [Distance](#qdrant-Distance) + - [Modifier](#qdrant-Modifier) + - [MultiVectorComparator](#qdrant-MultiVectorComparator) + - [PayloadSchemaType](#qdrant-PayloadSchemaType) + - [QuantizationType](#qdrant-QuantizationType) + - [ReplicaState](#qdrant-ReplicaState) + - [ShardTransferMethod](#qdrant-ShardTransferMethod) + - [ShardingMethod](#qdrant-ShardingMethod) + - [TokenizerType](#qdrant-TokenizerType) + +- [collections_service.proto](#collections_service-proto) + - [Collections](#qdrant-Collections) + +- [health_check.proto](#health_check-proto) + - [HealthCheckRequest](#grpc-health-v1-HealthCheckRequest) + - [HealthCheckResponse](#grpc-health-v1-HealthCheckResponse) + + - [HealthCheckResponse.ServingStatus](#grpc-health-v1-HealthCheckResponse-ServingStatus) + + - [Health](#grpc-health-v1-Health) + +- [json_with_int.proto](#json_with_int-proto) + - [ListValue](#qdrant-ListValue) + - [Struct](#qdrant-Struct) + - [Struct.FieldsEntry](#qdrant-Struct-FieldsEntry) + - [Value](#qdrant-Value) + + - [NullValue](#qdrant-NullValue) + +- [points.proto](#points-proto) + - [BatchResult](#qdrant-BatchResult) + - [ClearPayloadPoints](#qdrant-ClearPayloadPoints) + - [Condition](#qdrant-Condition) + - [ContextExamplePair](#qdrant-ContextExamplePair) + - [ContextInput](#qdrant-ContextInput) + - [ContextInputPair](#qdrant-ContextInputPair) + - [CountPoints](#qdrant-CountPoints) + - [CountResponse](#qdrant-CountResponse) + - [CountResult](#qdrant-CountResult) + - [CreateFieldIndexCollection](#qdrant-CreateFieldIndexCollection) + - [DatetimeRange](#qdrant-DatetimeRange) + - [DeleteFieldIndexCollection](#qdrant-DeleteFieldIndexCollection) + - [DeletePayloadPoints](#qdrant-DeletePayloadPoints) + - [DeletePointVectors](#qdrant-DeletePointVectors) + - [DeletePoints](#qdrant-DeletePoints) + - [DenseVector](#qdrant-DenseVector) + - [DiscoverBatchPoints](#qdrant-DiscoverBatchPoints) + - [DiscoverBatchResponse](#qdrant-DiscoverBatchResponse) + - [DiscoverInput](#qdrant-DiscoverInput) + - [DiscoverPoints](#qdrant-DiscoverPoints) + - [DiscoverResponse](#qdrant-DiscoverResponse) + - [Document](#qdrant-Document) + - [Document.OptionsEntry](#qdrant-Document-OptionsEntry) + - [FacetCounts](#qdrant-FacetCounts) + - [FacetHit](#qdrant-FacetHit) + - [FacetResponse](#qdrant-FacetResponse) + - [FacetValue](#qdrant-FacetValue) + - [FieldCondition](#qdrant-FieldCondition) + - [Filter](#qdrant-Filter) + - [GeoBoundingBox](#qdrant-GeoBoundingBox) + - [GeoLineString](#qdrant-GeoLineString) + - [GeoPoint](#qdrant-GeoPoint) + - [GeoPolygon](#qdrant-GeoPolygon) + - [GeoRadius](#qdrant-GeoRadius) + - [GetPoints](#qdrant-GetPoints) + - [GetResponse](#qdrant-GetResponse) + - [GroupId](#qdrant-GroupId) + - [GroupsResult](#qdrant-GroupsResult) + - [HardwareUsage](#qdrant-HardwareUsage) + - [HasIdCondition](#qdrant-HasIdCondition) + - [HasVectorCondition](#qdrant-HasVectorCondition) + - [Image](#qdrant-Image) + - [Image.OptionsEntry](#qdrant-Image-OptionsEntry) + - [InferenceObject](#qdrant-InferenceObject) + - [InferenceObject.OptionsEntry](#qdrant-InferenceObject-OptionsEntry) + - [IsEmptyCondition](#qdrant-IsEmptyCondition) + - [IsNullCondition](#qdrant-IsNullCondition) + - [LookupLocation](#qdrant-LookupLocation) + - [Match](#qdrant-Match) + - [MinShould](#qdrant-MinShould) + - [MultiDenseVector](#qdrant-MultiDenseVector) + - [NamedVectors](#qdrant-NamedVectors) + - [NamedVectors.VectorsEntry](#qdrant-NamedVectors-VectorsEntry) + - [NamedVectorsOutput](#qdrant-NamedVectorsOutput) + - [NamedVectorsOutput.VectorsEntry](#qdrant-NamedVectorsOutput-VectorsEntry) + - [NestedCondition](#qdrant-NestedCondition) + - [OrderBy](#qdrant-OrderBy) + - [OrderValue](#qdrant-OrderValue) + - [PayloadExcludeSelector](#qdrant-PayloadExcludeSelector) + - [PayloadIncludeSelector](#qdrant-PayloadIncludeSelector) + - [PointGroup](#qdrant-PointGroup) + - [PointId](#qdrant-PointId) + - [PointStruct](#qdrant-PointStruct) + - [PointStruct.PayloadEntry](#qdrant-PointStruct-PayloadEntry) + - [PointVectors](#qdrant-PointVectors) + - [PointsIdsList](#qdrant-PointsIdsList) + - [PointsOperationResponse](#qdrant-PointsOperationResponse) + - [PointsSelector](#qdrant-PointsSelector) + - [PointsUpdateOperation](#qdrant-PointsUpdateOperation) + - [PointsUpdateOperation.ClearPayload](#qdrant-PointsUpdateOperation-ClearPayload) + - [PointsUpdateOperation.DeletePayload](#qdrant-PointsUpdateOperation-DeletePayload) + - [PointsUpdateOperation.DeletePoints](#qdrant-PointsUpdateOperation-DeletePoints) + - [PointsUpdateOperation.DeleteVectors](#qdrant-PointsUpdateOperation-DeleteVectors) + - [PointsUpdateOperation.OverwritePayload](#qdrant-PointsUpdateOperation-OverwritePayload) + - [PointsUpdateOperation.OverwritePayload.PayloadEntry](#qdrant-PointsUpdateOperation-OverwritePayload-PayloadEntry) + - [PointsUpdateOperation.PointStructList](#qdrant-PointsUpdateOperation-PointStructList) + - [PointsUpdateOperation.SetPayload](#qdrant-PointsUpdateOperation-SetPayload) + - [PointsUpdateOperation.SetPayload.PayloadEntry](#qdrant-PointsUpdateOperation-SetPayload-PayloadEntry) + - [PointsUpdateOperation.UpdateVectors](#qdrant-PointsUpdateOperation-UpdateVectors) + - [PrefetchQuery](#qdrant-PrefetchQuery) + - [QuantizationSearchParams](#qdrant-QuantizationSearchParams) + - [Query](#qdrant-Query) + - [QueryBatchPoints](#qdrant-QueryBatchPoints) + - [QueryBatchResponse](#qdrant-QueryBatchResponse) + - [QueryGroupsResponse](#qdrant-QueryGroupsResponse) + - [QueryPointGroups](#qdrant-QueryPointGroups) + - [QueryPoints](#qdrant-QueryPoints) + - [QueryResponse](#qdrant-QueryResponse) + - [Range](#qdrant-Range) + - [ReadConsistency](#qdrant-ReadConsistency) + - [RecommendBatchPoints](#qdrant-RecommendBatchPoints) + - [RecommendBatchResponse](#qdrant-RecommendBatchResponse) + - [RecommendGroupsResponse](#qdrant-RecommendGroupsResponse) + - [RecommendInput](#qdrant-RecommendInput) + - [RecommendPointGroups](#qdrant-RecommendPointGroups) + - [RecommendPoints](#qdrant-RecommendPoints) + - [RecommendResponse](#qdrant-RecommendResponse) + - [RepeatedIntegers](#qdrant-RepeatedIntegers) + - [RepeatedStrings](#qdrant-RepeatedStrings) + - [RetrievedPoint](#qdrant-RetrievedPoint) + - [RetrievedPoint.PayloadEntry](#qdrant-RetrievedPoint-PayloadEntry) + - [ScoredPoint](#qdrant-ScoredPoint) + - [ScoredPoint.PayloadEntry](#qdrant-ScoredPoint-PayloadEntry) + - [ScrollPoints](#qdrant-ScrollPoints) + - [ScrollResponse](#qdrant-ScrollResponse) + - [SearchBatchPoints](#qdrant-SearchBatchPoints) + - [SearchBatchResponse](#qdrant-SearchBatchResponse) + - [SearchGroupsResponse](#qdrant-SearchGroupsResponse) + - [SearchMatrixOffsets](#qdrant-SearchMatrixOffsets) + - [SearchMatrixOffsetsResponse](#qdrant-SearchMatrixOffsetsResponse) + - [SearchMatrixPair](#qdrant-SearchMatrixPair) + - [SearchMatrixPairs](#qdrant-SearchMatrixPairs) + - [SearchMatrixPairsResponse](#qdrant-SearchMatrixPairsResponse) + - [SearchMatrixPoints](#qdrant-SearchMatrixPoints) + - [SearchParams](#qdrant-SearchParams) + - [SearchPointGroups](#qdrant-SearchPointGroups) + - [SearchPoints](#qdrant-SearchPoints) + - [SearchResponse](#qdrant-SearchResponse) + - [SetPayloadPoints](#qdrant-SetPayloadPoints) + - [SetPayloadPoints.PayloadEntry](#qdrant-SetPayloadPoints-PayloadEntry) + - [ShardKeySelector](#qdrant-ShardKeySelector) + - [SparseIndices](#qdrant-SparseIndices) + - [SparseVector](#qdrant-SparseVector) + - [StartFrom](#qdrant-StartFrom) + - [TargetVector](#qdrant-TargetVector) + - [UpdateBatchPoints](#qdrant-UpdateBatchPoints) + - [UpdateBatchResponse](#qdrant-UpdateBatchResponse) + - [UpdatePointVectors](#qdrant-UpdatePointVectors) + - [UpdateResult](#qdrant-UpdateResult) + - [UpsertPoints](#qdrant-UpsertPoints) + - [ValuesCount](#qdrant-ValuesCount) + - [Vector](#qdrant-Vector) + - [VectorExample](#qdrant-VectorExample) + - [VectorInput](#qdrant-VectorInput) + - [VectorOutput](#qdrant-VectorOutput) + - [Vectors](#qdrant-Vectors) + - [VectorsOutput](#qdrant-VectorsOutput) + - [VectorsSelector](#qdrant-VectorsSelector) + - [WithLookup](#qdrant-WithLookup) + - [WithPayloadSelector](#qdrant-WithPayloadSelector) + - [WithVectorsSelector](#qdrant-WithVectorsSelector) + - [WriteOrdering](#qdrant-WriteOrdering) + + - [Direction](#qdrant-Direction) + - [FieldType](#qdrant-FieldType) + - [Fusion](#qdrant-Fusion) + - [ReadConsistencyType](#qdrant-ReadConsistencyType) + - [RecommendStrategy](#qdrant-RecommendStrategy) + - [Sample](#qdrant-Sample) + - [UpdateStatus](#qdrant-UpdateStatus) + - [WriteOrderingType](#qdrant-WriteOrderingType) + +- [points_service.proto](#points_service-proto) + - [Points](#qdrant-Points) + +- [qdrant.proto](#qdrant-proto) + - [HealthCheckReply](#qdrant-HealthCheckReply) + - [HealthCheckRequest](#qdrant-HealthCheckRequest) + + - [Qdrant](#qdrant-Qdrant) + +- [qdrant_internal_service.proto](#qdrant_internal_service-proto) + - [GetConsensusCommitRequest](#qdrant-GetConsensusCommitRequest) + - [GetConsensusCommitResponse](#qdrant-GetConsensusCommitResponse) + - [WaitOnConsensusCommitRequest](#qdrant-WaitOnConsensusCommitRequest) + - [WaitOnConsensusCommitResponse](#qdrant-WaitOnConsensusCommitResponse) + + - [QdrantInternal](#qdrant-QdrantInternal) + +- [snapshots_service.proto](#snapshots_service-proto) + - [CreateFullSnapshotRequest](#qdrant-CreateFullSnapshotRequest) + - [CreateSnapshotRequest](#qdrant-CreateSnapshotRequest) + - [CreateSnapshotResponse](#qdrant-CreateSnapshotResponse) + - [DeleteFullSnapshotRequest](#qdrant-DeleteFullSnapshotRequest) + - [DeleteSnapshotRequest](#qdrant-DeleteSnapshotRequest) + - [DeleteSnapshotResponse](#qdrant-DeleteSnapshotResponse) + - [ListFullSnapshotsRequest](#qdrant-ListFullSnapshotsRequest) + - [ListSnapshotsRequest](#qdrant-ListSnapshotsRequest) + - [ListSnapshotsResponse](#qdrant-ListSnapshotsResponse) + - [SnapshotDescription](#qdrant-SnapshotDescription) + + - [Snapshots](#qdrant-Snapshots) + +- [Scalar Value Types](#scalar-value-types) + + + + +

Top

+ +## collections.proto + + + + + +### AbortShardTransfer + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| shard_id | [uint32](#uint32) | | Local shard id | +| to_shard_id | [uint32](#uint32) | optional | | +| from_peer_id | [uint64](#uint64) | | | +| to_peer_id | [uint64](#uint64) | | | + + + + + + + + +### AliasDescription + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| alias_name | [string](#string) | | Name of the alias | +| collection_name | [string](#string) | | Name of the collection | + + + + + + + + +### AliasOperations + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| create_alias | [CreateAlias](#qdrant-CreateAlias) | | | +| rename_alias | [RenameAlias](#qdrant-RenameAlias) | | | +| delete_alias | [DeleteAlias](#qdrant-DeleteAlias) | | | + + + + + + + + +### BinaryQuantization + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| always_ram | [bool](#bool) | optional | If true - quantized vectors always will be stored in RAM, ignoring the config of main storage | + + + + + + + + +### BoolIndexParams + + + + + + + + + +### ChangeAliases + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| actions | [AliasOperations](#qdrant-AliasOperations) | repeated | List of actions | +| timeout | [uint64](#uint64) | optional | Wait timeout for operation commit in seconds, if not specified - default value will be supplied | + + + + + + + + +### CollectionClusterInfoRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | Name of the collection | + + + + + + + + +### CollectionClusterInfoResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| peer_id | [uint64](#uint64) | | ID of this peer | +| shard_count | [uint64](#uint64) | | Total number of shards | +| local_shards | [LocalShardInfo](#qdrant-LocalShardInfo) | repeated | Local shards | +| remote_shards | [RemoteShardInfo](#qdrant-RemoteShardInfo) | repeated | Remote shards | +| shard_transfers | [ShardTransferInfo](#qdrant-ShardTransferInfo) | repeated | Shard transfers | + + + + + + + + +### CollectionConfig + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| params | [CollectionParams](#qdrant-CollectionParams) | | Collection parameters | +| hnsw_config | [HnswConfigDiff](#qdrant-HnswConfigDiff) | | Configuration of vector index | +| optimizer_config | [OptimizersConfigDiff](#qdrant-OptimizersConfigDiff) | | Configuration of the optimizers | +| wal_config | [WalConfigDiff](#qdrant-WalConfigDiff) | | Configuration of the Write-Ahead-Log | +| quantization_config | [QuantizationConfig](#qdrant-QuantizationConfig) | optional | Configuration of the vector quantization | +| strict_mode_config | [StrictModeConfig](#qdrant-StrictModeConfig) | optional | Configuration of strict mode. | + + + + + + + + +### CollectionDescription + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| name | [string](#string) | | Name of the collection | + + + + + + + + +### CollectionExists + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| exists | [bool](#bool) | | | + + + + + + + + +### CollectionExistsRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | | + + + + + + + + +### CollectionExistsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [CollectionExists](#qdrant-CollectionExists) | | | +| time | [double](#double) | | Time spent to process | + + + + + + + + +### CollectionInfo + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| status | [CollectionStatus](#qdrant-CollectionStatus) | | operating condition of the collection | +| optimizer_status | [OptimizerStatus](#qdrant-OptimizerStatus) | | status of collection optimizers | +| vectors_count | [uint64](#uint64) | optional | Approximate number of vectors in the collection | +| segments_count | [uint64](#uint64) | | Number of independent segments | +| config | [CollectionConfig](#qdrant-CollectionConfig) | | Configuration | +| payload_schema | [CollectionInfo.PayloadSchemaEntry](#qdrant-CollectionInfo-PayloadSchemaEntry) | repeated | Collection data types | +| points_count | [uint64](#uint64) | optional | Approximate number of points in the collection | +| indexed_vectors_count | [uint64](#uint64) | optional | Approximate number of indexed vectors in the collection. | + + + + + + + + +### CollectionInfo.PayloadSchemaEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [PayloadSchemaInfo](#qdrant-PayloadSchemaInfo) | | | + + + + + + + + +### CollectionOperationResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [bool](#bool) | | if operation made changes | +| time | [double](#double) | | Time spent to process | + + + + + + + + +### CollectionParams + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| shard_number | [uint32](#uint32) | | Number of shards in collection | +| on_disk_payload | [bool](#bool) | | If true - point's payload will not be stored in memory | +| vectors_config | [VectorsConfig](#qdrant-VectorsConfig) | optional | Configuration for vectors | +| replication_factor | [uint32](#uint32) | optional | Number of replicas of each shard that network tries to maintain | +| write_consistency_factor | [uint32](#uint32) | optional | How many replicas should apply the operation for us to consider it successful | +| read_fan_out_factor | [uint32](#uint32) | optional | Fan-out every read request to these many additional remote nodes (and return first available response) | +| sharding_method | [ShardingMethod](#qdrant-ShardingMethod) | optional | Sharding method | +| sparse_vectors_config | [SparseVectorConfig](#qdrant-SparseVectorConfig) | optional | Configuration for sparse vectors | + + + + + + + + +### CollectionParamsDiff + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| replication_factor | [uint32](#uint32) | optional | Number of replicas of each shard that network tries to maintain | +| write_consistency_factor | [uint32](#uint32) | optional | How many replicas should apply the operation for us to consider it successful | +| on_disk_payload | [bool](#bool) | optional | If true - point's payload will not be stored in memory | +| read_fan_out_factor | [uint32](#uint32) | optional | Fan-out every read request to these many additional remote nodes (and return first available response) | + + + + + + + + +### CreateAlias + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | Name of the collection | +| alias_name | [string](#string) | | New name of the alias | + + + + + + + + +### CreateCollection + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | Name of the collection | +| hnsw_config | [HnswConfigDiff](#qdrant-HnswConfigDiff) | optional | Configuration of vector index | +| wal_config | [WalConfigDiff](#qdrant-WalConfigDiff) | optional | Configuration of the Write-Ahead-Log | +| optimizers_config | [OptimizersConfigDiff](#qdrant-OptimizersConfigDiff) | optional | Configuration of the optimizers | +| shard_number | [uint32](#uint32) | optional | Number of shards in the collection, default is 1 for standalone, otherwise equal to the number of nodes. Minimum is 1 | +| on_disk_payload | [bool](#bool) | optional | If true - point's payload will not be stored in memory | +| timeout | [uint64](#uint64) | optional | Wait timeout for operation commit in seconds, if not specified - default value will be supplied | +| vectors_config | [VectorsConfig](#qdrant-VectorsConfig) | optional | Configuration for vectors | +| replication_factor | [uint32](#uint32) | optional | Number of replicas of each shard that network tries to maintain, default = 1 | +| write_consistency_factor | [uint32](#uint32) | optional | How many replicas should apply the operation for us to consider it successful, default = 1 | +| init_from_collection | [string](#string) | optional | Specify name of the other collection to copy data from | +| quantization_config | [QuantizationConfig](#qdrant-QuantizationConfig) | optional | Quantization configuration of vector | +| sharding_method | [ShardingMethod](#qdrant-ShardingMethod) | optional | Sharding method | +| sparse_vectors_config | [SparseVectorConfig](#qdrant-SparseVectorConfig) | optional | Configuration for sparse vectors | +| strict_mode_config | [StrictModeConfig](#qdrant-StrictModeConfig) | optional | Configuration for strict mode | + + + + + + + + +### CreateShardKey + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| shard_key | [ShardKey](#qdrant-ShardKey) | | User-defined shard key | +| shards_number | [uint32](#uint32) | optional | Number of shards to create per shard key | +| replication_factor | [uint32](#uint32) | optional | Number of replicas of each shard to create | +| placement | [uint64](#uint64) | repeated | List of peer ids, allowed to create shards. If empty - all peers are allowed | + + + + + + + + +### CreateShardKeyRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | Name of the collection | +| request | [CreateShardKey](#qdrant-CreateShardKey) | | Request to create shard key | +| timeout | [uint64](#uint64) | optional | Wait timeout for operation commit in seconds, if not specified - default value will be supplied | + + + + + + + + +### CreateShardKeyResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [bool](#bool) | | | + + + + + + + + +### DatetimeIndexParams + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| on_disk | [bool](#bool) | optional | If true - store index on disk. | +| is_principal | [bool](#bool) | optional | If true - use this key to organize storage of the collection data. This option assumes that this key will be used in majority of filtered requests. | + + + + + + + + +### DeleteAlias + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| alias_name | [string](#string) | | Name of the alias | + + + + + + + + +### DeleteCollection + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | Name of the collection | +| timeout | [uint64](#uint64) | optional | Wait timeout for operation commit in seconds, if not specified - default value will be supplied | + + + + + + + + +### DeleteShardKey + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| shard_key | [ShardKey](#qdrant-ShardKey) | | Shard key to delete | + + + + + + + + +### DeleteShardKeyRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | Name of the collection | +| request | [DeleteShardKey](#qdrant-DeleteShardKey) | | Request to delete shard key | +| timeout | [uint64](#uint64) | optional | Wait timeout for operation commit in seconds, if not specified - default value will be supplied | + + + + + + + + +### DeleteShardKeyResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [bool](#bool) | | | + + + + + + + + +### Disabled + + + + + + + + + +### FloatIndexParams + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| on_disk | [bool](#bool) | optional | If true - store index on disk. | +| is_principal | [bool](#bool) | optional | If true - use this key to organize storage of the collection data. This option assumes that this key will be used in majority of filtered requests. | + + + + + + + + +### GeoIndexParams + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| on_disk | [bool](#bool) | optional | If true - store index on disk. | + + + + + + + + +### GetCollectionInfoRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | Name of the collection | + + + + + + + + +### GetCollectionInfoResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [CollectionInfo](#qdrant-CollectionInfo) | | | +| time | [double](#double) | | Time spent to process | + + + + + + + + +### HnswConfigDiff + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| m | [uint64](#uint64) | optional | Number of edges per node in the index graph. Larger the value - more accurate the search, more space required. | +| ef_construct | [uint64](#uint64) | optional | Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build the index. | +| full_scan_threshold | [uint64](#uint64) | optional | Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If the payload chunk is smaller than `full_scan_threshold` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1 Kb = 1 vector of size 256 | +| max_indexing_threads | [uint64](#uint64) | optional | Number of parallel threads used for background index building. If 0 - automatically select from 8 to 16. Best to keep between 8 and 16 to prevent likelihood of building broken/inefficient HNSW graphs. On small CPUs, less threads are used. | +| on_disk | [bool](#bool) | optional | Store HNSW index on disk. If set to false, the index will be stored in RAM. | +| payload_m | [uint64](#uint64) | optional | Number of additional payload-aware links per node in the index graph. If not set - regular M parameter will be used. | + + + + + + + + +### IntegerIndexParams + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| lookup | [bool](#bool) | optional | If true - support direct lookups. | +| range | [bool](#bool) | optional | If true - support ranges filters. | +| is_principal | [bool](#bool) | optional | If true - use this key to organize storage of the collection data. This option assumes that this key will be used in majority of filtered requests. | +| on_disk | [bool](#bool) | optional | If true - store index on disk. | + + + + + + + + +### KeywordIndexParams + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| is_tenant | [bool](#bool) | optional | If true - used for tenant optimization. | +| on_disk | [bool](#bool) | optional | If true - store index on disk. | + + + + + + + + +### ListAliasesRequest + + + + + + + + + +### ListAliasesResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| aliases | [AliasDescription](#qdrant-AliasDescription) | repeated | | +| time | [double](#double) | | Time spent to process | + + + + + + + + +### ListCollectionAliasesRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | Name of the collection | + + + + + + + + +### ListCollectionsRequest + + + + + + + + + +### ListCollectionsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collections | [CollectionDescription](#qdrant-CollectionDescription) | repeated | | +| time | [double](#double) | | Time spent to process | + + + + + + + + +### LocalShardInfo + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| shard_id | [uint32](#uint32) | | Local shard id | +| points_count | [uint64](#uint64) | | Number of points in the shard | +| state | [ReplicaState](#qdrant-ReplicaState) | | Is replica active | +| shard_key | [ShardKey](#qdrant-ShardKey) | optional | User-defined shard key | + + + + + + + + +### MoveShard + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| shard_id | [uint32](#uint32) | | Local shard id | +| to_shard_id | [uint32](#uint32) | optional | | +| from_peer_id | [uint64](#uint64) | | | +| to_peer_id | [uint64](#uint64) | | | +| method | [ShardTransferMethod](#qdrant-ShardTransferMethod) | optional | | + + + + + + + + +### MultiVectorConfig + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| comparator | [MultiVectorComparator](#qdrant-MultiVectorComparator) | | Comparator for multi-vector search | + + + + + + + + +### OptimizerStatus + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| ok | [bool](#bool) | | | +| error | [string](#string) | | | + + + + + + + + +### OptimizersConfigDiff + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| deleted_threshold | [double](#double) | optional | The minimal fraction of deleted vectors in a segment, required to perform segment optimization | +| vacuum_min_vector_number | [uint64](#uint64) | optional | The minimal number of vectors in a segment, required to perform segment optimization | +| default_segment_number | [uint64](#uint64) | optional | Target amount of segments the optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: + +- Amount of stored points. - Current write RPS. + +It is recommended to select the default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads. | +| max_segment_size | [uint64](#uint64) | optional | Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments. + +If indexing speed is more important - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs. | +| memmap_threshold | [uint64](#uint64) | optional | Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. + +Memmap storage is disabled by default, to enable it, set this threshold to a reasonable value. + +To disable memmap storage, set this to `0`. + +Note: 1Kb = 1 vector of size 256 | +| indexing_threshold | [uint64](#uint64) | optional | Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing + +Default value is 20,000, based on <https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md>. + +To disable vector indexing, set to `0`. + +Note: 1kB = 1 vector of size 256. | +| flush_interval_sec | [uint64](#uint64) | optional | Interval between forced flushes. | +| max_optimization_threads | [uint64](#uint64) | optional | Max number of threads (jobs) for running optimizations per shard. Note: each optimization job will also use `max_indexing_threads` threads by itself for index building. If null - have no limit and choose dynamically to saturate CPU. If 0 - no optimization threads, optimizations will be disabled. | + + + + + + + + +### PayloadIndexParams + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| keyword_index_params | [KeywordIndexParams](#qdrant-KeywordIndexParams) | | Parameters for keyword index | +| integer_index_params | [IntegerIndexParams](#qdrant-IntegerIndexParams) | | Parameters for integer index | +| float_index_params | [FloatIndexParams](#qdrant-FloatIndexParams) | | Parameters for float index | +| geo_index_params | [GeoIndexParams](#qdrant-GeoIndexParams) | | Parameters for geo index | +| text_index_params | [TextIndexParams](#qdrant-TextIndexParams) | | Parameters for text index | +| bool_index_params | [BoolIndexParams](#qdrant-BoolIndexParams) | | Parameters for bool index | +| datetime_index_params | [DatetimeIndexParams](#qdrant-DatetimeIndexParams) | | Parameters for datetime index | +| uuid_index_params | [UuidIndexParams](#qdrant-UuidIndexParams) | | Parameters for uuid index | + + + + + + + + +### PayloadSchemaInfo + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| data_type | [PayloadSchemaType](#qdrant-PayloadSchemaType) | | Field data type | +| params | [PayloadIndexParams](#qdrant-PayloadIndexParams) | optional | Field index parameters | +| points | [uint64](#uint64) | optional | Number of points indexed within this field indexed | + + + + + + + + +### ProductQuantization + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| compression | [CompressionRatio](#qdrant-CompressionRatio) | | Compression ratio | +| always_ram | [bool](#bool) | optional | If true - quantized vectors always will be stored in RAM, ignoring the config of main storage | + + + + + + + + +### QuantizationConfig + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| scalar | [ScalarQuantization](#qdrant-ScalarQuantization) | | | +| product | [ProductQuantization](#qdrant-ProductQuantization) | | | +| binary | [BinaryQuantization](#qdrant-BinaryQuantization) | | | + + + + + + + + +### QuantizationConfigDiff + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| scalar | [ScalarQuantization](#qdrant-ScalarQuantization) | | | +| product | [ProductQuantization](#qdrant-ProductQuantization) | | | +| disabled | [Disabled](#qdrant-Disabled) | | | +| binary | [BinaryQuantization](#qdrant-BinaryQuantization) | | | + + + + + + + + +### RemoteShardInfo + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| shard_id | [uint32](#uint32) | | Local shard id | +| peer_id | [uint64](#uint64) | | Remote peer id | +| state | [ReplicaState](#qdrant-ReplicaState) | | Is replica active | +| shard_key | [ShardKey](#qdrant-ShardKey) | optional | User-defined shard key | + + + + + + + + +### RenameAlias + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| old_alias_name | [string](#string) | | Name of the alias to rename | +| new_alias_name | [string](#string) | | Name of the alias | + + + + + + + + +### Replica + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| shard_id | [uint32](#uint32) | | | +| peer_id | [uint64](#uint64) | | | + + + + + + + + +### ReplicateShard + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| shard_id | [uint32](#uint32) | | Local shard id | +| to_shard_id | [uint32](#uint32) | optional | | +| from_peer_id | [uint64](#uint64) | | | +| to_peer_id | [uint64](#uint64) | | | +| method | [ShardTransferMethod](#qdrant-ShardTransferMethod) | optional | | + + + + + + + + +### ReshardingInfo + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| shard_id | [uint32](#uint32) | | | +| peer_id | [uint64](#uint64) | | | +| shard_key | [ShardKey](#qdrant-ShardKey) | optional | | + + + + + + + + +### RestartTransfer + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| shard_id | [uint32](#uint32) | | Local shard id | +| to_shard_id | [uint32](#uint32) | optional | | +| from_peer_id | [uint64](#uint64) | | | +| to_peer_id | [uint64](#uint64) | | | +| method | [ShardTransferMethod](#qdrant-ShardTransferMethod) | | | + + + + + + + + +### ScalarQuantization + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| type | [QuantizationType](#qdrant-QuantizationType) | | Type of quantization | +| quantile | [float](#float) | optional | Number of bits to use for quantization | +| always_ram | [bool](#bool) | optional | If true - quantized vectors always will be stored in RAM, ignoring the config of main storage | + + + + + + + + +### ShardKey + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| keyword | [string](#string) | | String key | +| number | [uint64](#uint64) | | Number key | + + + + + + + + +### ShardTransferInfo + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| shard_id | [uint32](#uint32) | | Local shard id | +| to_shard_id | [uint32](#uint32) | optional | | +| from | [uint64](#uint64) | | | +| to | [uint64](#uint64) | | | +| sync | [bool](#bool) | | If `true` transfer is a synchronization of a replicas; If `false` transfer is a moving of a shard from one peer to another | + + + + + + + + +### SparseIndexConfig + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| full_scan_threshold | [uint64](#uint64) | optional | Prefer a full scan search upto (excluding) this number of vectors. Note: this is number of vectors, not KiloBytes. | +| on_disk | [bool](#bool) | optional | Store inverted index on disk. If set to false, the index will be stored in RAM. | +| datatype | [Datatype](#qdrant-Datatype) | optional | Datatype used to store weights in the index. | + + + + + + + + +### SparseVectorConfig + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| map | [SparseVectorConfig.MapEntry](#qdrant-SparseVectorConfig-MapEntry) | repeated | | + + + + + + + + +### SparseVectorConfig.MapEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [SparseVectorParams](#qdrant-SparseVectorParams) | | | + + + + + + + + +### SparseVectorParams + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| index | [SparseIndexConfig](#qdrant-SparseIndexConfig) | optional | Configuration of sparse index | +| modifier | [Modifier](#qdrant-Modifier) | optional | If set - apply modifier to the vector values | + + + + + + + + +### StrictModeConfig + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| enabled | [bool](#bool) | optional | | +| max_query_limit | [uint32](#uint32) | optional | | +| max_timeout | [uint32](#uint32) | optional | | +| unindexed_filtering_retrieve | [bool](#bool) | optional | | +| unindexed_filtering_update | [bool](#bool) | optional | | +| search_max_hnsw_ef | [uint32](#uint32) | optional | | +| search_allow_exact | [bool](#bool) | optional | | +| search_max_oversampling | [float](#float) | optional | | + + + + + + + + +### TextIndexParams + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| tokenizer | [TokenizerType](#qdrant-TokenizerType) | | Tokenizer type | +| lowercase | [bool](#bool) | optional | If true - all tokens will be lowercase | +| min_token_len | [uint64](#uint64) | optional | Minimal token length | +| max_token_len | [uint64](#uint64) | optional | Maximal token length | +| on_disk | [bool](#bool) | optional | If true - store index on disk. | + + + + + + + + +### UpdateCollection + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | Name of the collection | +| optimizers_config | [OptimizersConfigDiff](#qdrant-OptimizersConfigDiff) | optional | New configuration parameters for the collection. This operation is blocking, it will only proceed once all current optimizations are complete | +| timeout | [uint64](#uint64) | optional | Wait timeout for operation commit in seconds if blocking, if not specified - default value will be supplied | +| params | [CollectionParamsDiff](#qdrant-CollectionParamsDiff) | optional | New configuration parameters for the collection | +| hnsw_config | [HnswConfigDiff](#qdrant-HnswConfigDiff) | optional | New HNSW parameters for the collection index | +| vectors_config | [VectorsConfigDiff](#qdrant-VectorsConfigDiff) | optional | New vector parameters | +| quantization_config | [QuantizationConfigDiff](#qdrant-QuantizationConfigDiff) | optional | Quantization configuration of vector | +| sparse_vectors_config | [SparseVectorConfig](#qdrant-SparseVectorConfig) | optional | New sparse vector parameters | +| strict_mode_config | [StrictModeConfig](#qdrant-StrictModeConfig) | optional | New strict mode configuration | + + + + + + + + +### UpdateCollectionClusterSetupRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | Name of the collection | +| move_shard | [MoveShard](#qdrant-MoveShard) | | | +| replicate_shard | [ReplicateShard](#qdrant-ReplicateShard) | | | +| abort_transfer | [AbortShardTransfer](#qdrant-AbortShardTransfer) | | | +| drop_replica | [Replica](#qdrant-Replica) | | | +| create_shard_key | [CreateShardKey](#qdrant-CreateShardKey) | | | +| delete_shard_key | [DeleteShardKey](#qdrant-DeleteShardKey) | | | +| restart_transfer | [RestartTransfer](#qdrant-RestartTransfer) | | | +| timeout | [uint64](#uint64) | optional | Wait timeout for operation commit in seconds, if not specified - default value will be supplied | + + + + + + + + +### UpdateCollectionClusterSetupResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [bool](#bool) | | | + + + + + + + + +### UuidIndexParams + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| is_tenant | [bool](#bool) | optional | If true - used for tenant optimization. | +| on_disk | [bool](#bool) | optional | If true - store index on disk. | + + + + + + + + +### VectorParams + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| size | [uint64](#uint64) | | Size of the vectors | +| distance | [Distance](#qdrant-Distance) | | Distance function used for comparing vectors | +| hnsw_config | [HnswConfigDiff](#qdrant-HnswConfigDiff) | optional | Configuration of vector HNSW graph. If omitted - the collection configuration will be used | +| quantization_config | [QuantizationConfig](#qdrant-QuantizationConfig) | optional | Configuration of vector quantization config. If omitted - the collection configuration will be used | +| on_disk | [bool](#bool) | optional | If true - serve vectors from disk. If set to false, the vectors will be loaded in RAM. | +| datatype | [Datatype](#qdrant-Datatype) | optional | Data type of the vectors | +| multivector_config | [MultiVectorConfig](#qdrant-MultiVectorConfig) | optional | Configuration for multi-vector search | + + + + + + + + +### VectorParamsDiff + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| hnsw_config | [HnswConfigDiff](#qdrant-HnswConfigDiff) | optional | Update params for HNSW index. If empty object - it will be unset | +| quantization_config | [QuantizationConfigDiff](#qdrant-QuantizationConfigDiff) | optional | Update quantization params. If none - it is left unchanged. | +| on_disk | [bool](#bool) | optional | If true - serve vectors from disk. If set to false, the vectors will be loaded in RAM. | + + + + + + + + +### VectorParamsDiffMap + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| map | [VectorParamsDiffMap.MapEntry](#qdrant-VectorParamsDiffMap-MapEntry) | repeated | | + + + + + + + + +### VectorParamsDiffMap.MapEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [VectorParamsDiff](#qdrant-VectorParamsDiff) | | | + + + + + + + + +### VectorParamsMap + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| map | [VectorParamsMap.MapEntry](#qdrant-VectorParamsMap-MapEntry) | repeated | | + + + + + + + + +### VectorParamsMap.MapEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [VectorParams](#qdrant-VectorParams) | | | + + + + + + + + +### VectorsConfig + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| params | [VectorParams](#qdrant-VectorParams) | | | +| params_map | [VectorParamsMap](#qdrant-VectorParamsMap) | | | + + + + + + + + +### VectorsConfigDiff + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| params | [VectorParamsDiff](#qdrant-VectorParamsDiff) | | | +| params_map | [VectorParamsDiffMap](#qdrant-VectorParamsDiffMap) | | | + + + + + + + + +### WalConfigDiff + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| wal_capacity_mb | [uint64](#uint64) | optional | Size of a single WAL block file | +| wal_segments_ahead | [uint64](#uint64) | optional | Number of segments to create in advance | + + + + + + + + + + +### CollectionStatus + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| UnknownCollectionStatus | 0 | | +| Green | 1 | All segments are ready | +| Yellow | 2 | Optimization in process | +| Red | 3 | Something went wrong | +| Grey | 4 | Optimization is pending | + + + + + +### CompressionRatio + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| x4 | 0 | | +| x8 | 1 | | +| x16 | 2 | | +| x32 | 3 | | +| x64 | 4 | | + + + + + +### Datatype + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| Default | 0 | | +| Float32 | 1 | | +| Uint8 | 2 | | +| Float16 | 3 | | + + + + + +### Distance + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| UnknownDistance | 0 | | +| Cosine | 1 | | +| Euclid | 2 | | +| Dot | 3 | | +| Manhattan | 4 | | + + + + + +### Modifier + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| None | 0 | | +| Idf | 1 | Apply Inverse Document Frequency | + + + + + +### MultiVectorComparator + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| MaxSim | 0 | | + + + + + +### PayloadSchemaType + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| UnknownType | 0 | | +| Keyword | 1 | | +| Integer | 2 | | +| Float | 3 | | +| Geo | 4 | | +| Text | 5 | | +| Bool | 6 | | +| Datetime | 7 | | +| Uuid | 8 | | + + + + + +### QuantizationType + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| UnknownQuantization | 0 | | +| Int8 | 1 | | + + + + + +### ReplicaState + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| Active | 0 | Active and sound | +| Dead | 1 | Failed for some reason | +| Partial | 2 | The shard is partially loaded and is currently receiving data from other shards | +| Initializing | 3 | Collection is being created | +| Listener | 4 | A shard which receives data, but is not used for search; Useful for backup shards | +| PartialSnapshot | 5 | Deprecated: snapshot shard transfer is in progress; Updates should not be sent to (and are ignored by) the shard | +| Recovery | 6 | Shard is undergoing recovered by an external node; Normally rejects updates, accepts updates if force is true | +| Resharding | 7 | Points are being migrated to this shard as part of resharding | + + + + + +### ShardTransferMethod + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| StreamRecords | 0 | Stream shard records in batches | +| Snapshot | 1 | Snapshot the shard and recover it on the target peer | +| WalDelta | 2 | Resolve WAL delta between peers and transfer the difference | +| ReshardingStreamRecords | 3 | Stream shard records in batches for resharding | + + + + + +### ShardingMethod + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| Auto | 0 | Auto-sharding based on record ids | +| Custom | 1 | Shard by user-defined key | + + + + + +### TokenizerType + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| Unknown | 0 | | +| Prefix | 1 | | +| Whitespace | 2 | | +| Word | 3 | | +| Multilingual | 4 | | + + + + + + + + + + + +

Top

+ +## collections_service.proto + + + + + + + + + + + +### Collections + + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| Get | [GetCollectionInfoRequest](#qdrant-GetCollectionInfoRequest) | [GetCollectionInfoResponse](#qdrant-GetCollectionInfoResponse) | Get detailed information about specified existing collection | +| List | [ListCollectionsRequest](#qdrant-ListCollectionsRequest) | [ListCollectionsResponse](#qdrant-ListCollectionsResponse) | Get list name of all existing collections | +| Create | [CreateCollection](#qdrant-CreateCollection) | [CollectionOperationResponse](#qdrant-CollectionOperationResponse) | Create new collection with given parameters | +| Update | [UpdateCollection](#qdrant-UpdateCollection) | [CollectionOperationResponse](#qdrant-CollectionOperationResponse) | Update parameters of the existing collection | +| Delete | [DeleteCollection](#qdrant-DeleteCollection) | [CollectionOperationResponse](#qdrant-CollectionOperationResponse) | Drop collection and all associated data | +| UpdateAliases | [ChangeAliases](#qdrant-ChangeAliases) | [CollectionOperationResponse](#qdrant-CollectionOperationResponse) | Update Aliases of the existing collection | +| ListCollectionAliases | [ListCollectionAliasesRequest](#qdrant-ListCollectionAliasesRequest) | [ListAliasesResponse](#qdrant-ListAliasesResponse) | Get list of all aliases for a collection | +| ListAliases | [ListAliasesRequest](#qdrant-ListAliasesRequest) | [ListAliasesResponse](#qdrant-ListAliasesResponse) | Get list of all aliases for all existing collections | +| CollectionClusterInfo | [CollectionClusterInfoRequest](#qdrant-CollectionClusterInfoRequest) | [CollectionClusterInfoResponse](#qdrant-CollectionClusterInfoResponse) | Get cluster information for a collection | +| CollectionExists | [CollectionExistsRequest](#qdrant-CollectionExistsRequest) | [CollectionExistsResponse](#qdrant-CollectionExistsResponse) | Check the existence of a collection | +| UpdateCollectionClusterSetup | [UpdateCollectionClusterSetupRequest](#qdrant-UpdateCollectionClusterSetupRequest) | [UpdateCollectionClusterSetupResponse](#qdrant-UpdateCollectionClusterSetupResponse) | Update cluster setup for a collection | +| CreateShardKey | [CreateShardKeyRequest](#qdrant-CreateShardKeyRequest) | [CreateShardKeyResponse](#qdrant-CreateShardKeyResponse) | Create shard key | +| DeleteShardKey | [DeleteShardKeyRequest](#qdrant-DeleteShardKeyRequest) | [DeleteShardKeyResponse](#qdrant-DeleteShardKeyResponse) | Delete shard key | + + + + + + +

Top

+ +## health_check.proto +source: https://github.com/grpc/grpc/blob/master/doc/health-checking.md#service-definition + + + + +### HealthCheckRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| service | [string](#string) | | | + + + + + + + + +### HealthCheckResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| status | [HealthCheckResponse.ServingStatus](#grpc-health-v1-HealthCheckResponse-ServingStatus) | | | + + + + + + + + + + +### HealthCheckResponse.ServingStatus + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| UNKNOWN | 0 | | +| SERVING | 1 | | +| NOT_SERVING | 2 | | +| SERVICE_UNKNOWN | 3 | Used only by the Watch method. | + + + + + + + + + +### Health + + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| Check | [HealthCheckRequest](#grpc-health-v1-HealthCheckRequest) | [HealthCheckResponse](#grpc-health-v1-HealthCheckResponse) | | + + + + + + +

Top

+ +## json_with_int.proto + + + + + +### ListValue +`ListValue` is a wrapper around a repeated field of values. + +The JSON representation for `ListValue` is a JSON array. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| values | [Value](#qdrant-Value) | repeated | Repeated field of dynamically typed values. | + + + + + + + + +### Struct +`Struct` represents a structured data value, consisting of fields +which map to dynamically typed values. In some languages, `Struct` +might be supported by a native representation. For example, in +scripting languages like JS a struct is represented as an +object. The details of that representation are described together +with the proto support for the language. + +The JSON representation for `Struct` is a JSON object. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| fields | [Struct.FieldsEntry](#qdrant-Struct-FieldsEntry) | repeated | Unordered map of dynamically typed values. | + + + + + + + + +### Struct.FieldsEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [Value](#qdrant-Value) | | | + + + + + + + + +### Value +`Value` represents a dynamically typed value which can be either +null, a number, a string, a boolean, a recursive struct value, or a +list of values. A producer of value is expected to set one of those +variants, absence of any variant indicates an error. + +The JSON representation for `Value` is a JSON value. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| null_value | [NullValue](#qdrant-NullValue) | | Represents a null value. | +| double_value | [double](#double) | | Represents a double value. | +| integer_value | [int64](#int64) | | Represents an integer value | +| string_value | [string](#string) | | Represents a string value. | +| bool_value | [bool](#bool) | | Represents a boolean value. | +| struct_value | [Struct](#qdrant-Struct) | | Represents a structured value. | +| list_value | [ListValue](#qdrant-ListValue) | | Represents a repeated `Value`. | + + + + + + + + + + +### NullValue +`NullValue` is a singleton enumeration to represent the null value for the +`Value` type union. + + The JSON representation for `NullValue` is JSON `null`. + +| Name | Number | Description | +| ---- | ------ | ----------- | +| NULL_VALUE | 0 | Null value. | + + + + + + + + + + + +

Top

+ +## points.proto + + + + + +### BatchResult + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [ScoredPoint](#qdrant-ScoredPoint) | repeated | | + + + + + + + + +### ClearPayloadPoints + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | name of the collection | +| wait | [bool](#bool) | optional | Wait until the changes have been applied? | +| points | [PointsSelector](#qdrant-PointsSelector) | | Affected points | +| ordering | [WriteOrdering](#qdrant-WriteOrdering) | optional | Write ordering guarantees | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Option for custom sharding to specify used shard keys | + + + + + + + + +### Condition + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| field | [FieldCondition](#qdrant-FieldCondition) | | | +| is_empty | [IsEmptyCondition](#qdrant-IsEmptyCondition) | | | +| has_id | [HasIdCondition](#qdrant-HasIdCondition) | | | +| filter | [Filter](#qdrant-Filter) | | | +| is_null | [IsNullCondition](#qdrant-IsNullCondition) | | | +| nested | [NestedCondition](#qdrant-NestedCondition) | | | +| has_vector | [HasVectorCondition](#qdrant-HasVectorCondition) | | | + + + + + + + + +### ContextExamplePair + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| positive | [VectorExample](#qdrant-VectorExample) | | | +| negative | [VectorExample](#qdrant-VectorExample) | | | + + + + + + + + +### ContextInput + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| pairs | [ContextInputPair](#qdrant-ContextInputPair) | repeated | Search space will be constrained by these pairs of vectors | + + + + + + + + +### ContextInputPair + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| positive | [VectorInput](#qdrant-VectorInput) | | A positive vector | +| negative | [VectorInput](#qdrant-VectorInput) | | Repel from this vector | + + + + + + + + +### CountPoints + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | Name of the collection | +| filter | [Filter](#qdrant-Filter) | | Filter conditions - return only those points that satisfy the specified conditions | +| exact | [bool](#bool) | optional | If `true` - return exact count, if `false` - return approximate count | +| read_consistency | [ReadConsistency](#qdrant-ReadConsistency) | optional | Options for specifying read consistency guarantees | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Specify in which shards to look for the points, if not specified - look in all shards | +| timeout | [uint64](#uint64) | optional | If set, overrides global timeout setting for this request. Unit is seconds. | + + + + + + + + +### CountResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [CountResult](#qdrant-CountResult) | | | +| time | [double](#double) | | Time spent to process | +| usage | [HardwareUsage](#qdrant-HardwareUsage) | optional | | + + + + + + + + +### CountResult + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| count | [uint64](#uint64) | | | + + + + + + + + +### CreateFieldIndexCollection + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | name of the collection | +| wait | [bool](#bool) | optional | Wait until the changes have been applied? | +| field_name | [string](#string) | | Field name to index | +| field_type | [FieldType](#qdrant-FieldType) | optional | Field type. | +| field_index_params | [PayloadIndexParams](#qdrant-PayloadIndexParams) | optional | Payload index params. | +| ordering | [WriteOrdering](#qdrant-WriteOrdering) | optional | Write ordering guarantees | + + + + + + + + +### DatetimeRange + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| lt | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | | +| gt | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | | +| gte | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | | +| lte | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | | + + + + + + + + +### DeleteFieldIndexCollection + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | name of the collection | +| wait | [bool](#bool) | optional | Wait until the changes have been applied? | +| field_name | [string](#string) | | Field name to delete | +| ordering | [WriteOrdering](#qdrant-WriteOrdering) | optional | Write ordering guarantees | + + + + + + + + +### DeletePayloadPoints + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | name of the collection | +| wait | [bool](#bool) | optional | Wait until the changes have been applied? | +| keys | [string](#string) | repeated | List of keys to delete | +| points_selector | [PointsSelector](#qdrant-PointsSelector) | optional | Affected points | +| ordering | [WriteOrdering](#qdrant-WriteOrdering) | optional | Write ordering guarantees | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Option for custom sharding to specify used shard keys | + + + + + + + + +### DeletePointVectors + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | name of the collection | +| wait | [bool](#bool) | optional | Wait until the changes have been applied? | +| points_selector | [PointsSelector](#qdrant-PointsSelector) | | Affected points | +| vectors | [VectorsSelector](#qdrant-VectorsSelector) | | List of vector names to delete | +| ordering | [WriteOrdering](#qdrant-WriteOrdering) | optional | Write ordering guarantees | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Option for custom sharding to specify used shard keys | + + + + + + + + +### DeletePoints + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | name of the collection | +| wait | [bool](#bool) | optional | Wait until the changes have been applied? | +| points | [PointsSelector](#qdrant-PointsSelector) | | Affected points | +| ordering | [WriteOrdering](#qdrant-WriteOrdering) | optional | Write ordering guarantees | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Option for custom sharding to specify used shard keys | + + + + + + + + +### DenseVector + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| data | [float](#float) | repeated | | + + + + + + + + +### DiscoverBatchPoints + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | Name of the collection | +| discover_points | [DiscoverPoints](#qdrant-DiscoverPoints) | repeated | | +| read_consistency | [ReadConsistency](#qdrant-ReadConsistency) | optional | Options for specifying read consistency guarantees | +| timeout | [uint64](#uint64) | optional | If set, overrides global timeout setting for this request. Unit is seconds. | + + + + + + + + +### DiscoverBatchResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [BatchResult](#qdrant-BatchResult) | repeated | | +| time | [double](#double) | | Time spent to process | +| usage | [HardwareUsage](#qdrant-HardwareUsage) | optional | | + + + + + + + + +### DiscoverInput + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| target | [VectorInput](#qdrant-VectorInput) | | Use this as the primary search objective | +| context | [ContextInput](#qdrant-ContextInput) | | Search space will be constrained by these pairs of vectors | + + + + + + + + +### DiscoverPoints + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | name of the collection | +| target | [TargetVector](#qdrant-TargetVector) | | Use this as the primary search objective | +| context | [ContextExamplePair](#qdrant-ContextExamplePair) | repeated | Search will be constrained by these pairs of examples | +| filter | [Filter](#qdrant-Filter) | | Filter conditions - return only those points that satisfy the specified conditions | +| limit | [uint64](#uint64) | | Max number of result | +| with_payload | [WithPayloadSelector](#qdrant-WithPayloadSelector) | | Options for specifying which payload to include or not | +| params | [SearchParams](#qdrant-SearchParams) | | Search config | +| offset | [uint64](#uint64) | optional | Offset of the result | +| using | [string](#string) | optional | Define which vector to use for recommendation, if not specified - default vector | +| with_vectors | [WithVectorsSelector](#qdrant-WithVectorsSelector) | optional | Options for specifying which vectors to include into response | +| lookup_from | [LookupLocation](#qdrant-LookupLocation) | optional | Name of the collection to use for points lookup, if not specified - use current collection | +| read_consistency | [ReadConsistency](#qdrant-ReadConsistency) | optional | Options for specifying read consistency guarantees | +| timeout | [uint64](#uint64) | optional | If set, overrides global timeout setting for this request. Unit is seconds. | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Specify in which shards to look for the points, if not specified - look in all shards | + + + + + + + + +### DiscoverResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [ScoredPoint](#qdrant-ScoredPoint) | repeated | | +| time | [double](#double) | | Time spent to process | +| usage | [HardwareUsage](#qdrant-HardwareUsage) | optional | | + + + + + + + + +### Document + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| text | [string](#string) | | Text of the document | +| model | [string](#string) | | Model name | +| options | [Document.OptionsEntry](#qdrant-Document-OptionsEntry) | repeated | Model options | + + + + + + + + +### Document.OptionsEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [Value](#qdrant-Value) | | | + + + + + + + + +### FacetCounts + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | Name of the collection | +| key | [string](#string) | | Payload key of the facet | +| filter | [Filter](#qdrant-Filter) | optional | Filter conditions - return only those points that satisfy the specified conditions. | +| limit | [uint64](#uint64) | optional | Max number of facets. Default is 10. | +| exact | [bool](#bool) | optional | If true, return exact counts, slower but useful for debugging purposes. Default is false. | +| timeout | [uint64](#uint64) | optional | If set, overrides global timeout setting for this request. Unit is seconds. | +| read_consistency | [ReadConsistency](#qdrant-ReadConsistency) | optional | Options for specifying read consistency guarantees | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Specify in which shards to look for the points, if not specified - look in all shards | + + + + + + + + +### FacetHit + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| value | [FacetValue](#qdrant-FacetValue) | | Value from the facet | +| count | [uint64](#uint64) | | Number of points with this value | + + + + + + + + +### FacetResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| hits | [FacetHit](#qdrant-FacetHit) | repeated | | +| time | [double](#double) | | Time spent to process | + + + + + + + + +### FacetValue + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| string_value | [string](#string) | | String value from the facet | +| integer_value | [int64](#int64) | | Integer value from the facet | +| bool_value | [bool](#bool) | | Boolean value from the facet | + + + + + + + + +### FieldCondition + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| match | [Match](#qdrant-Match) | | Check if point has field with a given value | +| range | [Range](#qdrant-Range) | | Check if points value lies in a given range | +| geo_bounding_box | [GeoBoundingBox](#qdrant-GeoBoundingBox) | | Check if points geolocation lies in a given area | +| geo_radius | [GeoRadius](#qdrant-GeoRadius) | | Check if geo point is within a given radius | +| values_count | [ValuesCount](#qdrant-ValuesCount) | | Check number of values for a specific field | +| geo_polygon | [GeoPolygon](#qdrant-GeoPolygon) | | Check if geo point is within a given polygon | +| datetime_range | [DatetimeRange](#qdrant-DatetimeRange) | | Check if datetime is within a given range | + + + + + + + + +### Filter + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| should | [Condition](#qdrant-Condition) | repeated | At least one of those conditions should match | +| must | [Condition](#qdrant-Condition) | repeated | All conditions must match | +| must_not | [Condition](#qdrant-Condition) | repeated | All conditions must NOT match | +| min_should | [MinShould](#qdrant-MinShould) | optional | At least minimum amount of given conditions should match | + + + + + + + + +### GeoBoundingBox + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| top_left | [GeoPoint](#qdrant-GeoPoint) | | north-west corner | +| bottom_right | [GeoPoint](#qdrant-GeoPoint) | | south-east corner | + + + + + + + + +### GeoLineString + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| points | [GeoPoint](#qdrant-GeoPoint) | repeated | Ordered sequence of GeoPoints representing the line | + + + + + + + + +### GeoPoint + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| lon | [double](#double) | | | +| lat | [double](#double) | | | + + + + + + + + +### GeoPolygon +For a valid GeoPolygon, both the exterior and interior GeoLineStrings must consist of a minimum of 4 points. +Additionally, the first and last points of each GeoLineString must be the same. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| exterior | [GeoLineString](#qdrant-GeoLineString) | | The exterior line bounds the surface | +| interiors | [GeoLineString](#qdrant-GeoLineString) | repeated | Interior lines (if present) bound holes within the surface | + + + + + + + + +### GeoRadius + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| center | [GeoPoint](#qdrant-GeoPoint) | | Center of the circle | +| radius | [float](#float) | | In meters | + + + + + + + + +### GetPoints + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | name of the collection | +| ids | [PointId](#qdrant-PointId) | repeated | List of points to retrieve | +| with_payload | [WithPayloadSelector](#qdrant-WithPayloadSelector) | | Options for specifying which payload to include or not | +| with_vectors | [WithVectorsSelector](#qdrant-WithVectorsSelector) | optional | Options for specifying which vectors to include into response | +| read_consistency | [ReadConsistency](#qdrant-ReadConsistency) | optional | Options for specifying read consistency guarantees | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Specify in which shards to look for the points, if not specified - look in all shards | +| timeout | [uint64](#uint64) | optional | If set, overrides global timeout setting for this request. Unit is seconds. | + + + + + + + + +### GetResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [RetrievedPoint](#qdrant-RetrievedPoint) | repeated | | +| time | [double](#double) | | Time spent to process | + + + + + + + + +### GroupId + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| unsigned_value | [uint64](#uint64) | | Represents a double value. | +| integer_value | [int64](#int64) | | Represents an integer value | +| string_value | [string](#string) | | Represents a string value. | + + + + + + + + +### GroupsResult + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| groups | [PointGroup](#qdrant-PointGroup) | repeated | Groups | + + + + + + + + +### HardwareUsage + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| cpu | [uint64](#uint64) | | | + + + + + + + + +### HasIdCondition + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| has_id | [PointId](#qdrant-PointId) | repeated | | + + + + + + + + +### HasVectorCondition + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| has_vector | [string](#string) | | | + + + + + + + + +### Image + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| image | [Value](#qdrant-Value) | | Image data, either base64 encoded or URL | +| model | [string](#string) | | Model name | +| options | [Image.OptionsEntry](#qdrant-Image-OptionsEntry) | repeated | Model options | + + + + + + + + +### Image.OptionsEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [Value](#qdrant-Value) | | | + + + + + + + + +### InferenceObject + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| object | [Value](#qdrant-Value) | | Object to infer | +| model | [string](#string) | | Model name | +| options | [InferenceObject.OptionsEntry](#qdrant-InferenceObject-OptionsEntry) | repeated | Model options | + + + + + + + + +### InferenceObject.OptionsEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [Value](#qdrant-Value) | | | + + + + + + + + +### IsEmptyCondition + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | + + + + + + + + +### IsNullCondition + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | + + + + + + + + +### LookupLocation + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | | +| vector_name | [string](#string) | optional | Which vector to use for search, if not specified - use default vector | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Specify in which shards to look for the points, if not specified - look in all shards | + + + + + + + + +### Match + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| keyword | [string](#string) | | Match string keyword | +| integer | [int64](#int64) | | Match integer | +| boolean | [bool](#bool) | | Match boolean | +| text | [string](#string) | | Match text | +| keywords | [RepeatedStrings](#qdrant-RepeatedStrings) | | Match multiple keywords | +| integers | [RepeatedIntegers](#qdrant-RepeatedIntegers) | | Match multiple integers | +| except_integers | [RepeatedIntegers](#qdrant-RepeatedIntegers) | | Match any other value except those integers | +| except_keywords | [RepeatedStrings](#qdrant-RepeatedStrings) | | Match any other value except those keywords | + + + + + + + + +### MinShould + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| conditions | [Condition](#qdrant-Condition) | repeated | | +| min_count | [uint64](#uint64) | | | + + + + + + + + +### MultiDenseVector + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| vectors | [DenseVector](#qdrant-DenseVector) | repeated | | + + + + + + + + +### NamedVectors + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| vectors | [NamedVectors.VectorsEntry](#qdrant-NamedVectors-VectorsEntry) | repeated | | + + + + + + + + +### NamedVectors.VectorsEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [Vector](#qdrant-Vector) | | | + + + + + + + + +### NamedVectorsOutput + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| vectors | [NamedVectorsOutput.VectorsEntry](#qdrant-NamedVectorsOutput-VectorsEntry) | repeated | | + + + + + + + + +### NamedVectorsOutput.VectorsEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [VectorOutput](#qdrant-VectorOutput) | | | + + + + + + + + +### NestedCondition + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | Path to nested object | +| filter | [Filter](#qdrant-Filter) | | Filter condition | + + + + + + + + +### OrderBy + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | Payload key to order by | +| direction | [Direction](#qdrant-Direction) | optional | Ascending or descending order | +| start_from | [StartFrom](#qdrant-StartFrom) | optional | Start from this value | + + + + + + + + +### OrderValue + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| int | [int64](#int64) | | | +| float | [double](#double) | | | + + + + + + + + +### PayloadExcludeSelector + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| fields | [string](#string) | repeated | List of payload keys to exclude from the result | + + + + + + + + +### PayloadIncludeSelector + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| fields | [string](#string) | repeated | List of payload keys to include into result | + + + + + + + + +### PointGroup + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [GroupId](#qdrant-GroupId) | | Group id | +| hits | [ScoredPoint](#qdrant-ScoredPoint) | repeated | Points in the group | +| lookup | [RetrievedPoint](#qdrant-RetrievedPoint) | | Point(s) from the lookup collection that matches the group id | + + + + + + + + +### PointId + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| num | [uint64](#uint64) | | Numerical ID of the point | +| uuid | [string](#string) | | UUID | + + + + + + + + +### PointStruct + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [PointId](#qdrant-PointId) | | | +| payload | [PointStruct.PayloadEntry](#qdrant-PointStruct-PayloadEntry) | repeated | | +| vectors | [Vectors](#qdrant-Vectors) | optional | | + + + + + + + + +### PointStruct.PayloadEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [Value](#qdrant-Value) | | | + + + + + + + + +### PointVectors + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [PointId](#qdrant-PointId) | | ID to update vectors for | +| vectors | [Vectors](#qdrant-Vectors) | | Named vectors to update, leave others intact | + + + + + + + + +### PointsIdsList + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| ids | [PointId](#qdrant-PointId) | repeated | | + + + + + + + + +### PointsOperationResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [UpdateResult](#qdrant-UpdateResult) | | | +| time | [double](#double) | | Time spent to process | + + + + + + + + +### PointsSelector + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| points | [PointsIdsList](#qdrant-PointsIdsList) | | | +| filter | [Filter](#qdrant-Filter) | | | + + + + + + + + +### PointsUpdateOperation + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| upsert | [PointsUpdateOperation.PointStructList](#qdrant-PointsUpdateOperation-PointStructList) | | | +| delete_deprecated | [PointsSelector](#qdrant-PointsSelector) | | **Deprecated.** | +| set_payload | [PointsUpdateOperation.SetPayload](#qdrant-PointsUpdateOperation-SetPayload) | | | +| overwrite_payload | [PointsUpdateOperation.OverwritePayload](#qdrant-PointsUpdateOperation-OverwritePayload) | | | +| delete_payload | [PointsUpdateOperation.DeletePayload](#qdrant-PointsUpdateOperation-DeletePayload) | | | +| clear_payload_deprecated | [PointsSelector](#qdrant-PointsSelector) | | **Deprecated.** | +| update_vectors | [PointsUpdateOperation.UpdateVectors](#qdrant-PointsUpdateOperation-UpdateVectors) | | | +| delete_vectors | [PointsUpdateOperation.DeleteVectors](#qdrant-PointsUpdateOperation-DeleteVectors) | | | +| delete_points | [PointsUpdateOperation.DeletePoints](#qdrant-PointsUpdateOperation-DeletePoints) | | | +| clear_payload | [PointsUpdateOperation.ClearPayload](#qdrant-PointsUpdateOperation-ClearPayload) | | | + + + + + + + + +### PointsUpdateOperation.ClearPayload + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| points | [PointsSelector](#qdrant-PointsSelector) | | Affected points | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Option for custom sharding to specify used shard keys | + + + + + + + + +### PointsUpdateOperation.DeletePayload + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| keys | [string](#string) | repeated | | +| points_selector | [PointsSelector](#qdrant-PointsSelector) | optional | Affected points | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Option for custom sharding to specify used shard keys | + + + + + + + + +### PointsUpdateOperation.DeletePoints + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| points | [PointsSelector](#qdrant-PointsSelector) | | Affected points | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Option for custom sharding to specify used shard keys | + + + + + + + + +### PointsUpdateOperation.DeleteVectors + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| points_selector | [PointsSelector](#qdrant-PointsSelector) | | Affected points | +| vectors | [VectorsSelector](#qdrant-VectorsSelector) | | List of vector names to delete | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Option for custom sharding to specify used shard keys | + + + + + + + + +### PointsUpdateOperation.OverwritePayload + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| payload | [PointsUpdateOperation.OverwritePayload.PayloadEntry](#qdrant-PointsUpdateOperation-OverwritePayload-PayloadEntry) | repeated | | +| points_selector | [PointsSelector](#qdrant-PointsSelector) | optional | Affected points | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Option for custom sharding to specify used shard keys | +| key | [string](#string) | optional | Option for indicate property of payload | + + + + + + + + +### PointsUpdateOperation.OverwritePayload.PayloadEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [Value](#qdrant-Value) | | | + + + + + + + + +### PointsUpdateOperation.PointStructList + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| points | [PointStruct](#qdrant-PointStruct) | repeated | | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Option for custom sharding to specify used shard keys | + + + + + + + + +### PointsUpdateOperation.SetPayload + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| payload | [PointsUpdateOperation.SetPayload.PayloadEntry](#qdrant-PointsUpdateOperation-SetPayload-PayloadEntry) | repeated | | +| points_selector | [PointsSelector](#qdrant-PointsSelector) | optional | Affected points | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Option for custom sharding to specify used shard keys | +| key | [string](#string) | optional | Option for indicate property of payload | + + + + + + + + +### PointsUpdateOperation.SetPayload.PayloadEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [Value](#qdrant-Value) | | | + + + + + + + + +### PointsUpdateOperation.UpdateVectors + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| points | [PointVectors](#qdrant-PointVectors) | repeated | List of points and vectors to update | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Option for custom sharding to specify used shard keys | + + + + + + + + +### PrefetchQuery + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| prefetch | [PrefetchQuery](#qdrant-PrefetchQuery) | repeated | Sub-requests to perform first. If present, the query will be performed on the results of the prefetches. | +| query | [Query](#qdrant-Query) | optional | Query to perform. If missing, returns points ordered by their IDs. | +| using | [string](#string) | optional | Define which vector to use for querying. If missing, the default vector is is used. | +| filter | [Filter](#qdrant-Filter) | optional | Filter conditions - return only those points that satisfy the specified conditions. | +| params | [SearchParams](#qdrant-SearchParams) | optional | Search params for when there is no prefetch. | +| score_threshold | [float](#float) | optional | Return points with scores better than this threshold. | +| limit | [uint64](#uint64) | optional | Max number of points. Default is 10 | +| lookup_from | [LookupLocation](#qdrant-LookupLocation) | optional | The location to use for IDs lookup, if not specified - use the current collection and the 'using' vector | + + + + + + + + +### QuantizationSearchParams + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| ignore | [bool](#bool) | optional | If set to true, search will ignore quantized vector data | +| rescore | [bool](#bool) | optional | If true, use original vectors to re-score top-k results. If ignored, qdrant decides automatically does rescore enabled or not. | +| oversampling | [double](#double) | optional | Oversampling factor for quantization. + +Defines how many extra vectors should be pre-selected using quantized index, and then re-scored using original vectors. + +For example, if `oversampling` is 2.4 and `limit` is 100, then 240 vectors will be pre-selected using quantized index, and then top-100 will be returned after re-scoring. | + + + + + + + + +### Query + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| nearest | [VectorInput](#qdrant-VectorInput) | | Find the nearest neighbors to this vector. | +| recommend | [RecommendInput](#qdrant-RecommendInput) | | Use multiple positive and negative vectors to find the results. | +| discover | [DiscoverInput](#qdrant-DiscoverInput) | | Search for nearest points, but constrain the search space with context | +| context | [ContextInput](#qdrant-ContextInput) | | Return points that live in positive areas. | +| order_by | [OrderBy](#qdrant-OrderBy) | | Order the points by a payload field. | +| fusion | [Fusion](#qdrant-Fusion) | | Fuse the results of multiple prefetches. | +| sample | [Sample](#qdrant-Sample) | | Sample points from the collection. | + + + + + + + + +### QueryBatchPoints + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | | +| query_points | [QueryPoints](#qdrant-QueryPoints) | repeated | | +| read_consistency | [ReadConsistency](#qdrant-ReadConsistency) | optional | Options for specifying read consistency guarantees | +| timeout | [uint64](#uint64) | optional | If set, overrides global timeout setting for this request. Unit is seconds. | + + + + + + + + +### QueryBatchResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [BatchResult](#qdrant-BatchResult) | repeated | | +| time | [double](#double) | | Time spent to process | +| usage | [HardwareUsage](#qdrant-HardwareUsage) | optional | | + + + + + + + + +### QueryGroupsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [GroupsResult](#qdrant-GroupsResult) | | | +| time | [double](#double) | | Time spent to process | +| usage | [HardwareUsage](#qdrant-HardwareUsage) | optional | | + + + + + + + + +### QueryPointGroups + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | Name of the collection | +| prefetch | [PrefetchQuery](#qdrant-PrefetchQuery) | repeated | Sub-requests to perform first. If present, the query will be performed on the results of the prefetches. | +| query | [Query](#qdrant-Query) | optional | Query to perform. If missing, returns points ordered by their IDs. | +| using | [string](#string) | optional | Define which vector to use for querying. If missing, the default vector is used. | +| filter | [Filter](#qdrant-Filter) | optional | Filter conditions - return only those points that satisfy the specified conditions. | +| params | [SearchParams](#qdrant-SearchParams) | optional | Search params for when there is no prefetch. | +| score_threshold | [float](#float) | optional | Return points with scores better than this threshold. | +| with_payload | [WithPayloadSelector](#qdrant-WithPayloadSelector) | | Options for specifying which payload to include or not | +| with_vectors | [WithVectorsSelector](#qdrant-WithVectorsSelector) | optional | Options for specifying which vectors to include into response | +| lookup_from | [LookupLocation](#qdrant-LookupLocation) | optional | The location to use for IDs lookup, if not specified - use the current collection and the 'using' vector | +| limit | [uint64](#uint64) | optional | Max number of points. Default is 3. | +| group_size | [uint64](#uint64) | optional | Maximum amount of points to return per group. Default to 10. | +| group_by | [string](#string) | | Payload field to group by, must be a string or number field. If there are multiple values for the field, all of them will be used. One point can be in multiple groups. | +| read_consistency | [ReadConsistency](#qdrant-ReadConsistency) | optional | Options for specifying read consistency guarantees | +| with_lookup | [WithLookup](#qdrant-WithLookup) | optional | Options for specifying how to use the group id to lookup points in another collection | +| timeout | [uint64](#uint64) | optional | If set, overrides global timeout setting for this request. Unit is seconds. | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Specify in which shards to look for the points, if not specified - look in all shards | + + + + + + + + +### QueryPoints + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | Name of the collection | +| prefetch | [PrefetchQuery](#qdrant-PrefetchQuery) | repeated | Sub-requests to perform first. If present, the query will be performed on the results of the prefetches. | +| query | [Query](#qdrant-Query) | optional | Query to perform. If missing, returns points ordered by their IDs. | +| using | [string](#string) | optional | Define which vector to use for querying. If missing, the default vector is used. | +| filter | [Filter](#qdrant-Filter) | optional | Filter conditions - return only those points that satisfy the specified conditions. | +| params | [SearchParams](#qdrant-SearchParams) | optional | Search params for when there is no prefetch. | +| score_threshold | [float](#float) | optional | Return points with scores better than this threshold. | +| limit | [uint64](#uint64) | optional | Max number of points. Default is 10. | +| offset | [uint64](#uint64) | optional | Offset of the result. Skip this many points. Default is 0. | +| with_vectors | [WithVectorsSelector](#qdrant-WithVectorsSelector) | optional | Options for specifying which vectors to include into the response. | +| with_payload | [WithPayloadSelector](#qdrant-WithPayloadSelector) | optional | Options for specifying which payload to include or not. | +| read_consistency | [ReadConsistency](#qdrant-ReadConsistency) | optional | Options for specifying read consistency guarantees. | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Specify in which shards to look for the points, if not specified - look in all shards. | +| lookup_from | [LookupLocation](#qdrant-LookupLocation) | optional | The location to use for IDs lookup, if not specified - use the current collection and the 'using' vector | +| timeout | [uint64](#uint64) | optional | If set, overrides global timeout setting for this request. Unit is seconds. | + + + + + + + + +### QueryResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [ScoredPoint](#qdrant-ScoredPoint) | repeated | | +| time | [double](#double) | | Time spent to process | +| usage | [HardwareUsage](#qdrant-HardwareUsage) | optional | | + + + + + + + + +### Range + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| lt | [double](#double) | optional | | +| gt | [double](#double) | optional | | +| gte | [double](#double) | optional | | +| lte | [double](#double) | optional | | + + + + + + + + +### ReadConsistency + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| type | [ReadConsistencyType](#qdrant-ReadConsistencyType) | | Common read consistency configurations | +| factor | [uint64](#uint64) | | Send request to a specified number of nodes, and return points which are present on all of them | + + + + + + + + +### RecommendBatchPoints + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | Name of the collection | +| recommend_points | [RecommendPoints](#qdrant-RecommendPoints) | repeated | | +| read_consistency | [ReadConsistency](#qdrant-ReadConsistency) | optional | Options for specifying read consistency guarantees | +| timeout | [uint64](#uint64) | optional | If set, overrides global timeout setting for this request. Unit is seconds. | + + + + + + + + +### RecommendBatchResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [BatchResult](#qdrant-BatchResult) | repeated | | +| time | [double](#double) | | Time spent to process | +| usage | [HardwareUsage](#qdrant-HardwareUsage) | optional | | + + + + + + + + +### RecommendGroupsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [GroupsResult](#qdrant-GroupsResult) | | | +| time | [double](#double) | | Time spent to process | +| usage | [HardwareUsage](#qdrant-HardwareUsage) | optional | | + + + + + + + + +### RecommendInput + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| positive | [VectorInput](#qdrant-VectorInput) | repeated | Look for vectors closest to the vectors from these points | +| negative | [VectorInput](#qdrant-VectorInput) | repeated | Try to avoid vectors like the vector from these points | +| strategy | [RecommendStrategy](#qdrant-RecommendStrategy) | optional | How to use the provided vectors to find the results | + + + + + + + + +### RecommendPointGroups + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | Name of the collection | +| positive | [PointId](#qdrant-PointId) | repeated | Look for vectors closest to the vectors from these points | +| negative | [PointId](#qdrant-PointId) | repeated | Try to avoid vectors like the vector from these points | +| filter | [Filter](#qdrant-Filter) | | Filter conditions - return only those points that satisfy the specified conditions | +| limit | [uint32](#uint32) | | Max number of groups in result | +| with_payload | [WithPayloadSelector](#qdrant-WithPayloadSelector) | | Options for specifying which payload to include or not | +| params | [SearchParams](#qdrant-SearchParams) | | Search config | +| score_threshold | [float](#float) | optional | If provided - cut off results with worse scores | +| using | [string](#string) | optional | Define which vector to use for recommendation, if not specified - default vector | +| with_vectors | [WithVectorsSelector](#qdrant-WithVectorsSelector) | optional | Options for specifying which vectors to include into response | +| lookup_from | [LookupLocation](#qdrant-LookupLocation) | optional | Name of the collection to use for points lookup, if not specified - use current collection | +| group_by | [string](#string) | | Payload field to group by, must be a string or number field. If there are multiple values for the field, all of them will be used. One point can be in multiple groups. | +| group_size | [uint32](#uint32) | | Maximum amount of points to return per group | +| read_consistency | [ReadConsistency](#qdrant-ReadConsistency) | optional | Options for specifying read consistency guarantees | +| with_lookup | [WithLookup](#qdrant-WithLookup) | optional | Options for specifying how to use the group id to lookup points in another collection | +| strategy | [RecommendStrategy](#qdrant-RecommendStrategy) | optional | How to use the example vectors to find the results | +| positive_vectors | [Vector](#qdrant-Vector) | repeated | Look for vectors closest to those | +| negative_vectors | [Vector](#qdrant-Vector) | repeated | Try to avoid vectors like this | +| timeout | [uint64](#uint64) | optional | If set, overrides global timeout setting for this request. Unit is seconds. | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Specify in which shards to look for the points, if not specified - look in all shards | + + + + + + + + +### RecommendPoints + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | name of the collection | +| positive | [PointId](#qdrant-PointId) | repeated | Look for vectors closest to the vectors from these points | +| negative | [PointId](#qdrant-PointId) | repeated | Try to avoid vectors like the vector from these points | +| filter | [Filter](#qdrant-Filter) | | Filter conditions - return only those points that satisfy the specified conditions | +| limit | [uint64](#uint64) | | Max number of result | +| with_payload | [WithPayloadSelector](#qdrant-WithPayloadSelector) | | Options for specifying which payload to include or not | +| params | [SearchParams](#qdrant-SearchParams) | | Search config | +| score_threshold | [float](#float) | optional | If provided - cut off results with worse scores | +| offset | [uint64](#uint64) | optional | Offset of the result | +| using | [string](#string) | optional | Define which vector to use for recommendation, if not specified - default vector | +| with_vectors | [WithVectorsSelector](#qdrant-WithVectorsSelector) | optional | Options for specifying which vectors to include into response | +| lookup_from | [LookupLocation](#qdrant-LookupLocation) | optional | Name of the collection to use for points lookup, if not specified - use current collection | +| read_consistency | [ReadConsistency](#qdrant-ReadConsistency) | optional | Options for specifying read consistency guarantees | +| strategy | [RecommendStrategy](#qdrant-RecommendStrategy) | optional | How to use the example vectors to find the results | +| positive_vectors | [Vector](#qdrant-Vector) | repeated | Look for vectors closest to those | +| negative_vectors | [Vector](#qdrant-Vector) | repeated | Try to avoid vectors like this | +| timeout | [uint64](#uint64) | optional | If set, overrides global timeout setting for this request. Unit is seconds. | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Specify in which shards to look for the points, if not specified - look in all shards | + + + + + + + + +### RecommendResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [ScoredPoint](#qdrant-ScoredPoint) | repeated | | +| time | [double](#double) | | Time spent to process | +| usage | [HardwareUsage](#qdrant-HardwareUsage) | optional | | + + + + + + + + +### RepeatedIntegers + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| integers | [int64](#int64) | repeated | | + + + + + + + + +### RepeatedStrings + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| strings | [string](#string) | repeated | | + + + + + + + + +### RetrievedPoint + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [PointId](#qdrant-PointId) | | | +| payload | [RetrievedPoint.PayloadEntry](#qdrant-RetrievedPoint-PayloadEntry) | repeated | | +| vectors | [VectorsOutput](#qdrant-VectorsOutput) | optional | | +| shard_key | [ShardKey](#qdrant-ShardKey) | optional | Shard key | +| order_value | [OrderValue](#qdrant-OrderValue) | optional | Order-by value | + + + + + + + + +### RetrievedPoint.PayloadEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [Value](#qdrant-Value) | | | + + + + + + + + +### ScoredPoint + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [PointId](#qdrant-PointId) | | Point id | +| payload | [ScoredPoint.PayloadEntry](#qdrant-ScoredPoint-PayloadEntry) | repeated | Payload | +| score | [float](#float) | | Similarity score | +| version | [uint64](#uint64) | | Last update operation applied to this point | +| vectors | [VectorsOutput](#qdrant-VectorsOutput) | optional | Vectors to search | +| shard_key | [ShardKey](#qdrant-ShardKey) | optional | Shard key | +| order_value | [OrderValue](#qdrant-OrderValue) | optional | Order by value | + + + + + + + + +### ScoredPoint.PayloadEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [Value](#qdrant-Value) | | | + + + + + + + + +### ScrollPoints + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | | +| filter | [Filter](#qdrant-Filter) | | Filter conditions - return only those points that satisfy the specified conditions | +| offset | [PointId](#qdrant-PointId) | optional | Start with this ID | +| limit | [uint32](#uint32) | optional | Max number of result | +| with_payload | [WithPayloadSelector](#qdrant-WithPayloadSelector) | | Options for specifying which payload to include or not | +| with_vectors | [WithVectorsSelector](#qdrant-WithVectorsSelector) | optional | Options for specifying which vectors to include into response | +| read_consistency | [ReadConsistency](#qdrant-ReadConsistency) | optional | Options for specifying read consistency guarantees | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Specify in which shards to look for the points, if not specified - look in all shards | +| order_by | [OrderBy](#qdrant-OrderBy) | optional | Order the records by a payload field | +| timeout | [uint64](#uint64) | optional | If set, overrides global timeout setting for this request. Unit is seconds. | + + + + + + + + +### ScrollResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| next_page_offset | [PointId](#qdrant-PointId) | optional | Use this offset for the next query | +| result | [RetrievedPoint](#qdrant-RetrievedPoint) | repeated | | +| time | [double](#double) | | Time spent to process | + + + + + + + + +### SearchBatchPoints + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | Name of the collection | +| search_points | [SearchPoints](#qdrant-SearchPoints) | repeated | | +| read_consistency | [ReadConsistency](#qdrant-ReadConsistency) | optional | Options for specifying read consistency guarantees | +| timeout | [uint64](#uint64) | optional | If set, overrides global timeout setting for this request. Unit is seconds. | + + + + + + + + +### SearchBatchResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [BatchResult](#qdrant-BatchResult) | repeated | | +| time | [double](#double) | | Time spent to process | +| usage | [HardwareUsage](#qdrant-HardwareUsage) | optional | | + + + + + + + + +### SearchGroupsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [GroupsResult](#qdrant-GroupsResult) | | | +| time | [double](#double) | | Time spent to process | +| usage | [HardwareUsage](#qdrant-HardwareUsage) | optional | | + + + + + + + + +### SearchMatrixOffsets + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| offsets_row | [uint64](#uint64) | repeated | Row indices of the matrix | +| offsets_col | [uint64](#uint64) | repeated | Column indices of the matrix | +| scores | [float](#float) | repeated | Scores associated with matrix coordinates | +| ids | [PointId](#qdrant-PointId) | repeated | Ids of the points in order | + + + + + + + + +### SearchMatrixOffsetsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [SearchMatrixOffsets](#qdrant-SearchMatrixOffsets) | | | +| time | [double](#double) | | Time spent to process | +| usage | [HardwareUsage](#qdrant-HardwareUsage) | optional | | + + + + + + + + +### SearchMatrixPair + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| a | [PointId](#qdrant-PointId) | | first id of the pair | +| b | [PointId](#qdrant-PointId) | | second id of the pair | +| score | [float](#float) | | score of the pair | + + + + + + + + +### SearchMatrixPairs + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| pairs | [SearchMatrixPair](#qdrant-SearchMatrixPair) | repeated | List of pairs of points with scores | + + + + + + + + +### SearchMatrixPairsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [SearchMatrixPairs](#qdrant-SearchMatrixPairs) | | | +| time | [double](#double) | | Time spent to process | +| usage | [HardwareUsage](#qdrant-HardwareUsage) | optional | | + + + + + + + + +### SearchMatrixPoints + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | Name of the collection | +| filter | [Filter](#qdrant-Filter) | optional | Filter conditions - return only those points that satisfy the specified conditions. | +| sample | [uint64](#uint64) | optional | How many points to select and search within. Default is 10. | +| limit | [uint64](#uint64) | optional | How many neighbours per sample to find. Default is 3. | +| using | [string](#string) | optional | Define which vector to use for querying. If missing, the default vector is is used. | +| timeout | [uint64](#uint64) | optional | If set, overrides global timeout setting for this request. Unit is seconds. | +| read_consistency | [ReadConsistency](#qdrant-ReadConsistency) | optional | Options for specifying read consistency guarantees | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Specify in which shards to look for the points, if not specified - look in all shards | + + + + + + + + +### SearchParams + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| hnsw_ef | [uint64](#uint64) | optional | Params relevant to HNSW index. Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search. | +| exact | [bool](#bool) | optional | Search without approximation. If set to true, search may run long but with exact results. | +| quantization | [QuantizationSearchParams](#qdrant-QuantizationSearchParams) | optional | If set to true, search will ignore quantized vector data | +| indexed_only | [bool](#bool) | optional | If enabled, the engine will only perform search among indexed or small segments. Using this option prevents slow searches in case of delayed index, but does not guarantee that all uploaded vectors will be included in search results | + + + + + + + + +### SearchPointGroups + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | Name of the collection | +| vector | [float](#float) | repeated | Vector to compare against | +| filter | [Filter](#qdrant-Filter) | | Filter conditions - return only those points that satisfy the specified conditions | +| limit | [uint32](#uint32) | | Max number of result | +| with_payload | [WithPayloadSelector](#qdrant-WithPayloadSelector) | | Options for specifying which payload to include or not | +| params | [SearchParams](#qdrant-SearchParams) | | Search config | +| score_threshold | [float](#float) | optional | If provided - cut off results with worse scores | +| vector_name | [string](#string) | optional | Which vector to use for search, if not specified - use default vector | +| with_vectors | [WithVectorsSelector](#qdrant-WithVectorsSelector) | optional | Options for specifying which vectors to include into response | +| group_by | [string](#string) | | Payload field to group by, must be a string or number field. If there are multiple values for the field, all of them will be used. One point can be in multiple groups. | +| group_size | [uint32](#uint32) | | Maximum amount of points to return per group | +| read_consistency | [ReadConsistency](#qdrant-ReadConsistency) | optional | Options for specifying read consistency guarantees | +| with_lookup | [WithLookup](#qdrant-WithLookup) | optional | Options for specifying how to use the group id to lookup points in another collection | +| timeout | [uint64](#uint64) | optional | If set, overrides global timeout setting for this request. Unit is seconds. | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Specify in which shards to look for the points, if not specified - look in all shards | +| sparse_indices | [SparseIndices](#qdrant-SparseIndices) | optional | | + + + + + + + + +### SearchPoints + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | name of the collection | +| vector | [float](#float) | repeated | vector | +| filter | [Filter](#qdrant-Filter) | | Filter conditions - return only those points that satisfy the specified conditions | +| limit | [uint64](#uint64) | | Max number of result | +| with_payload | [WithPayloadSelector](#qdrant-WithPayloadSelector) | | Options for specifying which payload to include or not | +| params | [SearchParams](#qdrant-SearchParams) | | Search config | +| score_threshold | [float](#float) | optional | If provided - cut off results with worse scores | +| offset | [uint64](#uint64) | optional | Offset of the result | +| vector_name | [string](#string) | optional | Which vector to use for search, if not specified - use default vector | +| with_vectors | [WithVectorsSelector](#qdrant-WithVectorsSelector) | optional | Options for specifying which vectors to include into response | +| read_consistency | [ReadConsistency](#qdrant-ReadConsistency) | optional | Options for specifying read consistency guarantees | +| timeout | [uint64](#uint64) | optional | If set, overrides global timeout setting for this request. Unit is seconds. | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Specify in which shards to look for the points, if not specified - look in all shards | +| sparse_indices | [SparseIndices](#qdrant-SparseIndices) | optional | | + + + + + + + + +### SearchResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [ScoredPoint](#qdrant-ScoredPoint) | repeated | | +| time | [double](#double) | | Time spent to process | +| usage | [HardwareUsage](#qdrant-HardwareUsage) | optional | | + + + + + + + + +### SetPayloadPoints + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | name of the collection | +| wait | [bool](#bool) | optional | Wait until the changes have been applied? | +| payload | [SetPayloadPoints.PayloadEntry](#qdrant-SetPayloadPoints-PayloadEntry) | repeated | New payload values | +| points_selector | [PointsSelector](#qdrant-PointsSelector) | optional | Affected points | +| ordering | [WriteOrdering](#qdrant-WriteOrdering) | optional | Write ordering guarantees | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Option for custom sharding to specify used shard keys | +| key | [string](#string) | optional | Option for indicate property of payload | + + + + + + + + +### SetPayloadPoints.PayloadEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [Value](#qdrant-Value) | | | + + + + + + + + +### ShardKeySelector + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| shard_keys | [ShardKey](#qdrant-ShardKey) | repeated | List of shard keys which should be used in the request | + + + + + + + + +### SparseIndices + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| data | [uint32](#uint32) | repeated | | + + + + + + + + +### SparseVector + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| values | [float](#float) | repeated | | +| indices | [uint32](#uint32) | repeated | | + + + + + + + + +### StartFrom + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| float | [double](#double) | | | +| integer | [int64](#int64) | | | +| timestamp | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | | +| datetime | [string](#string) | | | + + + + + + + + +### TargetVector + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| single | [VectorExample](#qdrant-VectorExample) | | | + + + + + + + + +### UpdateBatchPoints + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | name of the collection | +| wait | [bool](#bool) | optional | Wait until the changes have been applied? | +| operations | [PointsUpdateOperation](#qdrant-PointsUpdateOperation) | repeated | | +| ordering | [WriteOrdering](#qdrant-WriteOrdering) | optional | Write ordering guarantees | + + + + + + + + +### UpdateBatchResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result | [UpdateResult](#qdrant-UpdateResult) | repeated | | +| time | [double](#double) | | Time spent to process | + + + + + + + + +### UpdatePointVectors + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | name of the collection | +| wait | [bool](#bool) | optional | Wait until the changes have been applied? | +| points | [PointVectors](#qdrant-PointVectors) | repeated | List of points and vectors to update | +| ordering | [WriteOrdering](#qdrant-WriteOrdering) | optional | Write ordering guarantees | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Option for custom sharding to specify used shard keys | + + + + + + + + +### UpdateResult + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| operation_id | [uint64](#uint64) | optional | Number of operation | +| status | [UpdateStatus](#qdrant-UpdateStatus) | | Operation status | + + + + + + + + +### UpsertPoints + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | name of the collection | +| wait | [bool](#bool) | optional | Wait until the changes have been applied? | +| points | [PointStruct](#qdrant-PointStruct) | repeated | | +| ordering | [WriteOrdering](#qdrant-WriteOrdering) | optional | Write ordering guarantees | +| shard_key_selector | [ShardKeySelector](#qdrant-ShardKeySelector) | optional | Option for custom sharding to specify used shard keys | + + + + + + + + +### ValuesCount + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| lt | [uint64](#uint64) | optional | | +| gt | [uint64](#uint64) | optional | | +| gte | [uint64](#uint64) | optional | | +| lte | [uint64](#uint64) | optional | | + + + + + + + + +### Vector +Legacy vector format, which determines the vector type by the configuration of its fields. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| data | [float](#float) | repeated | Vector data (flatten for multi vectors), deprecated | +| indices | [SparseIndices](#qdrant-SparseIndices) | optional | Sparse indices for sparse vectors, deprecated | +| vectors_count | [uint32](#uint32) | optional | Number of vectors per multi vector, deprecated | +| dense | [DenseVector](#qdrant-DenseVector) | | Dense vector | +| sparse | [SparseVector](#qdrant-SparseVector) | | Sparse vector | +| multi_dense | [MultiDenseVector](#qdrant-MultiDenseVector) | | Multi dense vector | +| document | [Document](#qdrant-Document) | | | +| image | [Image](#qdrant-Image) | | | +| object | [InferenceObject](#qdrant-InferenceObject) | | | + + + + + + + + +### VectorExample + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [PointId](#qdrant-PointId) | | | +| vector | [Vector](#qdrant-Vector) | | | + + + + + + + + +### VectorInput +Vector type to be used in queries. Ids will be substituted with their corresponding vectors from the collection. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [PointId](#qdrant-PointId) | | | +| dense | [DenseVector](#qdrant-DenseVector) | | | +| sparse | [SparseVector](#qdrant-SparseVector) | | | +| multi_dense | [MultiDenseVector](#qdrant-MultiDenseVector) | | | +| document | [Document](#qdrant-Document) | | | +| image | [Image](#qdrant-Image) | | | +| object | [InferenceObject](#qdrant-InferenceObject) | | | + + + + + + + + +### VectorOutput + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| data | [float](#float) | repeated | Vector data (flatten for multi vectors), deprecated | +| indices | [SparseIndices](#qdrant-SparseIndices) | optional | Sparse indices for sparse vectors, deprecated | +| vectors_count | [uint32](#uint32) | optional | Number of vectors per multi vector, deprecated | +| dense | [DenseVector](#qdrant-DenseVector) | | Dense vector | +| sparse | [SparseVector](#qdrant-SparseVector) | | Sparse vector | +| multi_dense | [MultiDenseVector](#qdrant-MultiDenseVector) | | Multi dense vector | + + + + + + + + +### Vectors + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| vector | [Vector](#qdrant-Vector) | | | +| vectors | [NamedVectors](#qdrant-NamedVectors) | | | + + + + + + + + +### VectorsOutput + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| vector | [VectorOutput](#qdrant-VectorOutput) | | | +| vectors | [NamedVectorsOutput](#qdrant-NamedVectorsOutput) | | | + + + + + + + + +### VectorsSelector + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| names | [string](#string) | repeated | List of vectors to include into result | + + + + + + + + +### WithLookup + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection | [string](#string) | | Name of the collection to use for points lookup | +| with_payload | [WithPayloadSelector](#qdrant-WithPayloadSelector) | optional | Options for specifying which payload to include (or not) | +| with_vectors | [WithVectorsSelector](#qdrant-WithVectorsSelector) | optional | Options for specifying which vectors to include (or not) | + + + + + + + + +### WithPayloadSelector + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| enable | [bool](#bool) | | If `true` - return all payload, if `false` - none | +| include | [PayloadIncludeSelector](#qdrant-PayloadIncludeSelector) | | | +| exclude | [PayloadExcludeSelector](#qdrant-PayloadExcludeSelector) | | | + + + + + + + + +### WithVectorsSelector + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| enable | [bool](#bool) | | If `true` - return all vectors, if `false` - none | +| include | [VectorsSelector](#qdrant-VectorsSelector) | | List of payload keys to include into result | + + + + + + + + +### WriteOrdering + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| type | [WriteOrderingType](#qdrant-WriteOrderingType) | | Write ordering guarantees | + + + + + + + + + + +### Direction + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| Asc | 0 | | +| Desc | 1 | | + + + + + +### FieldType + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| FieldTypeKeyword | 0 | | +| FieldTypeInteger | 1 | | +| FieldTypeFloat | 2 | | +| FieldTypeGeo | 3 | | +| FieldTypeText | 4 | | +| FieldTypeBool | 5 | | +| FieldTypeDatetime | 6 | | +| FieldTypeUuid | 7 | | + + + + + +### Fusion + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| RRF | 0 | Reciprocal Rank Fusion | +| DBSF | 1 | Distribution-Based Score Fusion | + + + + + +### ReadConsistencyType + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| All | 0 | Send request to all nodes and return points which are present on all of them | +| Majority | 1 | Send requests to all nodes and return points which are present on majority of them | +| Quorum | 2 | Send requests to half + 1 nodes, return points which are present on all of them | + + + + + +### RecommendStrategy +How to use positive and negative vectors to find the results, default is `AverageVector`. + +| Name | Number | Description | +| ---- | ------ | ----------- | +| AverageVector | 0 | Average positive and negative vectors and create a single query with the formula `query = avg_pos + avg_pos - avg_neg`. Then performs normal search. | +| BestScore | 1 | Uses custom search objective. Each candidate is compared against all examples, its score is then chosen from the `max(max_pos_score, max_neg_score)`. If the `max_neg_score` is chosen then it is squared and negated. | + + + + + +### Sample +Sample points from the collection + +Available sampling methods: + +* `random` - Random sampling + +| Name | Number | Description | +| ---- | ------ | ----------- | +| Random | 0 | | + + + + + +### UpdateStatus + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| UnknownUpdateStatus | 0 | | +| Acknowledged | 1 | Update is received, but not processed yet | +| Completed | 2 | Update is applied and ready for search | +| ClockRejected | 3 | Internal: update is rejected due to an outdated clock | + + + + + +### WriteOrderingType + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| Weak | 0 | Write operations may be reordered, works faster, default | +| Medium | 1 | Write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change | +| Strong | 2 | Write operations go through the permanent leader, consistent, but may be unavailable if leader is down | + + + + + + + + + + + +

Top

+ +## points_service.proto + + + + + + + + + + + +### Points + + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| Upsert | [UpsertPoints](#qdrant-UpsertPoints) | [PointsOperationResponse](#qdrant-PointsOperationResponse) | Perform insert + updates on points. If a point with a given ID already exists - it will be overwritten. | +| Delete | [DeletePoints](#qdrant-DeletePoints) | [PointsOperationResponse](#qdrant-PointsOperationResponse) | Delete points | +| Get | [GetPoints](#qdrant-GetPoints) | [GetResponse](#qdrant-GetResponse) | Retrieve points | +| UpdateVectors | [UpdatePointVectors](#qdrant-UpdatePointVectors) | [PointsOperationResponse](#qdrant-PointsOperationResponse) | Update named vectors for point | +| DeleteVectors | [DeletePointVectors](#qdrant-DeletePointVectors) | [PointsOperationResponse](#qdrant-PointsOperationResponse) | Delete named vectors for points | +| SetPayload | [SetPayloadPoints](#qdrant-SetPayloadPoints) | [PointsOperationResponse](#qdrant-PointsOperationResponse) | Set payload for points | +| OverwritePayload | [SetPayloadPoints](#qdrant-SetPayloadPoints) | [PointsOperationResponse](#qdrant-PointsOperationResponse) | Overwrite payload for points | +| DeletePayload | [DeletePayloadPoints](#qdrant-DeletePayloadPoints) | [PointsOperationResponse](#qdrant-PointsOperationResponse) | Delete specified key payload for points | +| ClearPayload | [ClearPayloadPoints](#qdrant-ClearPayloadPoints) | [PointsOperationResponse](#qdrant-PointsOperationResponse) | Remove all payload for specified points | +| CreateFieldIndex | [CreateFieldIndexCollection](#qdrant-CreateFieldIndexCollection) | [PointsOperationResponse](#qdrant-PointsOperationResponse) | Create index for field in collection | +| DeleteFieldIndex | [DeleteFieldIndexCollection](#qdrant-DeleteFieldIndexCollection) | [PointsOperationResponse](#qdrant-PointsOperationResponse) | Delete field index for collection | +| Search | [SearchPoints](#qdrant-SearchPoints) | [SearchResponse](#qdrant-SearchResponse) | Retrieve closest points based on vector similarity and given filtering conditions | +| SearchBatch | [SearchBatchPoints](#qdrant-SearchBatchPoints) | [SearchBatchResponse](#qdrant-SearchBatchResponse) | Retrieve closest points based on vector similarity and given filtering conditions | +| SearchGroups | [SearchPointGroups](#qdrant-SearchPointGroups) | [SearchGroupsResponse](#qdrant-SearchGroupsResponse) | Retrieve closest points based on vector similarity and given filtering conditions, grouped by a given field | +| Scroll | [ScrollPoints](#qdrant-ScrollPoints) | [ScrollResponse](#qdrant-ScrollResponse) | Iterate over all or filtered points | +| Recommend | [RecommendPoints](#qdrant-RecommendPoints) | [RecommendResponse](#qdrant-RecommendResponse) | Look for the points which are closer to stored positive examples and at the same time further to negative examples. | +| RecommendBatch | [RecommendBatchPoints](#qdrant-RecommendBatchPoints) | [RecommendBatchResponse](#qdrant-RecommendBatchResponse) | Look for the points which are closer to stored positive examples and at the same time further to negative examples. | +| RecommendGroups | [RecommendPointGroups](#qdrant-RecommendPointGroups) | [RecommendGroupsResponse](#qdrant-RecommendGroupsResponse) | Look for the points which are closer to stored positive examples and at the same time further to negative examples, grouped by a given field | +| Discover | [DiscoverPoints](#qdrant-DiscoverPoints) | [DiscoverResponse](#qdrant-DiscoverResponse) | Use context and a target to find the most similar points to the target, constrained by the context. + +When using only the context (without a target), a special search - called context search - is performed where pairs of points are used to generate a loss that guides the search towards the zone where most positive examples overlap. This means that the score minimizes the scenario of finding a point closer to a negative than to a positive part of a pair. + +Since the score of a context relates to loss, the maximum score a point can get is 0.0, and it becomes normal that many points can have a score of 0.0. + +When using target (with or without context), the score behaves a little different: The integer part of the score represents the rank with respect to the context, while the decimal part of the score relates to the distance to the target. The context part of the score for each pair is calculated +1 if the point is closer to a positive than to a negative part of a pair, and -1 otherwise. | +| DiscoverBatch | [DiscoverBatchPoints](#qdrant-DiscoverBatchPoints) | [DiscoverBatchResponse](#qdrant-DiscoverBatchResponse) | Batch request points based on { positive, negative } pairs of examples, and/or a target | +| Count | [CountPoints](#qdrant-CountPoints) | [CountResponse](#qdrant-CountResponse) | Count points in collection with given filtering conditions | +| UpdateBatch | [UpdateBatchPoints](#qdrant-UpdateBatchPoints) | [UpdateBatchResponse](#qdrant-UpdateBatchResponse) | Perform multiple update operations in one request | +| Query | [QueryPoints](#qdrant-QueryPoints) | [QueryResponse](#qdrant-QueryResponse) | Universally query points. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries. | +| QueryBatch | [QueryBatchPoints](#qdrant-QueryBatchPoints) | [QueryBatchResponse](#qdrant-QueryBatchResponse) | Universally query points in a batch fashion. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries. | +| QueryGroups | [QueryPointGroups](#qdrant-QueryPointGroups) | [QueryGroupsResponse](#qdrant-QueryGroupsResponse) | Universally query points in a group fashion. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries. | +| Facet | [FacetCounts](#qdrant-FacetCounts) | [FacetResponse](#qdrant-FacetResponse) | Perform facet counts. For each value in the field, count the number of points that have this value and match the conditions. | +| SearchMatrixPairs | [SearchMatrixPoints](#qdrant-SearchMatrixPoints) | [SearchMatrixPairsResponse](#qdrant-SearchMatrixPairsResponse) | Compute distance matrix for sampled points with a pair based output format | +| SearchMatrixOffsets | [SearchMatrixPoints](#qdrant-SearchMatrixPoints) | [SearchMatrixOffsetsResponse](#qdrant-SearchMatrixOffsetsResponse) | Compute distance matrix for sampled points with an offset based output format | + + + + + + +

Top

+ +## qdrant.proto + + + + + +### HealthCheckReply + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| title | [string](#string) | | | +| version | [string](#string) | | | +| commit | [string](#string) | optional | | + + + + + + + + +### HealthCheckRequest + + + + + + + + + + + + + + + +### Qdrant + + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| HealthCheck | [HealthCheckRequest](#qdrant-HealthCheckRequest) | [HealthCheckReply](#qdrant-HealthCheckReply) | | + + + + + + +

Top

+ +## qdrant_internal_service.proto + + + + + +### GetConsensusCommitRequest + + + + + + + + + +### GetConsensusCommitResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| commit | [int64](#int64) | | Raft commit as u64 | +| term | [int64](#int64) | | Raft term as u64 | + + + + + + + + +### WaitOnConsensusCommitRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| commit | [int64](#int64) | | Raft commit as u64 | +| term | [int64](#int64) | | Raft term as u64 | +| timeout | [int64](#int64) | | Timeout in seconds | + + + + + + + + +### WaitOnConsensusCommitResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| ok | [bool](#bool) | | False if commit/term is diverged and never reached or if timed out. | + + + + + + + + + + + + + + +### QdrantInternal + + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| GetConsensusCommit | [GetConsensusCommitRequest](#qdrant-GetConsensusCommitRequest) | [GetConsensusCommitResponse](#qdrant-GetConsensusCommitResponse) | Get current commit and term on the target node. | +| WaitOnConsensusCommit | [WaitOnConsensusCommitRequest](#qdrant-WaitOnConsensusCommitRequest) | [WaitOnConsensusCommitResponse](#qdrant-WaitOnConsensusCommitResponse) | Wait until the target node reached the given commit ID. | + + + + + + +

Top

+ +## snapshots_service.proto + + + + + +### CreateFullSnapshotRequest + + + + + + + + + +### CreateSnapshotRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | Name of the collection | + + + + + + + + +### CreateSnapshotResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| snapshot_description | [SnapshotDescription](#qdrant-SnapshotDescription) | | | +| time | [double](#double) | | Time spent to process | + + + + + + + + +### DeleteFullSnapshotRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| snapshot_name | [string](#string) | | Name of the full snapshot | + + + + + + + + +### DeleteSnapshotRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | Name of the collection | +| snapshot_name | [string](#string) | | Name of the collection snapshot | + + + + + + + + +### DeleteSnapshotResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| time | [double](#double) | | Time spent to process | + + + + + + + + +### ListFullSnapshotsRequest + + + + + + + + + +### ListSnapshotsRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| collection_name | [string](#string) | | Name of the collection | + + + + + + + + +### ListSnapshotsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| snapshot_descriptions | [SnapshotDescription](#qdrant-SnapshotDescription) | repeated | | +| time | [double](#double) | | Time spent to process | + + + + + + + + +### SnapshotDescription + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| name | [string](#string) | | Name of the snapshot | +| creation_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Creation time of the snapshot | +| size | [int64](#int64) | | Size of the snapshot in bytes | +| checksum | [string](#string) | optional | SHA256 digest of the snapshot file | + + + + + + + + + + + + + + +### Snapshots + + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| Create | [CreateSnapshotRequest](#qdrant-CreateSnapshotRequest) | [CreateSnapshotResponse](#qdrant-CreateSnapshotResponse) | Create collection snapshot | +| List | [ListSnapshotsRequest](#qdrant-ListSnapshotsRequest) | [ListSnapshotsResponse](#qdrant-ListSnapshotsResponse) | List collection snapshots | +| Delete | [DeleteSnapshotRequest](#qdrant-DeleteSnapshotRequest) | [DeleteSnapshotResponse](#qdrant-DeleteSnapshotResponse) | Delete collection snapshot | +| CreateFull | [CreateFullSnapshotRequest](#qdrant-CreateFullSnapshotRequest) | [CreateSnapshotResponse](#qdrant-CreateSnapshotResponse) | Create full storage snapshot | +| ListFull | [ListFullSnapshotsRequest](#qdrant-ListFullSnapshotsRequest) | [ListSnapshotsResponse](#qdrant-ListSnapshotsResponse) | List full storage snapshots | +| DeleteFull | [DeleteFullSnapshotRequest](#qdrant-DeleteFullSnapshotRequest) | [DeleteSnapshotResponse](#qdrant-DeleteSnapshotResponse) | Delete full storage snapshot | + + + + + +## Scalar Value Types + +| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | +| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | +| double | | double | double | float | float64 | double | float | Float | +| float | | float | float | float | float32 | float | float | Float | +| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | +| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | +| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | +| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | +| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | +| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | +| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | + diff --git a/docs/imgs/call-graph-profile.png b/docs/imgs/call-graph-profile.png new file mode 100644 index 0000000000000000000000000000000000000000..52c33b8528fd87e2622a9c9c0c40ff1ff545e5ad Binary files /dev/null and b/docs/imgs/call-graph-profile.png differ diff --git a/docs/imgs/flamegraph-profile.png b/docs/imgs/flamegraph-profile.png new file mode 100644 index 0000000000000000000000000000000000000000..9d5dc581dc8d3ad02d423900ef0d9dbe3655a72c Binary files /dev/null and b/docs/imgs/flamegraph-profile.png differ diff --git a/docs/logo.svg b/docs/logo.svg new file mode 100644 index 0000000000000000000000000000000000000000..443704b9c39b6ee32c645679c5c6b3c23aebae9b --- /dev/null +++ b/docs/logo.svg @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/redoc/.gitignore b/docs/redoc/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..47f1ca389ed9e7b04babeb66103039115209a4dc --- /dev/null +++ b/docs/redoc/.gitignore @@ -0,0 +1 @@ +/openapi.json \ No newline at end of file diff --git a/docs/redoc/default_version.js b/docs/redoc/default_version.js new file mode 100644 index 0000000000000000000000000000000000000000..fbf6126a2c33e8ed5d1d25ea9e319dd8ad2ee575 --- /dev/null +++ b/docs/redoc/default_version.js @@ -0,0 +1 @@ +const defaultApiVersion = 'v1.12.x'; diff --git a/docs/redoc/index.html b/docs/redoc/index.html new file mode 100644 index 0000000000000000000000000000000000000000..7e49debfbbdd609dc749573f9d98c59e4b67e90f --- /dev/null +++ b/docs/redoc/index.html @@ -0,0 +1,99 @@ + + + + ReDoc + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/redoc/master/openapi.json b/docs/redoc/master/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..b1075700a3dc509563e5360871067142e5fbcb22 --- /dev/null +++ b/docs/redoc/master/openapi.json @@ -0,0 +1,14243 @@ +{ + "paths": { + "/collections/{collection_name}/shards": { + "put": { + "tags": [ + "Distributed" + ], + "summary": "Create shard key", + "operationId": "create_shard_key", + "requestBody": { + "description": "Shard key configuration", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateShardingKey" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to create shards for", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/delete": { + "post": { + "tags": [ + "Distributed" + ], + "summary": "Delete shard key", + "operationId": "delete_shard_key", + "requestBody": { + "description": "Select shard key to delete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DropShardingKey" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to create shards for", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/": { + "get": { + "summary": "Returns information about the running Qdrant instance", + "description": "Returns information about the running Qdrant instance like version and commit id", + "operationId": "root", + "tags": [ + "Service" + ], + "responses": { + "200": { + "description": "Qdrant server version information", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionInfo" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "tags": [ + "Service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + }, + "/metrics": { + "get": { + "summary": "Collect Prometheus metrics data", + "description": "Collect metrics data including app info, collections info, cluster info and statistics", + "operationId": "metrics", + "tags": [ + "Service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Metrics data in Prometheus format", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "# HELP app_info information about qdrant server\n# TYPE app_info gauge\napp_info{name=\"qdrant\",version=\"0.11.1\"} 1\n# HELP cluster_enabled is cluster support enabled\n# TYPE cluster_enabled gauge\ncluster_enabled 0\n# HELP collections_total number of collections\n# TYPE collections_total gauge\ncollections_total 1\n" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/locks": { + "post": { + "summary": "Set lock options", + "description": "Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options", + "operationId": "post_locks", + "tags": [ + "Service" + ], + "requestBody": { + "description": "Lock options and optional error message", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + }, + "get": { + "summary": "Get lock options", + "description": "Get lock options. If write is locked, all write operations and collection creation are forbidden", + "operationId": "get_locks", + "tags": [ + "Service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + } + }, + "/healthz": { + "get": { + "summary": "Kubernetes healthz endpoint", + "description": "An endpoint for health checking used in Kubernetes.", + "operationId": "healthz", + "tags": [ + "Service" + ], + "responses": { + "200": { + "description": "Healthz response", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "healthz check passed" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/livez": { + "get": { + "summary": "Kubernetes livez endpoint", + "description": "An endpoint for health checking used in Kubernetes.", + "operationId": "livez", + "tags": [ + "Service" + ], + "responses": { + "200": { + "description": "Healthz response", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "healthz check passed" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/readyz": { + "get": { + "summary": "Kubernetes readyz endpoint", + "description": "An endpoint for health checking used in Kubernetes.", + "operationId": "readyz", + "tags": [ + "Service" + ], + "responses": { + "200": { + "description": "Healthz response", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "healthz check passed" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/issues": { + "get": { + "summary": "Get issues", + "description": "Get a report of performance issues and configuration suggestions", + "operationId": "get_issues", + "tags": [ + "Beta" + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "4XX": { + "description": "error" + } + } + }, + "delete": { + "summary": "Clear issues", + "description": "Removes all issues reported so far", + "operationId": "clear_issues", + "tags": [ + "Beta" + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "boolean" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "Distributed" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/recover": { + "post": { + "tags": [ + "Distributed" + ], + "summary": "Tries to recover current peer Raft state.", + "operationId": "recover_current_peer", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "Distributed" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "force", + "in": "query", + "description": "If true - removes peer even if it has shards/replicas on it.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "Collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "Collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "Collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "Collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "Collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "Aliases" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "Indexes" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/exists": { + "get": { + "tags": [ + "Collections" + ], + "summary": "Check the existence of a collection", + "description": "Returns \"true\" if the given collection name exists, and \"false\" otherwise", + "operationId": "collection_exists", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/CollectionExistence" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "Indexes" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "Distributed" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "Distributed" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/aliases": { + "get": { + "tags": [ + "Aliases" + ], + "summary": "List aliases for collection", + "description": "Get list of all aliases for a collection", + "operationId": "get_collection_aliases", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/aliases": { + "get": { + "tags": [ + "Aliases" + ], + "summary": "List collections aliases", + "description": "Get list of all existing collections aliases", + "operationId": "get_collections_aliases", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/upload": { + "post": { + "tags": [ + "Snapshots" + ], + "summary": "Recover from an uploaded snapshot", + "description": "Recover local collection data from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_uploaded_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "priority", + "in": "query", + "description": "Defines source of truth for snapshot recovery", + "required": false, + "schema": { + "$ref": "#/components/schemas/SnapshotPriority" + } + }, + { + "name": "checksum", + "in": "query", + "description": "Optional SHA256 checksum to verify snapshot integrity before recovery.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "snapshot": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/recover": { + "put": { + "tags": [ + "Snapshots" + ], + "summary": "Recover from a snapshot", + "description": "Recover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "Snapshots" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "Snapshots" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "Snapshots" + ], + "summary": "Delete collection snapshot", + "description": "Delete snapshot for a collection", + "operationId": "delete_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "Snapshots" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "Snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "Snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "parameters": [ + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "Snapshots" + ], + "summary": "Delete storage snapshot", + "description": "Delete snapshot of the whole storage", + "operationId": "delete_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the full snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "Snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots/upload": { + "post": { + "tags": [ + "Snapshots" + ], + "summary": "Recover shard from an uploaded snapshot", + "description": "Recover shard of a local collection from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection shard.", + "operationId": "recover_shard_from_uploaded_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard to recover", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "priority", + "in": "query", + "description": "Defines source of truth for snapshot recovery", + "required": false, + "schema": { + "$ref": "#/components/schemas/SnapshotPriority" + } + }, + { + "name": "checksum", + "in": "query", + "description": "Optional SHA256 checksum to verify snapshot integrity before recovery.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "snapshot": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots/recover": { + "put": { + "tags": [ + "Snapshots" + ], + "summary": "Recover from a snapshot", + "description": "Recover shard of a local collection data from a snapshot. This will overwrite any data, stored in this shard, for the collection.", + "operationId": "recover_shard_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard to recover", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShardSnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots": { + "get": { + "tags": [ + "Snapshots" + ], + "summary": "List shards snapshots for a collection", + "description": "Get list of snapshots for a shard of a collection", + "operationId": "list_shard_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "Snapshots" + ], + "summary": "Create shard snapshot", + "description": "Create new snapshot of a shard for a collection", + "operationId": "create_shard_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "Snapshots" + ], + "summary": "Delete shard snapshot", + "description": "Delete snapshot of a shard for a collection", + "operationId": "delete_shard_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "Snapshots" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot of a shard from a collection as a file", + "operationId": "get_shard_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "Points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "Points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "Points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "Points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/vectors": { + "put": { + "tags": [ + "Points" + ], + "summary": "Update vectors", + "description": "Update specified named vectors on points, keep unspecified vectors intact.", + "operationId": "update_vectors", + "requestBody": { + "description": "Update named vectors on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateVectors" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/vectors/delete": { + "post": { + "tags": [ + "Points" + ], + "summary": "Delete vectors", + "description": "Delete named vectors from the given points.", + "operationId": "delete_vectors", + "requestBody": { + "description": "Delete named vectors from points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteVectors" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "Points" + ], + "summary": "Set payload", + "description": "Set payload values for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "Points" + ], + "summary": "Overwrite payload", + "description": "Replace full payload of points with new one", + "operationId": "overwrite_payload", + "requestBody": { + "description": "Payload and points selector", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "Points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "Points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/batch": { + "post": { + "tags": [ + "Points" + ], + "summary": "Batch update points", + "description": "Apply a series of update operations for points, vectors and payloads", + "operationId": "batch_update", + "requestBody": { + "description": "update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to apply operations on", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "Points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "Search" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "Search" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/groups": { + "post": { + "tags": [ + "Search" + ], + "summary": "Search point groups", + "description": "Retrieve closest points based on vector similarity and given filtering conditions, grouped by a given payload field", + "operationId": "search_point_groups", + "requestBody": { + "description": "Search request with optional filtering, grouped by a given payload field", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchGroupsRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/GroupsResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "Search" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "Search" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/groups": { + "post": { + "tags": [ + "Search" + ], + "summary": "Recommend point groups", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples, grouped by a given payload field.", + "operationId": "recommend_point_groups", + "requestBody": { + "description": "Request points based on positive and negative examples, grouped by a payload field.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendGroupsRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/GroupsResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/discover": { + "post": { + "tags": [ + "Search" + ], + "summary": "Discover points", + "description": "Use context and a target to find the most similar points to the target, constrained by the context.\nWhen using only the context (without a target), a special search - called context search - is performed where pairs of points are used to generate a loss that guides the search towards the zone where most positive examples overlap. This means that the score minimizes the scenario of finding a point closer to a negative than to a positive part of a pair.\nSince the score of a context relates to loss, the maximum score a point can get is 0.0, and it becomes normal that many points can have a score of 0.0.\nWhen using target (with or without context), the score behaves a little different: The integer part of the score represents the rank with respect to the context, while the decimal part of the score relates to the distance to the target. The context part of the score for each pair is calculated +1 if the point is closer to a positive than to a negative part of a pair, and -1 otherwise.\n", + "operationId": "discover_points", + "requestBody": { + "description": "Request points based on {positive, negative} pairs of examples, and/or a target", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DiscoverRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/discover/batch": { + "post": { + "tags": [ + "Search" + ], + "summary": "Discover batch points", + "description": "Look for points based on target and/or positive and negative example pairs, in batch.", + "operationId": "discover_batch_points", + "requestBody": { + "description": "Batch request points based on { positive, negative } pairs of examples, and/or a target.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DiscoverRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "Points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/facet": { + "post": { + "tags": [ + "Points" + ], + "summary": "Facet a payload key with a given filter.", + "description": "Count points that satisfy the given filter for each unique value of a payload key.", + "operationId": "facet", + "requestBody": { + "description": "Request counts of points for each unique value of a payload key", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FacetRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to facet in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/FacetResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/query": { + "post": { + "tags": [ + "Search" + ], + "summary": "Query points", + "description": "Universally query points. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries.", + "operationId": "query_points", + "requestBody": { + "description": "Describes the query to make to the collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/QueryResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/query/batch": { + "post": { + "tags": [ + "Search" + ], + "summary": "Query points in batch", + "description": "Universally query points in batch. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries.", + "operationId": "query_batch_points", + "requestBody": { + "description": "Describes the queries to make to the collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryResponse" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/query/groups": { + "post": { + "tags": [ + "Search" + ], + "summary": "Query points, grouped by a given payload field", + "description": "Universally query points, grouped by a given payload field", + "operationId": "query_points_groups", + "requestBody": { + "description": "Describes the query to make to the collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryGroupsRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/GroupsResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/matrix/pairs": { + "post": { + "tags": [ + "Search" + ], + "summary": "Search points matrix distance pairs", + "description": "Compute distance matrix for sampled points with a pair based output format", + "operationId": "search_matrix_pairs", + "requestBody": { + "description": "Search matrix request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchMatrixRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/SearchMatrixPairsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/matrix/offsets": { + "post": { + "tags": [ + "Search" + ], + "summary": "Search points matrix distance offsets", + "description": "Compute distance matrix for sampled points with an offset based output format", + "operationId": "search_matrix_offsets", + "requestBody": { + "description": "Search matrix request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchMatrixRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "usage": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HardwareUsage" + }, + { + "nullable": true + } + ] + }, + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/SearchMatrixOffsetsResponse" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [ + { + "api-key": [] + }, + { + "bearerAuth": [] + }, + {} + ], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `min_should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"default_segment_number\": 2,\n \"max_segment_size\": null,\n \"memmap_threshold\": null,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 5,\n \"max_optimization_threads\": null\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "master" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "Collections", + "description": "Searchable collections of points." + }, + { + "name": "Points", + "description": "Float-point vectors with payload." + }, + { + "name": "Search", + "description": "Find points in a collection." + }, + { + "name": "Aliases", + "description": "Additional names for existing collections." + }, + { + "name": "Indexes", + "description": "Indexes for payloads associated with points." + }, + { + "name": "Distributed", + "description": "Service distributed setup." + }, + { + "name": "Snapshots", + "description": "Storage and collections snapshots." + }, + { + "name": "Service", + "description": "Qdrant service utilities." + }, + { + "name": "Beta", + "description": "Beta features, do not depend on these yet." + } + ], + "components": { + "securitySchemes": { + "api-key": { + "type": "apiKey", + "in": "header", + "name": "api-key", + "description": "Authorization key, either read-write or read-only" + }, + "bearerAuth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + }, + "example": { + "collections": [ + { + "name": "arivx-title" + }, + { + "name": "arivx-abstract" + }, + { + "name": "medium-title" + }, + { + "name": "medium-text" + } + ] + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "optimizer_status", + "payload_schema", + "segments_count", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "DEPRECATED: Approximate number of vectors in collection. All vectors in collection are available for querying. Calculated as `points_count x vectors_per_point`. Where `vectors_per_point` is a number of named vectors in schema.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexed_vectors_count": { + "description": "Approximate number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in a specialized vector index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "points_count": { + "description": "Approximate number of points (vectors + payloads) in collection. Each point could be accessed by unique id.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "segments_count": { + "description": "Number of segments in collection. Each segment has independent vector as payload indexes", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection. `Green` - all good. `Yellow` - optimization is running, 'Grey' - optimizations are possible but not triggered, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "grey", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "description": "Information about the collection configuration", + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfig" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + }, + "strict_mode_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/StrictModeConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParams": { + "type": "object", + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "sharding_method": { + "description": "Sharding method Default is Auto - points are distributed across all available shards Custom - points are distributed across shards according to shard key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardingMethod" + }, + { + "nullable": true + } + ] + }, + "replication_factor": { + "description": "Number of replicas for each shard", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "read_fan_out_factor": { + "description": "Defines how many additional replicas should be processing read request at the same time. Default value is Auto, which means that fan-out will be determined automatically based on the busyness of the local replica. Having more than 0 might be useful to smooth latency spikes of individual nodes.", + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.\n\nDefault: true", + "default": true, + "type": "boolean" + }, + "sparse_vectors": { + "description": "Configuration of the sparse vector storage", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorParams" + }, + "nullable": true + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Custom params for quantization. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + }, + "on_disk": { + "description": "If true, vectors are served from disk, improving RAM usage at the cost of latency Default: false", + "type": "boolean", + "nullable": true + }, + "datatype": { + "description": "Defines which datatype should be used to represent vectors in the storage. Choosing different datatypes allows to optimize memory usage and performance vs accuracy.\n\n- For `float32` datatype - vectors are stored as single-precision floating point numbers, 4 bytes. - For `float16` datatype - vectors are stored as half-precision floating point numbers, 2 bytes. - For `uint8` datatype - vectors are stored as unsigned 8-bit integers, 1 byte. It expects vector elements to be in range `[0, 255]`.", + "anyOf": [ + { + "$ref": "#/components/schemas/Datatype" + }, + { + "nullable": true + } + ] + }, + "multivector_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/MultiVectorConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot", + "Manhattan" + ] + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build the index.", + "type": "integer", + "format": "uint", + "minimum": 4, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in kilobytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 10, + "nullable": true + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - automatically select from 8 to 16. Best to keep between 8 and 16 to prevent likelihood of building broken/inefficient HNSW graphs. On small CPUs, less threads are used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, the index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for additional payload-aware HNSW links. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "QuantizationConfig": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScalarQuantization" + }, + { + "$ref": "#/components/schemas/ProductQuantization" + }, + { + "$ref": "#/components/schemas/BinaryQuantization" + } + ] + }, + "ScalarQuantization": { + "type": "object", + "required": [ + "scalar" + ], + "properties": { + "scalar": { + "$ref": "#/components/schemas/ScalarQuantizationConfig" + } + } + }, + "ScalarQuantizationConfig": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/ScalarType" + }, + "quantile": { + "description": "Quantile for quantization. Expected value range in [0.5, 1.0]. If not set - use the whole range of values", + "type": "number", + "format": "float", + "maximum": 1, + "minimum": 0.5, + "nullable": true + }, + "always_ram": { + "description": "If true - quantized vectors always will be stored in RAM, ignoring the config of main storage", + "type": "boolean", + "nullable": true + } + } + }, + "ScalarType": { + "type": "string", + "enum": [ + "int8" + ] + }, + "ProductQuantization": { + "type": "object", + "required": [ + "product" + ], + "properties": { + "product": { + "$ref": "#/components/schemas/ProductQuantizationConfig" + } + } + }, + "ProductQuantizationConfig": { + "type": "object", + "required": [ + "compression" + ], + "properties": { + "compression": { + "$ref": "#/components/schemas/CompressionRatio" + }, + "always_ram": { + "type": "boolean", + "nullable": true + } + } + }, + "CompressionRatio": { + "type": "string", + "enum": [ + "x4", + "x8", + "x16", + "x32", + "x64" + ] + }, + "BinaryQuantization": { + "type": "object", + "required": [ + "binary" + ], + "properties": { + "binary": { + "$ref": "#/components/schemas/BinaryQuantizationConfig" + } + } + }, + "BinaryQuantizationConfig": { + "type": "object", + "properties": { + "always_ram": { + "type": "boolean", + "nullable": true + } + } + }, + "Datatype": { + "type": "string", + "enum": [ + "float32", + "uint8", + "float16" + ] + }, + "MultiVectorConfig": { + "type": "object", + "required": [ + "comparator" + ], + "properties": { + "comparator": { + "$ref": "#/components/schemas/MultiVectorComparator" + } + } + }, + "MultiVectorComparator": { + "type": "string", + "enum": [ + "max_sim" + ] + }, + "ShardingMethod": { + "type": "string", + "enum": [ + "auto", + "custom" + ] + }, + "SparseVectorParams": { + "description": "Params of single sparse vector data storage", + "type": "object", + "properties": { + "index": { + "description": "Custom params for index. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/SparseIndexParams" + }, + { + "nullable": true + } + ] + }, + "modifier": { + "description": "Configures addition value modifications for sparse vectors. Default: none", + "anyOf": [ + { + "$ref": "#/components/schemas/Modifier" + }, + { + "nullable": true + } + ] + } + } + }, + "SparseIndexParams": { + "description": "Configuration for sparse inverted index.", + "type": "object", + "properties": { + "full_scan_threshold": { + "description": "We prefer a full scan search upto (excluding) this number of vectors.\n\nNote: this is number of vectors, not KiloBytes.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "on_disk": { + "description": "Store index on disk. If set to false, the index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "datatype": { + "description": "Defines which datatype should be used for the index. Choosing different datatypes allows to optimize memory usage and performance vs accuracy.\n\n- For `float32` datatype - vectors are stored as single-precision floating point numbers, 4 bytes. - For `float16` datatype - vectors are stored as half-precision floating point numbers, 2 bytes. - For `uint8` datatype - vectors are quantized to unsigned 8-bit integers, 1 byte. Quantization to fit byte range `[0, 255]` happens during indexing automatically, so the actual vector data does not need to conform to this range.", + "anyOf": [ + { + "$ref": "#/components/schemas/Datatype" + }, + { + "nullable": true + } + ] + } + } + }, + "Modifier": { + "description": "If used, include weight modification, which will be applied to sparse vectors at query time: None - no modification (default) Idf - inverse document frequency, based on statistics of the collection", + "type": "string", + "enum": [ + "none", + "idf" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 4 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - automatically select from 8 to 16. Best to keep between 8 and 16 to prevent likelihood of slow building or broken/inefficient HNSW graphs. On small CPUs, less threads are used.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for hnsw graph built for payload index. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "maximum": 1, + "minimum": 0 + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 100 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads. If `default_segment_number = 0`, will be automatically selected by the number of available CPUs.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexing speed is more important - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.\n\nMemmap storage is disabled by default, to enable it, set this threshold to a reasonable value.\n\nTo disable memmap storage, set this to `0`. Internally it will use the largest threshold possible.\n\nNote: 1Kb = 1 vector of size 256", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing\n\nDefault value is 20,000, based on .\n\nTo disable vector indexing, set to `0`.\n\nNote: 1kB = 1 vector of size 256.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Max number of threads (jobs) for running optimizations per shard. Note: each optimization job will also use `max_indexing_threads` threads by itself for index building. If null - have no limit and choose dynamically to saturate CPU. If 0 - no optimization threads, optimizations will be disabled.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "StrictModeConfig": { + "type": "object", + "properties": { + "enabled": { + "description": "Whether strict mode is enabled for a collection or not.", + "type": "boolean", + "nullable": true + }, + "max_query_limit": { + "description": "Max allowed `limit` parameter for all APIs that don't have their own max limit.", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "max_timeout": { + "description": "Max allowed `timeout` parameter.", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "unindexed_filtering_retrieve": { + "description": "Allow usage of unindexed fields in retrieval based (eg. search) filters.", + "type": "boolean", + "nullable": true + }, + "unindexed_filtering_update": { + "description": "Allow usage of unindexed fields in filtered updates (eg. delete by payload).", + "type": "boolean", + "nullable": true + }, + "search_max_hnsw_ef": { + "description": "Max HNSW value allowed in search parameters.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "search_allow_exact": { + "description": "Whether exact search is allowed or not.", + "type": "boolean", + "nullable": true + }, + "search_max_oversampling": { + "description": "Max oversampling value allowed in search.", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type", + "points" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + }, + "points": { + "description": "Number of points indexed with this index", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text", + "bool", + "datetime", + "uuid" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/KeywordIndexParams" + }, + { + "$ref": "#/components/schemas/IntegerIndexParams" + }, + { + "$ref": "#/components/schemas/FloatIndexParams" + }, + { + "$ref": "#/components/schemas/GeoIndexParams" + }, + { + "$ref": "#/components/schemas/TextIndexParams" + }, + { + "$ref": "#/components/schemas/BoolIndexParams" + }, + { + "$ref": "#/components/schemas/DatetimeIndexParams" + }, + { + "$ref": "#/components/schemas/UuidIndexParams" + } + ] + }, + "KeywordIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/KeywordIndexType" + }, + "is_tenant": { + "description": "If true - used for tenant optimization. Default: false.", + "type": "boolean", + "nullable": true + }, + "on_disk": { + "description": "If true, store the index on disk. Default: false.", + "type": "boolean", + "nullable": true + } + } + }, + "KeywordIndexType": { + "type": "string", + "enum": [ + "keyword" + ] + }, + "IntegerIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/IntegerIndexType" + }, + "lookup": { + "description": "If true - support direct lookups.", + "type": "boolean", + "nullable": true + }, + "range": { + "description": "If true - support ranges filters.", + "type": "boolean", + "nullable": true + }, + "is_principal": { + "description": "If true - use this key to organize storage of the collection data. This option assumes that this key will be used in majority of filtered requests.", + "type": "boolean", + "nullable": true + }, + "on_disk": { + "description": "If true, store the index on disk. Default: false.", + "type": "boolean", + "nullable": true + } + } + }, + "IntegerIndexType": { + "type": "string", + "enum": [ + "integer" + ] + }, + "FloatIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/FloatIndexType" + }, + "is_principal": { + "description": "If true - use this key to organize storage of the collection data. This option assumes that this key will be used in majority of filtered requests.", + "type": "boolean", + "nullable": true + }, + "on_disk": { + "description": "If true, store the index on disk. Default: false.", + "type": "boolean", + "nullable": true + } + } + }, + "FloatIndexType": { + "type": "string", + "enum": [ + "float" + ] + }, + "GeoIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/GeoIndexType" + }, + "on_disk": { + "description": "If true, store the index on disk. Default: false.", + "type": "boolean", + "nullable": true + } + } + }, + "GeoIndexType": { + "type": "string", + "enum": [ + "geo" + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "description": "Minimum characters to be tokenized.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "description": "Maximum characters to be tokenized.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true.", + "type": "boolean", + "nullable": true + }, + "on_disk": { + "description": "If true, store the index on disk. Default: false.", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word", + "multilingual" + ] + }, + "BoolIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/BoolIndexType" + } + } + }, + "BoolIndexType": { + "type": "string", + "enum": [ + "bool" + ] + }, + "DatetimeIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/DatetimeIndexType" + }, + "is_principal": { + "description": "If true - use this key to organize storage of the collection data. This option assumes that this key will be used in majority of filtered requests.", + "type": "boolean", + "nullable": true + }, + "on_disk": { + "description": "If true, store the index on disk. Default: false.", + "type": "boolean", + "nullable": true + } + } + }, + "DatetimeIndexType": { + "type": "string", + "enum": [ + "datetime" + ] + }, + "UuidIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/UuidIndexType" + }, + "is_tenant": { + "description": "If true - used for tenant optimization.", + "type": "boolean", + "nullable": true + }, + "on_disk": { + "description": "If true, store the index on disk. Default: false.", + "type": "boolean", + "nullable": true + } + } + }, + "UuidIndexType": { + "type": "string", + "enum": [ + "uuid" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is true.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ShardKeySelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardKey" + } + } + ] + }, + "ShardKey": { + "anyOf": [ + { + "type": "string", + "example": "region_1" + }, + { + "type": "integer", + "format": "uint64", + "minimum": 0, + "example": 12 + } + ] + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0, + "example": 42 + }, + { + "type": "string", + "format": "uuid", + "example": "550e8400-e29b-41d4-a716-446655440000" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStructOutput" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "description": "Shard Key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + }, + "order_value": { + "anyOf": [ + { + "$ref": "#/components/schemas/OrderValue" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true, + "example": { + "city": "London", + "color": "green" + } + }, + "VectorStructOutput": { + "description": "Vector data stored in Point", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + }, + "example": [ + 0.875, + 0.140625, + 0.897599995136261 + ] + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "example": [ + [ + 0.875, + 0.140625, + 0.11020000278949738 + ], + [ + 0.7580000162124634, + 0.28126001358032227, + 0.9687100052833557 + ], + [ + 0.6209999918937683, + 0.42187801003456116, + 0.9375 + ] + ] + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorOutput" + }, + "example": { + "image-embeddings": [ + 0.8730000257492065, + 0.140625, + 0.897599995136261 + ] + } + } + ] + }, + "VectorOutput": { + "description": "Vector Data stored in Point", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/SparseVector" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SparseVector": { + "description": "Sparse vector structure", + "type": "object", + "required": [ + "indices", + "values" + ], + "properties": { + "indices": { + "description": "Indices must be unique", + "type": "array", + "items": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "values": { + "description": "Values and indices must be the same length", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "OrderValue": { + "anyOf": [ + { + "type": "integer", + "format": "int64", + "example": 42 + }, + { + "type": "number", + "format": "double", + "example": 42.5 + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Options for specifying which vectors to include into response. Default is false.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unnamed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + }, + { + "$ref": "#/components/schemas/NamedSparseVector" + } + ] + }, + "NamedVector": { + "description": "Dense vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "NamedSparseVector": { + "description": "Sparse vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "$ref": "#/components/schemas/SparseVector" + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/Condition" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + } + }, + { + "nullable": true + } + ] + }, + "min_should": { + "description": "At least minimum amount of given conditions should match", + "anyOf": [ + { + "$ref": "#/components/schemas/MinShould" + }, + { + "nullable": true + } + ] + }, + "must": { + "description": "All conditions must match", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/Condition" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + } + }, + { + "nullable": true + } + ] + }, + "must_not": { + "description": "All conditions must NOT match", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/Condition" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + } + }, + { + "nullable": true + } + ] + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/IsNullCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/HasVectorCondition" + }, + { + "$ref": "#/components/schemas/NestedCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/RangeInterface" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "geo_polygon": { + "description": "Check if geo point is within a given polygon", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoPolygon" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + }, + { + "$ref": "#/components/schemas/MatchAny" + }, + { + "$ref": "#/components/schemas/MatchExcept" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "MatchAny": { + "description": "Exact match on any of the given values", + "type": "object", + "required": [ + "any" + ], + "properties": { + "any": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "AnyVariants": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "uniqueItems": true + } + ] + }, + "MatchExcept": { + "description": "Should have at least one value not matching the any given values", + "type": "object", + "required": [ + "except" + ], + "properties": { + "except": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "RangeInterface": { + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "$ref": "#/components/schemas/DatetimeRange" + } + ] + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "DatetimeRange": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "string", + "format": "date-time", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "string", + "format": "date-time", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "string", + "format": "date-time", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "GeoPolygon": { + "description": "Geo filter request\n\nMatches coordinates inside the polygon, defined by `exterior` and `interiors`", + "type": "object", + "required": [ + "exterior" + ], + "properties": { + "exterior": { + "$ref": "#/components/schemas/GeoLineString" + }, + "interiors": { + "description": "Interior lines (if present) bound holes within the surface each GeoLineString must consist of a minimum of 4 points, and the first and last points must be the same.", + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoLineString" + }, + "nullable": true + } + } + }, + "GeoLineString": { + "description": "Ordered sequence of GeoPoints representing the line", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoPoint" + } + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "IsNullCondition": { + "description": "Select points with null payload for a specified field", + "type": "object", + "required": [ + "is_null" + ], + "properties": { + "is_null": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "HasVectorCondition": { + "description": "Filter points which have specific vector assigned", + "type": "object", + "required": [ + "has_vector" + ], + "properties": { + "has_vector": { + "type": "string" + } + } + }, + "NestedCondition": { + "type": "object", + "required": [ + "nested" + ], + "properties": { + "nested": { + "$ref": "#/components/schemas/Nested" + } + } + }, + "Nested": { + "description": "Select points with payload for a specified nested field", + "type": "object", + "required": [ + "filter", + "key" + ], + "properties": { + "key": { + "type": "string" + }, + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "MinShould": { + "type": "object", + "required": [ + "conditions", + "min_count" + ], + "properties": { + "conditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + } + }, + "min_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "exact": { + "description": "Search without approximation. If set to true, search may run long but with exact results.", + "default": false, + "type": "boolean" + }, + "quantization": { + "description": "Quantization params", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationSearchParams" + }, + { + "nullable": true + } + ] + }, + "indexed_only": { + "description": "If enabled, the engine will only perform search among indexed or small segments. Using this option prevents slow searches in case of delayed index, but does not guarantee that all uploaded vectors will be included in search results", + "default": false, + "type": "boolean" + } + } + }, + "QuantizationSearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "ignore": { + "description": "If true, quantized vectors are ignored. Default is false.", + "default": false, + "type": "boolean" + }, + "rescore": { + "description": "If true, use original vectors to re-score top-k results. Might require more time in case if original vectors are stored on disk. If not set, qdrant decides automatically apply rescoring or not.", + "default": null, + "type": "boolean", + "nullable": true + }, + "oversampling": { + "description": "Oversampling factor for quantization. Default is 1.0.\n\nDefines how many extra vectors should be pre-selected using quantized index, and then re-scored using original vectors.\n\nFor example, if `oversampling` is 2.4 and `limit` is 100, then 240 vectors will be pre-selected using quantized index, and then top-100 will be returned after re-scoring.", + "default": null, + "type": "number", + "format": "double", + "minimum": 1, + "nullable": true + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0, + "example": 3 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float", + "example": 0.75 + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStructOutput" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "description": "Shard Key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + }, + "order_value": { + "description": "Order-by value", + "anyOf": [ + { + "$ref": "#/components/schemas/OrderValue" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "description": "`Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.", + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which can be ids of points that are already stored in the collection, raw vectors, or even ids and vectors combined.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to the `strategy` chosen.", + "type": "object", + "required": [ + "limit" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "positive": { + "description": "Look for vectors closest to those", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "strategy": { + "description": "How to use positive and negative examples to find the results", + "anyOf": [ + { + "$ref": "#/components/schemas/RecommendStrategy" + }, + { + "nullable": true + } + ] + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Options for specifying which vectors to include into response. Default is false.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "RecommendExample": { + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/SparseVector" + } + ] + }, + "RecommendStrategy": { + "description": "How to use positive and negative examples to find the results, default is `average_vector`:\n\n* `average_vector` - Average positive and negative vectors and create a single query with the formula `query = avg_pos + avg_pos - avg_neg`. Then performs normal search.\n\n* `best_score` - Uses custom search objective. Each candidate is compared against all examples, its score is then chosen from the `max(max_pos_score, max_neg_score)`. If the `max_neg_score` is chosen then it is squared and negated, otherwise it is just the `max_pos_score`.", + "type": "string", + "enum": [ + "average_vector", + "best_score" + ] + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "LookupLocation": { + "description": "Defines a location to use for looking up the vector. Specifies collection and vector field name.", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection used for lookup", + "type": "string" + }, + "vector": { + "description": "Optional name of the vector field within the collection. If not provided, the default vector field will be used.", + "default": null, + "type": "string", + "nullable": true + }, + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is true.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + }, + "order_by": { + "description": "Order the records by a payload field.", + "anyOf": [ + { + "$ref": "#/components/schemas/OrderByInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "OrderByInterface": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/OrderBy" + } + ] + }, + "OrderBy": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key to order by", + "type": "string" + }, + "direction": { + "description": "Direction of ordering: `asc` or `desc`. Default is ascending.", + "anyOf": [ + { + "$ref": "#/components/schemas/Direction" + }, + { + "nullable": true + } + ] + }, + "start_from": { + "description": "Which payload value to start scrolling from. Default is the lowest value for `asc` and the highest for `desc`", + "anyOf": [ + { + "$ref": "#/components/schemas/StartFrom" + }, + { + "nullable": true + } + ] + } + } + }, + "Direction": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "StartFrom": { + "anyOf": [ + { + "type": "integer", + "format": "int64" + }, + { + "type": "number", + "format": "double" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + }, + "example": [ + { + "id": 40, + "payload": { + "city": "London", + "color": "green" + }, + "vector": [ + 0.875, + 0.140625, + 0.897599995136261 + ], + "shard_key": "region_1" + }, + { + "id": 41, + "payload": { + "city": "Paris", + "color": "red" + }, + "vector": [ + 0.75, + 0.640625, + 0.8945000171661377 + ], + "shard_key": "region_1" + } + ] + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "For auto sharding: Number of shards in collection. - Default is 1 for standalone, otherwise equal to the number of nodes - Minimum is 1\n\nFor custom sharding: Number of shards in collection per shard group. - Default is 1, meaning that each shard key will be mapped to a single shard - Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "sharding_method": { + "description": "Sharding method Default is Auto - points are distributed across all available shards Custom - points are distributed across shards according to shard key", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/ShardingMethod" + }, + { + "nullable": true + } + ] + }, + "replication_factor": { + "description": "Number of shards replicas. Default is 1 Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.\n\nDefault: true", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "init_from": { + "description": "Specify other collection to copy data from.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/InitFrom" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Quantization parameters. If none - quantization is disabled.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + }, + "sparse_vectors": { + "description": "Sparse vector data config.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorParams" + }, + "nullable": true + }, + "strict_mode_config": { + "description": "Strict-mode config.", + "anyOf": [ + { + "$ref": "#/components/schemas/StrictModeConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.\n\nMemmap storage is disabled by default, to enable it, set this threshold to a reasonable value.\n\nTo disable memmap storage, set this to `0`.\n\nNote: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing\n\nDefault value is 20,000, based on .\n\nTo disable vector indexing, set to `0`.\n\nNote: 1kB = 1 vector of size 256.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Max number of threads (jobs) for running optimizations per shard. Note: each optimization job will also use `max_indexing_threads` threads by itself for index building. If null - have no limit and choose dynamically to saturate CPU. If 0 - no optimization threads, optimizations will be disabled.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "InitFrom": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "type": "string" + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "vectors": { + "description": "Map of vector data parameters to update for each named vector. To update parameters in a collection having a single unnamed vector, use an empty string as name.", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorsConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - it is left unchanged. This operation is blocking, it will only proceed once all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Collection base params. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionParamsDiff" + }, + { + "nullable": true + } + ] + }, + "hnsw_config": { + "description": "HNSW parameters to update for the collection index. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Quantization parameters to update. If none - it is left unchanged.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfigDiff" + }, + { + "nullable": true + } + ] + }, + "sparse_vectors": { + "description": "Map of sparse vector data parameters to update for each sparse vector.", + "anyOf": [ + { + "$ref": "#/components/schemas/SparseVectorsConfig" + }, + { + "nullable": true + } + ] + }, + "strict_mode_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/StrictModeConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "VectorsConfigDiff": { + "description": "Vector update params for multiple vectors\n\n{ \"vector_name\": { \"hnsw_config\": { \"m\": 8 } } }", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParamsDiff" + } + }, + "VectorParamsDiff": { + "type": "object", + "properties": { + "hnsw_config": { + "description": "Update params for HNSW index. If empty object - it will be unset.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Update params for quantization. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfigDiff" + }, + { + "nullable": true + } + ] + }, + "on_disk": { + "description": "If true, vectors are served from disk, improving RAM usage at the cost of latency", + "type": "boolean", + "nullable": true + } + } + }, + "QuantizationConfigDiff": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScalarQuantization" + }, + { + "$ref": "#/components/schemas/ProductQuantization" + }, + { + "$ref": "#/components/schemas/BinaryQuantization" + }, + { + "$ref": "#/components/schemas/Disabled" + } + ] + }, + "Disabled": { + "type": "string", + "enum": [ + "Disabled" + ] + }, + "CollectionParamsDiff": { + "type": "object", + "properties": { + "replication_factor": { + "description": "Number of replicas for each shard", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Minimal number successful responses from replicas to consider operation successful", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "read_fan_out_factor": { + "description": "Fan-out every read request to these many additional remote nodes (and return first available response)", + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + } + } + }, + "SparseVectorsConfig": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorParams" + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointInsertOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "PointsBatch": { + "type": "object", + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Vector" + } + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Document" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Image" + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/InferenceObject" + } + } + ] + }, + "Vector": { + "description": "Vector Data Vectors can be described directly with values Or specified with source \"objects\" for inference", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/SparseVector" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "$ref": "#/components/schemas/Document" + }, + { + "$ref": "#/components/schemas/Image" + }, + { + "$ref": "#/components/schemas/InferenceObject" + } + ] + }, + "Document": { + "description": "WARN: Work-in-progress, unimplemented\n\nText document for embedding. Requires inference infrastructure, unimplemented.", + "type": "object", + "required": [ + "model", + "text" + ], + "properties": { + "text": { + "description": "Text of the document This field will be used as input for the embedding model", + "type": "string", + "example": "This is a document text" + }, + "model": { + "description": "Name of the model used to generate the vector List of available models depends on a provider", + "type": "string", + "minLength": 1, + "example": "jinaai/jina-embeddings-v2-base-en" + }, + "options": { + "description": "Parameters for the model Values of the parameters are model-specific", + "type": "object", + "additionalProperties": true, + "nullable": true + } + } + }, + "Image": { + "description": "WARN: Work-in-progress, unimplemented\n\nImage object for embedding. Requires inference infrastructure, unimplemented.", + "type": "object", + "required": [ + "image", + "model" + ], + "properties": { + "image": { + "description": "Image data: base64 encoded image or an URL", + "example": "https://example.com/image.jpg" + }, + "model": { + "description": "Name of the model used to generate the vector List of available models depends on a provider", + "type": "string", + "minLength": 1, + "example": "Qdrant/clip-ViT-B-32-vision" + }, + "options": { + "description": "Parameters for the model Values of the parameters are model-specific", + "type": "object", + "additionalProperties": true, + "nullable": true + } + } + }, + "InferenceObject": { + "description": "WARN: Work-in-progress, unimplemented\n\nCustom object for embedding. Requires inference infrastructure, unimplemented.", + "type": "object", + "required": [ + "model", + "object" + ], + "properties": { + "object": { + "description": "Arbitrary data, used as input for the embedding model Used if the model requires more than one input or a custom input" + }, + "model": { + "description": "Name of the model used to generate the vector List of available models depends on a provider", + "type": "string", + "minLength": 1, + "example": "jinaai/jina-embeddings-v2-base-en" + }, + "options": { + "description": "Parameters for the model Values of the parameters are model-specific", + "type": "object", + "additionalProperties": true, + "nullable": true + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + }, + "example": [ + 0.875, + 0.140625, + 0.897599995136261 + ] + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "example": [ + [ + 0.875, + 0.140625, + 0.11020000278949738 + ], + [ + 0.7580000162124634, + 0.28126001358032227, + 0.9687100052833557 + ], + [ + 0.6209999918937683, + 0.42187801003456116, + 0.9375 + ] + ] + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Vector" + }, + "example": { + "image-embeddings": [ + 0.8730000257492065, + 0.140625, + 0.897599995136261 + ] + } + }, + { + "$ref": "#/components/schemas/Document" + }, + { + "$ref": "#/components/schemas/Image" + }, + { + "$ref": "#/components/schemas/InferenceObject" + } + ] + }, + "SetPayload": { + "description": "This data structure is used in API interface and applied across multiple shards", + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Assigns payload to each point that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "key": { + "description": "Assigns payload to each point that satisfy this path of property", + "type": "string", + "nullable": true + } + } + }, + "DeletePayload": { + "description": "This data structure is used in API interface and applied across multiple shards", + "type": "object", + "required": [ + "keys" + ], + "properties": { + "keys": { + "description": "List of payload keys to remove from payload", + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "message_send_failures", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + }, + "message_send_failures": { + "description": "Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MessageSendErrors" + } + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "description": "Role of the peer in the consensus", + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "MessageSendErrors": { + "description": "Message send failures for a particular peer", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "latest_error": { + "type": "string", + "nullable": true + }, + "latest_error_timestamp": { + "description": "Timestamp of the latest error", + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "checksum": { + "type": "string", + "nullable": true + } + }, + "example": { + "name": "my-collection-3766212330831337-2024-07-22-08-31-55.snapshot", + "creation_time": "2022-08-04T10:49:10", + "size": 1000000, + "checksum": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0" + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + }, + "resharding_operations": { + "description": "Resharding operations", + "type": "array", + "items": { + "$ref": "#/components/schemas/ReshardingInfo" + }, + "nullable": true + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "shard_key": { + "description": "User-defined sharding key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ReplicaState": { + "description": "State of the single shard within a replica set.", + "type": "string", + "enum": [ + "Active", + "Dead", + "Partial", + "Initializing", + "Listener", + "Recovery" + ] + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "shard_key": { + "description": "User-defined sharding key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "sync", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "description": "Source peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "description": "Destination peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sync": { + "description": "If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another", + "type": "boolean" + }, + "method": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardTransferMethod" + }, + { + "nullable": true + } + ] + }, + "comment": { + "description": "A human-readable report of the transfer progress. Available only on the source peer.", + "type": "string", + "nullable": true + } + } + }, + "ShardTransferMethod": { + "description": "Methods for transferring a shard from one node to another.", + "oneOf": [ + { + "description": "Stream all shard records in batches until the whole shard is transferred.", + "type": "string", + "enum": [ + "stream_records" + ] + }, + { + "description": "Snapshot the shard, transfer and restore it on the receiver.", + "type": "string", + "enum": [ + "snapshot" + ] + }, + { + "description": "Attempt to transfer shard difference by WAL delta.", + "type": "string", + "enum": [ + "wal_delta" + ] + } + ] + }, + "ReshardingInfo": { + "type": "object", + "required": [ + "direction", + "peer_id", + "shard_id" + ], + "properties": { + "direction": { + "$ref": "#/components/schemas/ReshardingDirection" + }, + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + }, + "comment": { + "description": "A human-readable report of the operation progress. Available only on the source peer.", + "type": "string", + "nullable": true + } + } + }, + "ReshardingDirection": { + "description": "Resharding direction, scale up or down in number of shards", + "oneOf": [ + { + "description": "Scale up, add a new shard", + "type": "string", + "enum": [ + "up" + ] + }, + { + "description": "Scale down, remove a shard", + "type": "string", + "enum": [ + "down" + ] + } + ] + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster", + "collections", + "id", + "requests" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "collections": { + "$ref": "#/components/schemas/CollectionsTelemetry" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterTelemetry" + }, + "requests": { + "$ref": "#/components/schemas/RequestsTelemetry" + }, + "memory": { + "anyOf": [ + { + "$ref": "#/components/schemas/MemoryTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "name", + "startup", + "version" + ], + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppFeaturesTelemetry" + }, + { + "nullable": true + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + { + "nullable": true + } + ] + }, + "jwt_rbac": { + "type": "boolean", + "nullable": true + }, + "hide_jwt_dashboard": { + "type": "boolean", + "nullable": true + }, + "startup": { + "type": "string", + "format": "date-time" + } + } + }, + "AppFeaturesTelemetry": { + "type": "object", + "required": [ + "debug", + "recovery_mode", + "service_debug_feature", + "web_feature" + ], + "properties": { + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + }, + "recovery_mode": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + }, + "cpu_endian": { + "anyOf": [ + { + "$ref": "#/components/schemas/CpuEndian" + }, + { + "nullable": true + } + ] + } + } + }, + "CpuEndian": { + "type": "string", + "enum": [ + "little", + "big", + "other" + ] + }, + "CollectionsTelemetry": { + "type": "object", + "required": [ + "number_of_collections" + ], + "properties": { + "number_of_collections": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetryEnum" + }, + "nullable": true + } + } + }, + "CollectionTelemetryEnum": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionTelemetry" + }, + { + "$ref": "#/components/schemas/CollectionsAggregatedTelemetry" + } + ] + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time_ms", + "resharding", + "shards", + "transfers" + ], + "properties": { + "id": { + "type": "string" + }, + "init_time_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfigInternal" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplicaSetTelemetry" + } + }, + "transfers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + }, + "resharding": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReshardingInfo" + } + } + } + }, + "CollectionConfigInternal": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + }, + "quantization_config": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + }, + "strict_mode_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/StrictModeConfig" + }, + { + "nullable": true + } + ] + }, + "uuid": { + "default": null, + "type": "string", + "format": "uuid", + "nullable": true + } + } + }, + "ReplicaSetTelemetry": { + "type": "object", + "required": [ + "id", + "remote", + "replicate_states" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "local": { + "anyOf": [ + { + "$ref": "#/components/schemas/LocalShardTelemetry" + }, + { + "nullable": true + } + ] + }, + "remote": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardTelemetry" + } + }, + "replicate_states": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ReplicaState" + } + } + } + }, + "LocalShardTelemetry": { + "type": "object", + "required": [ + "optimizations", + "segments", + "total_optimized_points" + ], + "properties": { + "variant_name": { + "type": "string", + "nullable": true + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardStatus" + }, + { + "nullable": true + } + ] + }, + "total_optimized_points": { + "description": "Total number of optimized points since the last start.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizations": { + "$ref": "#/components/schemas/OptimizerTelemetry" + }, + "async_scorer": { + "type": "boolean", + "nullable": true + } + } + }, + "ShardStatus": { + "description": "Current state of the shard (supports same states as the collection)\n\n`Green` - all good. `Yellow` - optimization is running, 'Grey' - optimizations are possible but not triggered, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "grey", + "red" + ] + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index_searches" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index_searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorIndexSearchesTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_indexed_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type", + "vector_data", + "vectors_size_bytes" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_indexed_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "vectors_size_bytes": { + "description": "An ESTIMATION of effective amount of bytes used for vectors Do NOT rely on this number unless you know what you are doing", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + }, + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "VectorDataInfo": { + "type": "object", + "required": [ + "num_deleted_vectors", + "num_indexed_vectors", + "num_vectors" + ], + "properties": { + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_indexed_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "SegmentConfig": { + "type": "object", + "required": [ + "payload_storage_type" + ], + "properties": { + "vector_data": { + "default": {}, + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "sparse_vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorDataConfig" + } + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "index", + "size", + "storage_type" + ], + "properties": { + "size": { + "description": "Size/dimensionality of the vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "storage_type": { + "$ref": "#/components/schemas/VectorStorageType" + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "quantization_config": { + "description": "Vector specific quantization config that overrides collection config", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + }, + "multivector_config": { + "description": "Vector specific configuration to enable multiple vectors per point", + "anyOf": [ + { + "$ref": "#/components/schemas/MultiVectorConfig" + }, + { + "nullable": true + } + ] + }, + "datatype": { + "description": "Vector specific configuration to set specific storage element type", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStorageDatatype" + }, + { + "nullable": true + } + ] + } + } + }, + "VectorStorageType": { + "description": "Storage types for vectors", + "oneOf": [ + { + "description": "Storage in memory (RAM)\n\nWill be very fast at the cost of consuming a lot of memory.", + "type": "string", + "enum": [ + "Memory" + ] + }, + { + "description": "Storage in mmap file, not appendable\n\nSearch performance is defined by disk speed and the fraction of vectors that fit in memory.", + "type": "string", + "enum": [ + "Mmap" + ] + }, + { + "description": "Storage in chunked mmap files, appendable\n\nSearch performance is defined by disk speed and the fraction of vectors that fit in memory.", + "type": "string", + "enum": [ + "ChunkedMmap" + ] + }, + { + "description": "Same as `ChunkedMmap`, but vectors are forced to be locked in RAM In this way we avoid cold requests to disk, but risk to run out of memory\n\nDesigned as a replacement for `Memory`, which doesn't depend on RocksDB", + "type": "string", + "enum": [ + "InRamChunkedMmap" + ] + } + ] + }, + "Indexes": { + "description": "Vector index configuration", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "VectorStorageDatatype": { + "description": "Storage types for vectors", + "type": "string", + "enum": [ + "float32", + "float16", + "uint8" + ] + }, + "SparseVectorDataConfig": { + "description": "Config of single sparse vector data storage", + "type": "object", + "required": [ + "index" + ], + "properties": { + "index": { + "$ref": "#/components/schemas/SparseIndexConfig" + } + } + }, + "SparseIndexConfig": { + "description": "Configuration for sparse inverted index.", + "type": "object", + "required": [ + "index_type" + ], + "properties": { + "full_scan_threshold": { + "description": "We prefer a full scan search upto (excluding) this number of vectors.\n\nNote: this is number of vectors, not KiloBytes.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "index_type": { + "$ref": "#/components/schemas/SparseIndexType" + }, + "datatype": { + "description": "Datatype used to store weights in the index.", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStorageDatatype" + }, + { + "nullable": true + } + ] + } + } + }, + "SparseIndexType": { + "description": "Sparse index types", + "oneOf": [ + { + "description": "Mutable RAM sparse index", + "type": "string", + "enum": [ + "MutableRam" + ] + }, + { + "description": "Immutable RAM sparse index", + "type": "string", + "enum": [ + "ImmutableRam" + ] + }, + { + "description": "Mmap sparse index", + "type": "string", + "enum": [ + "Mmap" + ] + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mmap" + ] + } + } + } + ] + }, + "VectorIndexSearchesTelemetry": { + "type": "object", + "required": [ + "filtered_exact", + "filtered_large_cardinality", + "filtered_plain", + "filtered_small_cardinality", + "filtered_sparse", + "unfiltered_exact", + "unfiltered_hnsw", + "unfiltered_plain", + "unfiltered_sparse" + ], + "properties": { + "index_name": { + "type": "string", + "nullable": true + }, + "unfiltered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_hnsw": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_sparse": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_small_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_large_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_sparse": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "OperationDurationStatistics": { + "type": "object", + "required": [ + "count", + "total_duration_micros" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "avg_duration_micros": { + "description": "The average time taken by 128 latest operations, calculated as a weighted mean.", + "type": "number", + "format": "float", + "nullable": true + }, + "min_duration_micros": { + "description": "The minimum duration of the operations across all the measurements.", + "type": "number", + "format": "float", + "nullable": true + }, + "max_duration_micros": { + "description": "The maximum duration of the operations across all the measurements.", + "type": "number", + "format": "float", + "nullable": true + }, + "total_duration_micros": { + "description": "The total duration of all operations in microseconds.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "last_responded": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "field_name": { + "type": "string", + "nullable": true + }, + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "type": "object", + "required": [ + "log", + "optimizations", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "optimizations": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "log": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TrackerTelemetry" + } + } + } + }, + "TrackerTelemetry": { + "description": "Tracker object used in telemetry", + "type": "object", + "required": [ + "name", + "segment_ids", + "start_at", + "status" + ], + "properties": { + "name": { + "description": "Name of the optimizer", + "type": "string" + }, + "segment_ids": { + "description": "Segment IDs being optimized", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + }, + "status": { + "$ref": "#/components/schemas/TrackerStatus" + }, + "start_at": { + "description": "Start time of the optimizer", + "type": "string", + "format": "date-time" + }, + "end_at": { + "description": "End time of the optimizer", + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "TrackerStatus": { + "description": "Represents the current state of the optimizer being tracked", + "oneOf": [ + { + "type": "string", + "enum": [ + "optimizing", + "done" + ] + }, + { + "type": "object", + "required": [ + "cancelled" + ], + "properties": { + "cancelled": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "RemoteShardTelemetry": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "searches": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "CollectionsAggregatedTelemetry": { + "type": "object", + "required": [ + "optimizers_status", + "params", + "vectors" + ], + "properties": { + "vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "optimizers_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + } + } + }, + "ClusterTelemetry": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterStatusTelemetry" + }, + { + "nullable": true + } + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + }, + { + "nullable": true + } + ] + }, + "peers": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + }, + "nullable": true + }, + "metadata": { + "type": "object", + "additionalProperties": true, + "nullable": true + } + } + }, + "ClusterStatusTelemetry": { + "type": "object", + "required": [ + "commit", + "consensus_thread_status", + "is_voter", + "number_of_peers", + "pending_operations", + "term" + ], + "properties": { + "number_of_peers": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "term": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "role": { + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "type": "boolean" + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "RequestsTelemetry": { + "type": "object", + "required": [ + "grpc", + "rest" + ], + "properties": { + "rest": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc": { + "$ref": "#/components/schemas/GrpcTelemetry" + } + } + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + } + }, + "GrpcTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + }, + "MemoryTelemetry": { + "type": "object", + "required": [ + "active_bytes", + "allocated_bytes", + "metadata_bytes", + "resident_bytes", + "retained_bytes" + ], + "properties": { + "active_bytes": { + "description": "Total number of bytes in active pages allocated by the application", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "allocated_bytes": { + "description": "Total number of bytes allocated by the application", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "metadata_bytes": { + "description": "Total number of bytes dedicated to metadata", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "resident_bytes": { + "description": "Maximum number of bytes in physically resident data pages mapped", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "retained_bytes": { + "description": "Total number of bytes in virtual memory mappings", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/ReplicateShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + }, + { + "$ref": "#/components/schemas/DropReplicaOperation" + }, + { + "$ref": "#/components/schemas/CreateShardingKeyOperation" + }, + { + "$ref": "#/components/schemas/DropShardingKeyOperation" + }, + { + "$ref": "#/components/schemas/RestartTransferOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "method": { + "description": "Method for transferring the shard from one node to another", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardTransferMethod" + }, + { + "nullable": true + } + ] + } + } + }, + "ReplicateShardOperation": { + "type": "object", + "required": [ + "replicate_shard" + ], + "properties": { + "replicate_shard": { + "$ref": "#/components/schemas/ReplicateShard" + } + } + }, + "ReplicateShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "method": { + "description": "Method for transferring the shard from one node to another", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardTransferMethod" + }, + { + "nullable": true + } + ] + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/AbortShardTransfer" + } + } + }, + "AbortShardTransfer": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "DropReplicaOperation": { + "type": "object", + "required": [ + "drop_replica" + ], + "properties": { + "drop_replica": { + "$ref": "#/components/schemas/Replica" + } + } + }, + "Replica": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CreateShardingKeyOperation": { + "type": "object", + "required": [ + "create_sharding_key" + ], + "properties": { + "create_sharding_key": { + "$ref": "#/components/schemas/CreateShardingKey" + } + } + }, + "CreateShardingKey": { + "type": "object", + "required": [ + "shard_key" + ], + "properties": { + "shard_key": { + "$ref": "#/components/schemas/ShardKey" + }, + "shards_number": { + "description": "How many shards to create for this key If not specified, will use the default value from config", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "replication_factor": { + "description": "How many replicas to create for each shard If not specified, will use the default value from config", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "placement": { + "description": "Placement of shards for this key List of peer ids, that can be used to place shards for this key If not specified, will be randomly placed among all peers", + "type": "array", + "items": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "nullable": true + } + } + }, + "DropShardingKeyOperation": { + "type": "object", + "required": [ + "drop_sharding_key" + ], + "properties": { + "drop_sharding_key": { + "$ref": "#/components/schemas/DropShardingKey" + } + } + }, + "DropShardingKey": { + "type": "object", + "required": [ + "shard_key" + ], + "properties": { + "shard_key": { + "$ref": "#/components/schemas/ShardKey" + } + } + }, + "RestartTransferOperation": { + "type": "object", + "required": [ + "restart_transfer" + ], + "properties": { + "restart_transfer": { + "$ref": "#/components/schemas/RestartTransfer" + } + } + }, + "RestartTransfer": { + "type": "object", + "required": [ + "from_peer_id", + "method", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "method": { + "$ref": "#/components/schemas/ShardTransferMethod" + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "LocksOption": { + "type": "object", + "required": [ + "write" + ], + "properties": { + "error_message": { + "type": "string", + "nullable": true + }, + "write": { + "type": "boolean" + } + } + }, + "SnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "description": "Examples: - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot` - Local path `file:///qdrant/snapshots/test_collection-2022-08-04-10-49-10.snapshot`", + "type": "string", + "format": "uri" + }, + "priority": { + "description": "Defines which data should be used as a source of truth if there are other replicas in the cluster. If set to `Snapshot`, the snapshot will be used as a source of truth, and the current state will be overwritten. If set to `Replica`, the current state will be used as a source of truth, and after recovery if will be synchronized with the snapshot.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/SnapshotPriority" + }, + { + "nullable": true + } + ] + }, + "checksum": { + "description": "Optional SHA256 checksum to verify snapshot integrity before recovery.", + "default": null, + "type": "string", + "nullable": true + }, + "api_key": { + "description": "Optional API key used when fetching the snapshot from a remote URL.", + "default": null, + "type": "string", + "nullable": true + } + } + }, + "SnapshotPriority": { + "description": "Defines source of truth for snapshot recovery:\n\n`NoSync` means - restore snapshot without *any* additional synchronization. `Snapshot` means - prefer snapshot data over the current state. `Replica` means - prefer existing data over the snapshot.", + "type": "string", + "enum": [ + "no_sync", + "snapshot", + "replica" + ] + }, + "CollectionsAliasesResponse": { + "type": "object", + "required": [ + "aliases" + ], + "properties": { + "aliases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasDescription" + } + } + } + }, + "AliasDescription": { + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "alias_name": { + "type": "string" + }, + "collection_name": { + "type": "string" + } + }, + "example": { + "alias_name": "blogs-title", + "collection_name": "arivx-title" + } + }, + "WriteOrdering": { + "description": "Defines write ordering guarantees for collection operations\n\n* `weak` - write operations may be reordered, works faster, default\n\n* `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change\n\n* `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down", + "type": "string", + "enum": [ + "weak", + "medium", + "strong" + ] + }, + "ReadConsistency": { + "description": "Read consistency parameter\n\nDefines how many replicas should be queried to get the result\n\n* `N` - send N random request and return points, which present on all of them\n\n* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of them\n\n* `all` - send requests to all nodes and return points which present on all of them\n\nDefault value is `Factor(1)`", + "anyOf": [ + { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + { + "$ref": "#/components/schemas/ReadConsistencyType" + } + ] + }, + "ReadConsistencyType": { + "description": "* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of nodes\n\n* `all` - send requests to all nodes and return points which present on all nodes", + "type": "string", + "enum": [ + "majority", + "quorum", + "all" + ] + }, + "UpdateVectors": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "Points with named vectors", + "type": "array", + "items": { + "$ref": "#/components/schemas/PointVectors" + }, + "minItems": 1 + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointVectors": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + } + } + }, + "DeleteVectors": { + "type": "object", + "required": [ + "vector" + ], + "properties": { + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector names", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointGroup": { + "type": "object", + "required": [ + "hits", + "id" + ], + "properties": { + "hits": { + "description": "Scored points that have the same value of the group_by key", + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + }, + "id": { + "$ref": "#/components/schemas/GroupId" + }, + "lookup": { + "description": "Record that has been looked up using the group id", + "anyOf": [ + { + "$ref": "#/components/schemas/Record" + }, + { + "nullable": true + } + ] + } + } + }, + "GroupId": { + "description": "Value of the group_by key, shared across all the hits in the group", + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "integer", + "format": "int64" + } + ] + }, + "SearchGroupsRequest": { + "type": "object", + "required": [ + "group_by", + "group_size", + "limit", + "vector" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Options for specifying which vectors to include into response. Default is false.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "group_by": { + "description": "Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.", + "type": "string", + "minLength": 1 + }, + "group_size": { + "description": "Maximum amount of points to return per group", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "limit": { + "description": "Maximum amount of groups to return", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "with_lookup": { + "description": "Look for points in another collection using the group ids", + "anyOf": [ + { + "$ref": "#/components/schemas/WithLookupInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "WithLookupInterface": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/WithLookup" + } + ] + }, + "WithLookup": { + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection to use for points lookup", + "type": "string" + }, + "with_payload": { + "description": "Options for specifying which payload to include (or not)", + "default": true, + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vectors": { + "description": "Options for specifying which vectors to include (or not)", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + } + } + }, + "RecommendGroupsRequest": { + "type": "object", + "required": [ + "group_by", + "group_size", + "limit" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "positive": { + "description": "Look for vectors closest to those", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "strategy": { + "description": "How to use positive and negative examples to find the results", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/RecommendStrategy" + }, + { + "nullable": true + } + ] + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Options for specifying which vectors to include into response. Default is false.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + }, + "group_by": { + "description": "Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.", + "type": "string", + "minLength": 1 + }, + "group_size": { + "description": "Maximum amount of points to return per group", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "limit": { + "description": "Maximum amount of groups to return", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "with_lookup": { + "description": "Look for points in another collection using the group ids", + "anyOf": [ + { + "$ref": "#/components/schemas/WithLookupInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "GroupsResult": { + "type": "object", + "required": [ + "groups" + ], + "properties": { + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointGroup" + } + } + } + }, + "UpdateOperations": { + "type": "object", + "required": [ + "operations" + ], + "properties": { + "operations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateOperation" + } + } + } + }, + "UpdateOperation": { + "anyOf": [ + { + "$ref": "#/components/schemas/UpsertOperation" + }, + { + "$ref": "#/components/schemas/DeleteOperation" + }, + { + "$ref": "#/components/schemas/SetPayloadOperation" + }, + { + "$ref": "#/components/schemas/OverwritePayloadOperation" + }, + { + "$ref": "#/components/schemas/DeletePayloadOperation" + }, + { + "$ref": "#/components/schemas/ClearPayloadOperation" + }, + { + "$ref": "#/components/schemas/UpdateVectorsOperation" + }, + { + "$ref": "#/components/schemas/DeleteVectorsOperation" + } + ] + }, + "UpsertOperation": { + "type": "object", + "required": [ + "upsert" + ], + "properties": { + "upsert": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + }, + "DeleteOperation": { + "type": "object", + "required": [ + "delete" + ], + "properties": { + "delete": { + "$ref": "#/components/schemas/PointsSelector" + } + } + }, + "SetPayloadOperation": { + "type": "object", + "required": [ + "set_payload" + ], + "properties": { + "set_payload": { + "$ref": "#/components/schemas/SetPayload" + } + } + }, + "OverwritePayloadOperation": { + "type": "object", + "required": [ + "overwrite_payload" + ], + "properties": { + "overwrite_payload": { + "$ref": "#/components/schemas/SetPayload" + } + } + }, + "DeletePayloadOperation": { + "type": "object", + "required": [ + "delete_payload" + ], + "properties": { + "delete_payload": { + "$ref": "#/components/schemas/DeletePayload" + } + } + }, + "ClearPayloadOperation": { + "type": "object", + "required": [ + "clear_payload" + ], + "properties": { + "clear_payload": { + "$ref": "#/components/schemas/PointsSelector" + } + } + }, + "UpdateVectorsOperation": { + "type": "object", + "required": [ + "update_vectors" + ], + "properties": { + "update_vectors": { + "$ref": "#/components/schemas/UpdateVectors" + } + } + }, + "DeleteVectorsOperation": { + "type": "object", + "required": [ + "delete_vectors" + ], + "properties": { + "delete_vectors": { + "$ref": "#/components/schemas/DeleteVectors" + } + } + }, + "ShardSnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "$ref": "#/components/schemas/ShardSnapshotLocation" + }, + "priority": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/SnapshotPriority" + }, + { + "nullable": true + } + ] + }, + "checksum": { + "description": "Optional SHA256 checksum to verify snapshot integrity before recovery.", + "default": null, + "type": "string", + "nullable": true + }, + "api_key": { + "description": "Optional API key used when fetching the snapshot from a remote URL.", + "default": null, + "type": "string", + "nullable": true + } + } + }, + "ShardSnapshotLocation": { + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "string" + } + ] + }, + "DiscoverRequest": { + "description": "Use context and a target to find the most similar points, constrained by the context.", + "type": "object", + "required": [ + "limit" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "target": { + "description": "Look for vectors closest to this.\n\nWhen using the target (with or without context), the integer part of the score represents the rank with respect to the context, while the decimal part of the score relates to the distance to the target.", + "anyOf": [ + { + "$ref": "#/components/schemas/RecommendExample" + }, + { + "nullable": true + } + ] + }, + "context": { + "description": "Pairs of { positive, negative } examples to constrain the search.\n\nWhen using only the context (without a target), a special search - called context search - is performed where pairs of points are used to generate a loss that guides the search towards the zone where most positive examples overlap. This means that the score minimizes the scenario of finding a point closer to a negative than to a positive part of a pair.\n\nSince the score of a context relates to loss, the maximum score a point can get is 0.0, and it becomes normal that many points can have a score of 0.0.\n\nFor discovery search (when including a target), the context part of the score for each pair is calculated +1 if the point is closer to a positive than to a negative part of a pair, and -1 otherwise.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ContextExamplePair" + }, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Options for specifying which vectors to include into response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "ContextExamplePair": { + "type": "object", + "required": [ + "negative", + "positive" + ], + "properties": { + "positive": { + "$ref": "#/components/schemas/RecommendExample" + }, + "negative": { + "$ref": "#/components/schemas/RecommendExample" + } + } + }, + "DiscoverRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DiscoverRequest" + } + } + } + }, + "VersionInfo": { + "type": "object", + "required": [ + "title", + "version" + ], + "properties": { + "title": { + "type": "string" + }, + "version": { + "type": "string" + }, + "commit": { + "type": "string", + "nullable": true + } + } + }, + "CollectionExistence": { + "description": "State of existence of a collection, true = exists, false = does not exist", + "type": "object", + "required": [ + "exists" + ], + "properties": { + "exists": { + "type": "boolean" + } + } + }, + "QueryRequest": { + "type": "object", + "properties": { + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "prefetch": { + "description": "Sub-requests to perform first. If present, the query will be performed on the results of the prefetch(es).", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/Prefetch" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Prefetch" + } + }, + { + "nullable": true + } + ] + }, + "query": { + "description": "Query to perform. If missing without prefetches, returns points ordered by their IDs.", + "anyOf": [ + { + "$ref": "#/components/schemas/QueryInterface" + }, + { + "nullable": true + } + ] + }, + "using": { + "description": "Define which vector name to use for querying. If missing, the default vector is used.", + "type": "string", + "nullable": true + }, + "filter": { + "description": "Filter conditions - return only those points that satisfy the specified conditions.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Search params for when there is no prefetch", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Return points with scores better than this threshold.", + "type": "number", + "format": "float", + "nullable": true + }, + "limit": { + "description": "Max number of points to return. Default is 10.", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "offset": { + "description": "Offset of the result. Skip this many points. Default is 0", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "with_vector": { + "description": "Options for specifying which vectors to include into the response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Options for specifying which payload to include or not. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location to use for IDs lookup, if not specified - use the current collection and the 'using' vector Note: the other collection vectors should have the same vector size as the 'using' vector in the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "Prefetch": { + "type": "object", + "properties": { + "prefetch": { + "description": "Sub-requests to perform first. If present, the query will be performed on the results of the prefetches.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/Prefetch" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Prefetch" + } + }, + { + "nullable": true + } + ] + }, + "query": { + "description": "Query to perform. If missing without prefetches, returns points ordered by their IDs.", + "anyOf": [ + { + "$ref": "#/components/schemas/QueryInterface" + }, + { + "nullable": true + } + ] + }, + "using": { + "description": "Define which vector name to use for querying. If missing, the default vector is used.", + "type": "string", + "nullable": true + }, + "filter": { + "description": "Filter conditions - return only those points that satisfy the specified conditions.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Search params for when there is no prefetch", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Return points with scores better than this threshold.", + "type": "number", + "format": "float", + "nullable": true + }, + "limit": { + "description": "Max number of points to return. Default is 10.", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "lookup_from": { + "description": "The location to use for IDs lookup, if not specified - use the current collection and the 'using' vector Note: the other collection vectors should have the same vector size as the 'using' vector in the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "QueryInterface": { + "anyOf": [ + { + "$ref": "#/components/schemas/VectorInput" + }, + { + "$ref": "#/components/schemas/Query" + } + ] + }, + "VectorInput": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/SparseVector" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "$ref": "#/components/schemas/Document" + }, + { + "$ref": "#/components/schemas/Image" + }, + { + "$ref": "#/components/schemas/InferenceObject" + } + ] + }, + "Query": { + "anyOf": [ + { + "$ref": "#/components/schemas/NearestQuery" + }, + { + "$ref": "#/components/schemas/RecommendQuery" + }, + { + "$ref": "#/components/schemas/DiscoverQuery" + }, + { + "$ref": "#/components/schemas/ContextQuery" + }, + { + "$ref": "#/components/schemas/OrderByQuery" + }, + { + "$ref": "#/components/schemas/FusionQuery" + }, + { + "$ref": "#/components/schemas/SampleQuery" + } + ] + }, + "NearestQuery": { + "type": "object", + "required": [ + "nearest" + ], + "properties": { + "nearest": { + "$ref": "#/components/schemas/VectorInput" + } + } + }, + "RecommendQuery": { + "type": "object", + "required": [ + "recommend" + ], + "properties": { + "recommend": { + "$ref": "#/components/schemas/RecommendInput" + } + } + }, + "RecommendInput": { + "type": "object", + "properties": { + "positive": { + "description": "Look for vectors closest to the vectors from these points", + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorInput" + }, + "nullable": true + }, + "negative": { + "description": "Try to avoid vectors like the vector from these points", + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorInput" + }, + "nullable": true + }, + "strategy": { + "description": "How to use the provided vectors to find the results", + "anyOf": [ + { + "$ref": "#/components/schemas/RecommendStrategy" + }, + { + "nullable": true + } + ] + } + } + }, + "DiscoverQuery": { + "type": "object", + "required": [ + "discover" + ], + "properties": { + "discover": { + "$ref": "#/components/schemas/DiscoverInput" + } + } + }, + "DiscoverInput": { + "type": "object", + "required": [ + "context", + "target" + ], + "properties": { + "target": { + "$ref": "#/components/schemas/VectorInput" + }, + "context": { + "description": "Search space will be constrained by these pairs of vectors", + "anyOf": [ + { + "$ref": "#/components/schemas/ContextPair" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContextPair" + } + }, + { + "nullable": true + } + ] + } + } + }, + "ContextPair": { + "type": "object", + "required": [ + "negative", + "positive" + ], + "properties": { + "positive": { + "$ref": "#/components/schemas/VectorInput" + }, + "negative": { + "$ref": "#/components/schemas/VectorInput" + } + } + }, + "ContextQuery": { + "type": "object", + "required": [ + "context" + ], + "properties": { + "context": { + "$ref": "#/components/schemas/ContextInput" + } + } + }, + "ContextInput": { + "anyOf": [ + { + "$ref": "#/components/schemas/ContextPair" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContextPair" + } + }, + { + "nullable": true + } + ] + }, + "OrderByQuery": { + "type": "object", + "required": [ + "order_by" + ], + "properties": { + "order_by": { + "$ref": "#/components/schemas/OrderByInterface" + } + } + }, + "FusionQuery": { + "type": "object", + "required": [ + "fusion" + ], + "properties": { + "fusion": { + "$ref": "#/components/schemas/Fusion" + } + } + }, + "Fusion": { + "description": "Fusion algorithm allows to combine results of multiple prefetches.\n\nAvailable fusion algorithms:\n\n* `rrf` - Reciprocal Rank Fusion * `dbsf` - Distribution-Based Score Fusion", + "type": "string", + "enum": [ + "rrf", + "dbsf" + ] + }, + "SampleQuery": { + "type": "object", + "required": [ + "sample" + ], + "properties": { + "sample": { + "$ref": "#/components/schemas/Sample" + } + } + }, + "Sample": { + "type": "string", + "enum": [ + "random" + ] + }, + "QueryRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryRequest" + } + } + } + }, + "QueryResponse": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + }, + "QueryGroupsRequest": { + "type": "object", + "required": [ + "group_by" + ], + "properties": { + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "prefetch": { + "description": "Sub-requests to perform first. If present, the query will be performed on the results of the prefetch(es).", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/Prefetch" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Prefetch" + } + }, + { + "nullable": true + } + ] + }, + "query": { + "description": "Query to perform. If missing without prefetches, returns points ordered by their IDs.", + "anyOf": [ + { + "$ref": "#/components/schemas/QueryInterface" + }, + { + "nullable": true + } + ] + }, + "using": { + "description": "Define which vector name to use for querying. If missing, the default vector is used.", + "type": "string", + "nullable": true + }, + "filter": { + "description": "Filter conditions - return only those points that satisfy the specified conditions.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Search params for when there is no prefetch", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Return points with scores better than this threshold.", + "type": "number", + "format": "float", + "nullable": true + }, + "with_vector": { + "description": "Options for specifying which vectors to include into the response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Options for specifying which payload to include or not. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location to use for IDs lookup, if not specified - use the current collection and the 'using' vector Note: the other collection vectors should have the same vector size as the 'using' vector in the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + }, + "group_by": { + "description": "Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.", + "type": "string", + "minLength": 1 + }, + "group_size": { + "description": "Maximum amount of points to return per group. Default is 3.", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "limit": { + "description": "Maximum amount of groups to return. Default is 10.", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "with_lookup": { + "description": "Look for points in another collection using the group ids", + "anyOf": [ + { + "$ref": "#/components/schemas/WithLookupInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "SearchMatrixRequest": { + "type": "object", + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "sample": { + "description": "How many points to select and search within. Default is 10.", + "type": "integer", + "format": "uint", + "minimum": 2, + "nullable": true + }, + "limit": { + "description": "How many neighbours per sample to find. Default is 3.", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "using": { + "description": "Define which vector name to use for querying. If missing, the default vector is used.", + "type": "string", + "nullable": true + } + } + }, + "SearchMatrixOffsetsResponse": { + "type": "object", + "required": [ + "ids", + "offsets_col", + "offsets_row", + "scores" + ], + "properties": { + "offsets_row": { + "description": "Row indices of the matrix", + "type": "array", + "items": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "offsets_col": { + "description": "Column indices of the matrix", + "type": "array", + "items": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "scores": { + "description": "Scores associated with matrix coordinates", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "ids": { + "description": "Ids of the points in order", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "SearchMatrixPairsResponse": { + "type": "object", + "required": [ + "pairs" + ], + "properties": { + "pairs": { + "description": "List of pairs of points with scores", + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchMatrixPair" + } + } + } + }, + "SearchMatrixPair": { + "description": "Pair of points (a, b) with score", + "type": "object", + "required": [ + "a", + "b", + "score" + ], + "properties": { + "a": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "b": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "score": { + "type": "number", + "format": "float" + } + } + }, + "FacetRequest": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "key": { + "description": "Payload key to use for faceting.", + "type": "string" + }, + "limit": { + "description": "Max number of hits to return. Default is 10.", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "filter": { + "description": "Filter conditions - only consider points that satisfy these conditions.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "Whether to do a more expensive exact count for each of the values in the facet. Default is false.", + "type": "boolean", + "nullable": true + } + } + }, + "FacetResponse": { + "type": "object", + "required": [ + "hits" + ], + "properties": { + "hits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FacetValueHit" + } + } + } + }, + "FacetValueHit": { + "type": "object", + "required": [ + "count", + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/FacetValue" + }, + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "FacetValue": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "HardwareUsage": { + "description": "Usage of the hardware resources, spent to process the request", + "type": "object", + "required": [ + "cpu" + ], + "properties": { + "cpu": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + } + } + } +} diff --git a/docs/redoc/v0.10.0/openapi.json b/docs/redoc/v0.10.0/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..7fb4924604ab038345bf44a22d15ad1613db66b8 --- /dev/null +++ b/docs/redoc/v0.10.0/openapi.json @@ -0,0 +1,5579 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v0.10.0" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "disk_data_size", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "ram_data_size", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_data_size": { + "description": "Disk space, used by collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_data_size": { + "description": "RAM used by collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + } + }, + "CollectionParams": { + "type": "object", + "properties": { + "vectors": { + "description": "Configuration of the vector storage", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorsConfig" + }, + { + "nullable": true + } + ] + }, + "vector_size": { + "description": "Size of a vectors used", + "deprecated": true, + "type": "integer", + "format": "uint64", + "minimum": 1, + "nullable": true + }, + "distance": { + "description": "Type of distance function used for measuring distance between vectors", + "deprecated": true, + "anyOf": [ + { + "$ref": "#/components/schemas/Distance" + }, + { + "nullable": true + } + ] + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256 If not set, mmap will not be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unanmed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "negative", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + } + } + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "properties": { + "vectors": { + "description": "Vector data config. It is possible to provide one config for single vector mode and list of configs for multiple vectors mode.", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorsConfig" + }, + { + "nullable": true + } + ] + }, + "vector_size": { + "description": "Deprecated size setup for single-vector mode. It's required to set one vector_size or vectors field.", + "deprecated": true, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "distance": { + "description": "Deprecated distance setup for single-vector mode. It's required to set one vector_size or vectors field.", + "deprecated": true, + "anyOf": [ + { + "$ref": "#/components/schemas/Distance" + }, + { + "nullable": true + } + ] + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload", + "points" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys", + "points" + ], + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster_status", + "collections", + "configs", + "grpc_calls_statistics", + "id", + "system", + "web" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "system": { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + "configs": { + "$ref": "#/components/schemas/ConfigsTelemetry" + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetry" + } + }, + "web": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc_calls_statistics": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "cluster_status": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "debug", + "service_debug_feature", + "version", + "web_feature" + ], + "properties": { + "version": { + "type": "string" + }, + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "ConfigsTelemetry": { + "type": "object", + "required": [ + "cluster_config", + "service_config" + ], + "properties": { + "service_config": { + "$ref": "#/components/schemas/ServiceConfigTelemetry" + }, + "cluster_config": { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + } + } + }, + "ServiceConfigTelemetry": { + "type": "object", + "required": [ + "enable_cors", + "grpc_enable", + "max_request_size_mb" + ], + "properties": { + "grpc_enable": { + "type": "boolean" + }, + "max_request_size_mb": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_workers": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "enable_cors": { + "type": "boolean" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "enabled", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time", + "shards" + ], + "properties": { + "id": { + "type": "string" + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "init_time": { + "$ref": "#/components/schemas/Duration" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTelemetry" + } + } + } + }, + "Duration": { + "type": "object", + "required": [ + "nanos", + "secs" + ], + "properties": { + "secs": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "nanos": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + } + }, + "ShardTelemetry": { + "oneOf": [ + { + "type": "object", + "required": [ + "Remote" + ], + "properties": { + "Remote": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Local" + ], + "properties": { + "Local": { + "type": "object", + "required": [ + "optimizers", + "segments" + ], + "properties": { + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Proxy" + ], + "properties": { + "Proxy": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ForwardProxy" + ], + "properties": { + "ForwardProxy": { + "type": "object" + } + }, + "additionalProperties": false + } + ] + }, + "TelemetryOperationStatistics": { + "type": "object", + "required": [ + "fail_count", + "ok_avg_time", + "ok_count" + ], + "properties": { + "ok_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ok_avg_time": { + "$ref": "#/components/schemas/Duration" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorIndexTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "index", + "storage_type", + "vector_data" + ], + "properties": { + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "storage_type": { + "$ref": "#/components/schemas/StorageType" + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Indexes": { + "description": "Vector index configuration of the segment", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "StorageType": { + "description": "Type of vector storage", + "oneOf": [ + { + "description": "Store vectors in memory and use persistence storage only if vectors are changed", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "description": "Use memmap to store vectors, a little slower than `InMemory`, but requires little RAM", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mmap" + ] + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "description": "Store payload in memory and use persistence storage only if vectors are changed", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "description": "Store payload on disk only, read each time it is requested", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexTelemetry": { + "type": "object", + "required": [ + "large_cardinality_searches", + "negative_check_cardinality_searches", + "positive_check_cardinality_searches", + "small_cardinality_searches" + ], + "properties": { + "small_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "large_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "positive_check_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "negative_check_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "oneOf": [ + { + "type": "object", + "required": [ + "Indexing" + ], + "properties": { + "Indexing": { + "type": "object", + "required": [ + "optimizations" + ], + "properties": { + "optimizations": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Merge" + ], + "properties": { + "Merge": { + "type": "object", + "required": [ + "optimizations" + ], + "properties": { + "optimizations": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Vacuum" + ], + "properties": { + "Vacuum": { + "type": "object", + "required": [ + "optimizations" + ], + "properties": { + "optimizations": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + } + } + } +} diff --git a/docs/redoc/v0.10.1/openapi.json b/docs/redoc/v0.10.1/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..0aaa2c319f95f1b32035fa7bd5c327e6b227490f --- /dev/null +++ b/docs/redoc/v0.10.1/openapi.json @@ -0,0 +1,5515 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v0.10.1" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256 If not set, mmap will not be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unanmed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "negative", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + } + } + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload", + "points" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys", + "points" + ], + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster_status", + "collections", + "configs", + "grpc_calls_statistics", + "id", + "system", + "web" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "system": { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + "configs": { + "$ref": "#/components/schemas/ConfigsTelemetry" + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetry" + } + }, + "web": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc_calls_statistics": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "cluster_status": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "debug", + "service_debug_feature", + "version", + "web_feature" + ], + "properties": { + "version": { + "type": "string" + }, + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "ConfigsTelemetry": { + "type": "object", + "required": [ + "cluster_config", + "service_config" + ], + "properties": { + "service_config": { + "$ref": "#/components/schemas/ServiceConfigTelemetry" + }, + "cluster_config": { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + } + } + }, + "ServiceConfigTelemetry": { + "type": "object", + "required": [ + "enable_cors", + "grpc_enable", + "max_request_size_mb" + ], + "properties": { + "grpc_enable": { + "type": "boolean" + }, + "max_request_size_mb": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_workers": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "enable_cors": { + "type": "boolean" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "enabled", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time", + "shards" + ], + "properties": { + "id": { + "type": "string" + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "init_time": { + "$ref": "#/components/schemas/Duration" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTelemetry" + } + } + } + }, + "Duration": { + "type": "object", + "required": [ + "nanos", + "secs" + ], + "properties": { + "secs": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "nanos": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + } + }, + "ShardTelemetry": { + "oneOf": [ + { + "type": "object", + "required": [ + "Remote" + ], + "properties": { + "Remote": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Local" + ], + "properties": { + "Local": { + "type": "object", + "required": [ + "optimizers", + "segments" + ], + "properties": { + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Proxy" + ], + "properties": { + "Proxy": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ForwardProxy" + ], + "properties": { + "ForwardProxy": { + "type": "object" + } + }, + "additionalProperties": false + } + ] + }, + "TelemetryOperationStatistics": { + "type": "object", + "required": [ + "fail_count", + "ok_avg_time", + "ok_count" + ], + "properties": { + "ok_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ok_avg_time": { + "$ref": "#/components/schemas/Duration" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorIndexTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "index", + "storage_type", + "vector_data" + ], + "properties": { + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "storage_type": { + "$ref": "#/components/schemas/StorageType" + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Indexes": { + "description": "Vector index configuration of the segment", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "StorageType": { + "description": "Type of vector storage", + "oneOf": [ + { + "description": "Store vectors in memory and use persistence storage only if vectors are changed", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "description": "Use memmap to store vectors, a little slower than `InMemory`, but requires little RAM", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mmap" + ] + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "description": "Store payload in memory and use persistence storage only if vectors are changed", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "description": "Store payload on disk only, read each time it is requested", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexTelemetry": { + "type": "object", + "required": [ + "large_cardinality_searches", + "negative_check_cardinality_searches", + "positive_check_cardinality_searches", + "small_cardinality_searches" + ], + "properties": { + "small_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "large_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "positive_check_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "negative_check_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "oneOf": [ + { + "type": "object", + "required": [ + "Indexing" + ], + "properties": { + "Indexing": { + "type": "object", + "required": [ + "optimizations" + ], + "properties": { + "optimizations": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Merge" + ], + "properties": { + "Merge": { + "type": "object", + "required": [ + "optimizations" + ], + "properties": { + "optimizations": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Vacuum" + ], + "properties": { + "Vacuum": { + "type": "object", + "required": [ + "optimizations" + ], + "properties": { + "optimizations": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + } + } + } +} diff --git a/docs/redoc/v0.10.2/openapi.json b/docs/redoc/v0.10.2/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..06fed7282386150a1927d054cb07acd622812e28 --- /dev/null +++ b/docs/redoc/v0.10.2/openapi.json @@ -0,0 +1,5516 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v0.10.2" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256 If not set, mmap will not be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unanmed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "negative", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + } + } + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload", + "points" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys", + "points" + ], + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster_status", + "collections", + "configs", + "grpc_calls_statistics", + "id", + "system", + "web" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "system": { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + "configs": { + "$ref": "#/components/schemas/ConfigsTelemetry" + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetry" + } + }, + "web": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc_calls_statistics": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "cluster_status": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "debug", + "service_debug_feature", + "version", + "web_feature" + ], + "properties": { + "version": { + "type": "string" + }, + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "ConfigsTelemetry": { + "type": "object", + "required": [ + "cluster_config", + "service_config" + ], + "properties": { + "service_config": { + "$ref": "#/components/schemas/ServiceConfigTelemetry" + }, + "cluster_config": { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + } + } + }, + "ServiceConfigTelemetry": { + "type": "object", + "required": [ + "enable_cors", + "grpc_enable", + "max_request_size_mb" + ], + "properties": { + "grpc_enable": { + "type": "boolean" + }, + "max_request_size_mb": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_workers": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "enable_cors": { + "type": "boolean" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "enabled", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time", + "shards" + ], + "properties": { + "id": { + "type": "string" + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "init_time": { + "$ref": "#/components/schemas/Duration" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTelemetry" + } + } + } + }, + "Duration": { + "type": "object", + "required": [ + "nanos", + "secs" + ], + "properties": { + "secs": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "nanos": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + } + }, + "ShardTelemetry": { + "oneOf": [ + { + "type": "object", + "required": [ + "Remote" + ], + "properties": { + "Remote": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Local" + ], + "properties": { + "Local": { + "type": "object", + "required": [ + "optimizers", + "segments" + ], + "properties": { + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Proxy" + ], + "properties": { + "Proxy": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ForwardProxy" + ], + "properties": { + "ForwardProxy": { + "type": "object" + } + }, + "additionalProperties": false + } + ] + }, + "TelemetryOperationStatistics": { + "type": "object", + "required": [ + "fail_count", + "ok_avg_time", + "ok_count" + ], + "properties": { + "ok_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ok_avg_time": { + "$ref": "#/components/schemas/Duration" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorIndexTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "index", + "storage_type", + "vector_data" + ], + "properties": { + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "storage_type": { + "$ref": "#/components/schemas/StorageType" + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Indexes": { + "description": "Vector index configuration of the segment", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "StorageType": { + "description": "Type of vector storage", + "oneOf": [ + { + "description": "Store vectors in memory and use persistence storage only if vectors are changed", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "description": "Use memmap to store vectors, a little slower than `InMemory`, but requires little RAM", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mmap" + ] + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "description": "Store payload in memory and use persistence storage only if vectors are changed", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "description": "Store payload on disk only, read each time it is requested", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexTelemetry": { + "type": "object", + "required": [ + "large_cardinality_searches", + "negative_check_cardinality_searches", + "positive_check_cardinality_searches", + "small_cardinality_searches" + ], + "properties": { + "small_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "large_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "positive_check_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "negative_check_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "oneOf": [ + { + "type": "object", + "required": [ + "Indexing" + ], + "properties": { + "Indexing": { + "type": "object", + "required": [ + "optimizations" + ], + "properties": { + "optimizations": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Merge" + ], + "properties": { + "Merge": { + "type": "object", + "required": [ + "optimizations" + ], + "properties": { + "optimizations": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Vacuum" + ], + "properties": { + "Vacuum": { + "type": "object", + "required": [ + "optimizations" + ], + "properties": { + "optimizations": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + } + } + } +} diff --git a/docs/redoc/v0.10.3/openapi.json b/docs/redoc/v0.10.3/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..680eea8c4b0ad17c5011bee52a583e42ff0bfa30 --- /dev/null +++ b/docs/redoc/v0.10.3/openapi.json @@ -0,0 +1,5607 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v0.10.3" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Collection if completely ready for requests", + "type": "string", + "enum": [ + "green" + ] + }, + { + "description": "Collection is available, but some segments might be under optimization", + "type": "string", + "enum": [ + "yellow" + ] + }, + { + "description": "Something is not OK: - some operations failed and was not recovered", + "type": "string", + "enum": [ + "red" + ] + } + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "oneOf": [ + { + "description": "", + "type": "string", + "enum": [ + "Cosine" + ] + }, + { + "description": "", + "type": "string", + "enum": [ + "Euclid" + ] + }, + { + "description": "", + "type": "string", + "enum": [ + "Dot" + ] + } + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256 If not set, mmap will not be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unanmed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "oneOf": [ + { + "description": "Request is saved to WAL and will be process in a queue", + "type": "string", + "enum": [ + "acknowledged" + ] + }, + { + "description": "Request is completed, changes are actual", + "type": "string", + "enum": [ + "completed" + ] + } + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "negative", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + } + } + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload", + "points" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys", + "points" + ], + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "oneOf": [ + { + "description": "The node is a follower of the leader.", + "type": "string", + "enum": [ + "Follower" + ] + }, + { + "description": "The node could become a leader.", + "type": "string", + "enum": [ + "Candidate" + ] + }, + { + "description": "The node is a leader.", + "type": "string", + "enum": [ + "Leader" + ] + }, + { + "description": "The node could become a candidate, if `prevote` is enabled.", + "type": "string", + "enum": [ + "PreCandidate" + ] + } + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster_status", + "collections", + "configs", + "grpc_calls_statistics", + "id", + "system", + "web" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "system": { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + "configs": { + "$ref": "#/components/schemas/ConfigsTelemetry" + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetry" + } + }, + "web": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc_calls_statistics": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "cluster_status": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "debug", + "service_debug_feature", + "version", + "web_feature" + ], + "properties": { + "version": { + "type": "string" + }, + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "ConfigsTelemetry": { + "type": "object", + "required": [ + "cluster_config", + "service_config" + ], + "properties": { + "service_config": { + "$ref": "#/components/schemas/ServiceConfigTelemetry" + }, + "cluster_config": { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + } + } + }, + "ServiceConfigTelemetry": { + "type": "object", + "required": [ + "enable_cors", + "grpc_enable", + "max_request_size_mb" + ], + "properties": { + "grpc_enable": { + "type": "boolean" + }, + "max_request_size_mb": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_workers": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "enable_cors": { + "type": "boolean" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "enabled", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time", + "shards" + ], + "properties": { + "id": { + "type": "string" + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "init_time": { + "$ref": "#/components/schemas/Duration" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTelemetry" + } + } + } + }, + "Duration": { + "type": "object", + "required": [ + "nanos", + "secs" + ], + "properties": { + "secs": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "nanos": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + } + }, + "ShardTelemetry": { + "oneOf": [ + { + "type": "object", + "required": [ + "Remote" + ], + "properties": { + "Remote": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Local" + ], + "properties": { + "Local": { + "type": "object", + "required": [ + "optimizers", + "segments" + ], + "properties": { + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Proxy" + ], + "properties": { + "Proxy": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ForwardProxy" + ], + "properties": { + "ForwardProxy": { + "type": "object" + } + }, + "additionalProperties": false + } + ] + }, + "TelemetryOperationStatistics": { + "type": "object", + "required": [ + "fail_count", + "ok_avg_time", + "ok_count" + ], + "properties": { + "ok_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ok_avg_time": { + "$ref": "#/components/schemas/Duration" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorIndexTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "oneOf": [ + { + "description": "There are no index built for the segment, all operations are available", + "type": "string", + "enum": [ + "plain" + ] + }, + { + "description": "Segment with some sort of index built. Optimized for search, appending new points will require reindexing", + "type": "string", + "enum": [ + "indexed" + ] + }, + { + "description": "Some index which you better don't touch", + "type": "string", + "enum": [ + "special" + ] + } + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "index", + "storage_type", + "vector_data" + ], + "properties": { + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "storage_type": { + "$ref": "#/components/schemas/StorageType" + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Indexes": { + "description": "Vector index configuration of the segment", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "StorageType": { + "description": "Type of vector storage", + "oneOf": [ + { + "description": "Store vectors in memory and use persistence storage only if vectors are changed", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "description": "Use memmap to store vectors, a little slower than `InMemory`, but requires little RAM", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mmap" + ] + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "description": "Store payload in memory and use persistence storage only if vectors are changed", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "description": "Store payload on disk only, read each time it is requested", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexTelemetry": { + "type": "object", + "required": [ + "large_cardinality_searches", + "negative_check_cardinality_searches", + "positive_check_cardinality_searches", + "small_cardinality_searches" + ], + "properties": { + "small_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "large_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "positive_check_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "negative_check_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "oneOf": [ + { + "type": "object", + "required": [ + "Indexing" + ], + "properties": { + "Indexing": { + "type": "object", + "required": [ + "optimizations" + ], + "properties": { + "optimizations": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Merge" + ], + "properties": { + "Merge": { + "type": "object", + "required": [ + "optimizations" + ], + "properties": { + "optimizations": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Vacuum" + ], + "properties": { + "Vacuum": { + "type": "object", + "required": [ + "optimizations" + ], + "properties": { + "optimizations": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + } + } + } +} diff --git a/docs/redoc/v0.10.4/openapi.json b/docs/redoc/v0.10.4/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..3c71a751e0bb8f4ccf6ce76d2a6573240cc283d0 --- /dev/null +++ b/docs/redoc/v0.10.4/openapi.json @@ -0,0 +1,5607 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v0.10.4" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Collection if completely ready for requests", + "type": "string", + "enum": [ + "green" + ] + }, + { + "description": "Collection is available, but some segments might be under optimization", + "type": "string", + "enum": [ + "yellow" + ] + }, + { + "description": "Something is not OK: - some operations failed and was not recovered", + "type": "string", + "enum": [ + "red" + ] + } + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "oneOf": [ + { + "description": "", + "type": "string", + "enum": [ + "Cosine" + ] + }, + { + "description": "", + "type": "string", + "enum": [ + "Euclid" + ] + }, + { + "description": "", + "type": "string", + "enum": [ + "Dot" + ] + } + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256 If not set, mmap will not be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unanmed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "oneOf": [ + { + "description": "Request is saved to WAL and will be process in a queue", + "type": "string", + "enum": [ + "acknowledged" + ] + }, + { + "description": "Request is completed, changes are actual", + "type": "string", + "enum": [ + "completed" + ] + } + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "negative", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + } + } + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload", + "points" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys", + "points" + ], + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "oneOf": [ + { + "description": "The node is a follower of the leader.", + "type": "string", + "enum": [ + "Follower" + ] + }, + { + "description": "The node could become a leader.", + "type": "string", + "enum": [ + "Candidate" + ] + }, + { + "description": "The node is a leader.", + "type": "string", + "enum": [ + "Leader" + ] + }, + { + "description": "The node could become a candidate, if `prevote` is enabled.", + "type": "string", + "enum": [ + "PreCandidate" + ] + } + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster_status", + "collections", + "configs", + "grpc_calls_statistics", + "id", + "system", + "web" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "system": { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + "configs": { + "$ref": "#/components/schemas/ConfigsTelemetry" + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetry" + } + }, + "web": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc_calls_statistics": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "cluster_status": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "debug", + "service_debug_feature", + "version", + "web_feature" + ], + "properties": { + "version": { + "type": "string" + }, + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "ConfigsTelemetry": { + "type": "object", + "required": [ + "cluster_config", + "service_config" + ], + "properties": { + "service_config": { + "$ref": "#/components/schemas/ServiceConfigTelemetry" + }, + "cluster_config": { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + } + } + }, + "ServiceConfigTelemetry": { + "type": "object", + "required": [ + "enable_cors", + "grpc_enable", + "max_request_size_mb" + ], + "properties": { + "grpc_enable": { + "type": "boolean" + }, + "max_request_size_mb": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_workers": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "enable_cors": { + "type": "boolean" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "enabled", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time", + "shards" + ], + "properties": { + "id": { + "type": "string" + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "init_time": { + "$ref": "#/components/schemas/Duration" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTelemetry" + } + } + } + }, + "Duration": { + "type": "object", + "required": [ + "nanos", + "secs" + ], + "properties": { + "secs": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "nanos": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + } + }, + "ShardTelemetry": { + "oneOf": [ + { + "type": "object", + "required": [ + "Remote" + ], + "properties": { + "Remote": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Local" + ], + "properties": { + "Local": { + "type": "object", + "required": [ + "optimizers", + "segments" + ], + "properties": { + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Proxy" + ], + "properties": { + "Proxy": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ForwardProxy" + ], + "properties": { + "ForwardProxy": { + "type": "object" + } + }, + "additionalProperties": false + } + ] + }, + "TelemetryOperationStatistics": { + "type": "object", + "required": [ + "fail_count", + "ok_avg_time", + "ok_count" + ], + "properties": { + "ok_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ok_avg_time": { + "$ref": "#/components/schemas/Duration" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorIndexTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "oneOf": [ + { + "description": "There are no index built for the segment, all operations are available", + "type": "string", + "enum": [ + "plain" + ] + }, + { + "description": "Segment with some sort of index built. Optimized for search, appending new points will require reindexing", + "type": "string", + "enum": [ + "indexed" + ] + }, + { + "description": "Some index which you better don't touch", + "type": "string", + "enum": [ + "special" + ] + } + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "index", + "storage_type", + "vector_data" + ], + "properties": { + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "storage_type": { + "$ref": "#/components/schemas/StorageType" + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Indexes": { + "description": "Vector index configuration of the segment", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "StorageType": { + "description": "Type of vector storage", + "oneOf": [ + { + "description": "Store vectors in memory and use persistence storage only if vectors are changed", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "description": "Use memmap to store vectors, a little slower than `InMemory`, but requires little RAM", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mmap" + ] + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "description": "Store payload in memory and use persistence storage only if vectors are changed", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "description": "Store payload on disk only, read each time it is requested", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexTelemetry": { + "type": "object", + "required": [ + "large_cardinality_searches", + "negative_check_cardinality_searches", + "positive_check_cardinality_searches", + "small_cardinality_searches" + ], + "properties": { + "small_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "large_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "positive_check_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "negative_check_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "oneOf": [ + { + "type": "object", + "required": [ + "Indexing" + ], + "properties": { + "Indexing": { + "type": "object", + "required": [ + "optimizations" + ], + "properties": { + "optimizations": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Merge" + ], + "properties": { + "Merge": { + "type": "object", + "required": [ + "optimizations" + ], + "properties": { + "optimizations": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Vacuum" + ], + "properties": { + "Vacuum": { + "type": "object", + "required": [ + "optimizations" + ], + "properties": { + "optimizations": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + } + } + } +} diff --git a/docs/redoc/v0.10.5/openapi.json b/docs/redoc/v0.10.5/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..83f66e7484d9825d0acb03b706b22c562afa7de4 --- /dev/null +++ b/docs/redoc/v0.10.5/openapi.json @@ -0,0 +1,5607 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v0.10.5" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Collection if completely ready for requests", + "type": "string", + "enum": [ + "green" + ] + }, + { + "description": "Collection is available, but some segments might be under optimization", + "type": "string", + "enum": [ + "yellow" + ] + }, + { + "description": "Something is not OK: - some operations failed and was not recovered", + "type": "string", + "enum": [ + "red" + ] + } + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "oneOf": [ + { + "description": "", + "type": "string", + "enum": [ + "Cosine" + ] + }, + { + "description": "", + "type": "string", + "enum": [ + "Euclid" + ] + }, + { + "description": "", + "type": "string", + "enum": [ + "Dot" + ] + } + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256 If not set, mmap will not be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unanmed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "oneOf": [ + { + "description": "Request is saved to WAL and will be process in a queue", + "type": "string", + "enum": [ + "acknowledged" + ] + }, + { + "description": "Request is completed, changes are actual", + "type": "string", + "enum": [ + "completed" + ] + } + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "negative", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + } + } + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload", + "points" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys", + "points" + ], + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "oneOf": [ + { + "description": "The node is a follower of the leader.", + "type": "string", + "enum": [ + "Follower" + ] + }, + { + "description": "The node could become a leader.", + "type": "string", + "enum": [ + "Candidate" + ] + }, + { + "description": "The node is a leader.", + "type": "string", + "enum": [ + "Leader" + ] + }, + { + "description": "The node could become a candidate, if `prevote` is enabled.", + "type": "string", + "enum": [ + "PreCandidate" + ] + } + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster_status", + "collections", + "configs", + "grpc_calls_statistics", + "id", + "system", + "web" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "system": { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + "configs": { + "$ref": "#/components/schemas/ConfigsTelemetry" + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetry" + } + }, + "web": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc_calls_statistics": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "cluster_status": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "debug", + "service_debug_feature", + "version", + "web_feature" + ], + "properties": { + "version": { + "type": "string" + }, + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "ConfigsTelemetry": { + "type": "object", + "required": [ + "cluster_config", + "service_config" + ], + "properties": { + "service_config": { + "$ref": "#/components/schemas/ServiceConfigTelemetry" + }, + "cluster_config": { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + } + } + }, + "ServiceConfigTelemetry": { + "type": "object", + "required": [ + "enable_cors", + "grpc_enable", + "max_request_size_mb" + ], + "properties": { + "grpc_enable": { + "type": "boolean" + }, + "max_request_size_mb": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_workers": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "enable_cors": { + "type": "boolean" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "enabled", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time", + "shards" + ], + "properties": { + "id": { + "type": "string" + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "init_time": { + "$ref": "#/components/schemas/Duration" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTelemetry" + } + } + } + }, + "Duration": { + "type": "object", + "required": [ + "nanos", + "secs" + ], + "properties": { + "secs": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "nanos": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + } + }, + "ShardTelemetry": { + "oneOf": [ + { + "type": "object", + "required": [ + "Remote" + ], + "properties": { + "Remote": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Local" + ], + "properties": { + "Local": { + "type": "object", + "required": [ + "optimizers", + "segments" + ], + "properties": { + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Proxy" + ], + "properties": { + "Proxy": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ForwardProxy" + ], + "properties": { + "ForwardProxy": { + "type": "object" + } + }, + "additionalProperties": false + } + ] + }, + "TelemetryOperationStatistics": { + "type": "object", + "required": [ + "fail_count", + "ok_avg_time", + "ok_count" + ], + "properties": { + "ok_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ok_avg_time": { + "$ref": "#/components/schemas/Duration" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorIndexTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "oneOf": [ + { + "description": "There are no index built for the segment, all operations are available", + "type": "string", + "enum": [ + "plain" + ] + }, + { + "description": "Segment with some sort of index built. Optimized for search, appending new points will require reindexing", + "type": "string", + "enum": [ + "indexed" + ] + }, + { + "description": "Some index which you better don't touch", + "type": "string", + "enum": [ + "special" + ] + } + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "index", + "storage_type", + "vector_data" + ], + "properties": { + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "storage_type": { + "$ref": "#/components/schemas/StorageType" + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Indexes": { + "description": "Vector index configuration of the segment", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "StorageType": { + "description": "Type of vector storage", + "oneOf": [ + { + "description": "Store vectors in memory and use persistence storage only if vectors are changed", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "description": "Use memmap to store vectors, a little slower than `InMemory`, but requires little RAM", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mmap" + ] + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "description": "Store payload in memory and use persistence storage only if vectors are changed", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "description": "Store payload on disk only, read each time it is requested", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexTelemetry": { + "type": "object", + "required": [ + "large_cardinality_searches", + "negative_check_cardinality_searches", + "positive_check_cardinality_searches", + "small_cardinality_searches" + ], + "properties": { + "small_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "large_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "positive_check_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "negative_check_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "oneOf": [ + { + "type": "object", + "required": [ + "Indexing" + ], + "properties": { + "Indexing": { + "type": "object", + "required": [ + "optimizations" + ], + "properties": { + "optimizations": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Merge" + ], + "properties": { + "Merge": { + "type": "object", + "required": [ + "optimizations" + ], + "properties": { + "optimizations": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Vacuum" + ], + "properties": { + "Vacuum": { + "type": "object", + "required": [ + "optimizations" + ], + "properties": { + "optimizations": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + } + } + } +} diff --git a/docs/redoc/v0.11.0/openapi.json b/docs/redoc/v0.11.0/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..40d26ee47d8c2c73f37bce516ed687bd3d502bf1 --- /dev/null +++ b/docs/redoc/v0.11.0/openapi.json @@ -0,0 +1,5910 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + } + }, + "/locks": { + "post": { + "summary": "Set lock options", + "description": "Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options", + "operationId": "post_locks", + "tags": [ + "service" + ], + "requestBody": { + "description": "Lock options and optional error message", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + }, + "get": { + "summary": "Get lock options", + "description": "Get lock options. If write is locked, all write operations and collection creation are forbidden", + "operationId": "get_locks", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "force", + "in": "query", + "description": "If true - removes peer even if it has shards/replicas on it.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v0.11.0" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection All vectors in collection are available for querying Calculated as `points_count x vectors_per_point` Where `vectors_per_point` is a number of named vectors in schema", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in vector index (HNSW)", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points (vectors + payloads) in collection Each point could be accessed by unique id", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection. Each segment has independent vector as payload indexes", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection. `Green` - all good. `Yellow` - optimization is running, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "replication_factor": { + "description": "Number of replicas for each shard", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256 If not set, mmap will not be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type", + "points" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + }, + "points": { + "description": "Number of points indexed with this index", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unanmed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "exact": { + "description": "Search without approximation. If set to true, search may run long but with exact results.", + "default": false, + "type": "boolean" + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "description": "`Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.", + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "negative", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + } + } + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "replication_factor": { + "description": "Number of shards replicas. Default is 1 Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Collection base params. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionParamsDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParamsDiff": { + "type": "object", + "properties": { + "replication_factor": { + "description": "Number of replicas for each shard", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Minimal number successful responses from replicas to consider operation successful", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload", + "points" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys", + "points" + ], + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "message_send_failures", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + }, + "message_send_failures": { + "description": "Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MessageSendErrors" + } + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "description": "Role of the peer in the consensus", + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "MessageSendErrors": { + "description": "Message send failures for a particular peer", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "latest_error": { + "type": "string", + "nullable": true + } + } + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ReplicaState": { + "description": "State of the single shard within a replica set.", + "type": "string", + "enum": [ + "Active", + "Dead", + "Partial" + ] + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "sync", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sync": { + "description": "If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another", + "type": "boolean" + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster", + "collections", + "id", + "requests" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "collections": { + "$ref": "#/components/schemas/CollectionsTelemetry" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterTelemetry" + }, + "requests": { + "$ref": "#/components/schemas/RequestsTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppFeaturesTelemetry" + }, + { + "nullable": true + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "AppFeaturesTelemetry": { + "type": "object", + "required": [ + "debug", + "service_debug_feature", + "web_feature" + ], + "properties": { + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "CollectionsTelemetry": { + "type": "object", + "required": [ + "number_of_collections" + ], + "properties": { + "number_of_collections": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetryEnum" + }, + "nullable": true + } + } + }, + "CollectionTelemetryEnum": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionTelemetry" + }, + { + "$ref": "#/components/schemas/CollectionsAggregatedTelemetry" + } + ] + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time_ms", + "shards" + ], + "properties": { + "id": { + "type": "string" + }, + "init_time_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplicaSetTelemetry" + } + } + } + }, + "ReplicaSetTelemetry": { + "type": "object", + "required": [ + "id", + "remote" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "local": { + "anyOf": [ + { + "$ref": "#/components/schemas/LocalShardTelemetry" + }, + { + "nullable": true + } + ] + }, + "remote": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardTelemetry" + } + } + } + }, + "LocalShardTelemetry": { + "type": "object", + "required": [ + "optimizations", + "segments" + ], + "properties": { + "variant_name": { + "type": "string", + "nullable": true + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizations": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index_searches" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index_searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorIndexSearchesTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "index", + "storage_type", + "vector_data" + ], + "properties": { + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "storage_type": { + "$ref": "#/components/schemas/StorageType" + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Indexes": { + "description": "Vector index configuration of the segment", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "StorageType": { + "description": "Type of vector storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mmap" + ] + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexSearchesTelemetry": { + "type": "object", + "required": [ + "filtered_exact", + "filtered_large_cardinality", + "filtered_plain", + "filtered_small_cardinality", + "unfiltered_exact", + "unfiltered_hnsw", + "unfiltered_plain" + ], + "properties": { + "index_name": { + "type": "string", + "nullable": true + }, + "unfiltered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_hnsw": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_small_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_large_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "OperationDurationStatistics": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "avg_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "min_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "max_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "field_name": { + "type": "string", + "nullable": true + }, + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "type": "object", + "required": [ + "optimizations", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "optimizations": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "RemoteShardTelemetry": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "searches": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "CollectionsAggregatedTelemetry": { + "type": "object", + "required": [ + "optimizers_status", + "params", + "vectors" + ], + "properties": { + "vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "optimizers_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + } + } + }, + "ClusterTelemetry": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterStatusTelemetry" + }, + { + "nullable": true + } + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatusTelemetry": { + "type": "object", + "required": [ + "commit", + "is_voter", + "number_of_peers", + "pending_operations", + "term" + ], + "properties": { + "number_of_peers": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "term": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "role": { + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "type": "boolean" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "RequestsTelemetry": { + "type": "object", + "required": [ + "grpc", + "rest" + ], + "properties": { + "rest": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc": { + "$ref": "#/components/schemas/GrpcTelemetry" + } + } + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + } + }, + "GrpcTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/ReplicateShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + }, + { + "$ref": "#/components/schemas/DropReplicaOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ReplicateShardOperation": { + "type": "object", + "required": [ + "replicate_shard" + ], + "properties": { + "replicate_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "DropReplicaOperation": { + "type": "object", + "required": [ + "drop_replica" + ], + "properties": { + "drop_replica": { + "$ref": "#/components/schemas/Replica" + } + } + }, + "Replica": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "LocksOption": { + "type": "object", + "required": [ + "write" + ], + "properties": { + "error_message": { + "type": "string", + "nullable": true + }, + "write": { + "type": "boolean" + } + } + } + } + } +} diff --git a/docs/redoc/v0.11.1/openapi.json b/docs/redoc/v0.11.1/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..ae91d50cbe6195bcdb6f1e3e6db4e5686fa48bbe --- /dev/null +++ b/docs/redoc/v0.11.1/openapi.json @@ -0,0 +1,5910 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + } + }, + "/locks": { + "post": { + "summary": "Set lock options", + "description": "Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options", + "operationId": "post_locks", + "tags": [ + "service" + ], + "requestBody": { + "description": "Lock options and optional error message", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + }, + "get": { + "summary": "Get lock options", + "description": "Get lock options. If write is locked, all write operations and collection creation are forbidden", + "operationId": "get_locks", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "force", + "in": "query", + "description": "If true - removes peer even if it has shards/replicas on it.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "0.11.1" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection All vectors in collection are available for querying Calculated as `points_count x vectors_per_point` Where `vectors_per_point` is a number of named vectors in schema", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in vector index (HNSW)", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points (vectors + payloads) in collection Each point could be accessed by unique id", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection. Each segment has independent vector as payload indexes", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection. `Green` - all good. `Yellow` - optimization is running, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "replication_factor": { + "description": "Number of replicas for each shard", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256 If not set, mmap will not be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type", + "points" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + }, + "points": { + "description": "Number of points indexed with this index", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unanmed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "exact": { + "description": "Search without approximation. If set to true, search may run long but with exact results.", + "default": false, + "type": "boolean" + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "description": "`Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.", + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "negative", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + } + } + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "replication_factor": { + "description": "Number of shards replicas. Default is 1 Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Collection base params. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionParamsDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParamsDiff": { + "type": "object", + "properties": { + "replication_factor": { + "description": "Number of replicas for each shard", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Minimal number successful responses from replicas to consider operation successful", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload", + "points" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys", + "points" + ], + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "message_send_failures", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + }, + "message_send_failures": { + "description": "Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MessageSendErrors" + } + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "description": "Role of the peer in the consensus", + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "MessageSendErrors": { + "description": "Message send failures for a particular peer", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "latest_error": { + "type": "string", + "nullable": true + } + } + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ReplicaState": { + "description": "State of the single shard within a replica set.", + "type": "string", + "enum": [ + "Active", + "Dead", + "Partial" + ] + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "sync", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sync": { + "description": "If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another", + "type": "boolean" + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster", + "collections", + "id", + "requests" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "collections": { + "$ref": "#/components/schemas/CollectionsTelemetry" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterTelemetry" + }, + "requests": { + "$ref": "#/components/schemas/RequestsTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppFeaturesTelemetry" + }, + { + "nullable": true + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "AppFeaturesTelemetry": { + "type": "object", + "required": [ + "debug", + "service_debug_feature", + "web_feature" + ], + "properties": { + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "CollectionsTelemetry": { + "type": "object", + "required": [ + "number_of_collections" + ], + "properties": { + "number_of_collections": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetryEnum" + }, + "nullable": true + } + } + }, + "CollectionTelemetryEnum": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionTelemetry" + }, + { + "$ref": "#/components/schemas/CollectionsAggregatedTelemetry" + } + ] + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time_ms", + "shards" + ], + "properties": { + "id": { + "type": "string" + }, + "init_time_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplicaSetTelemetry" + } + } + } + }, + "ReplicaSetTelemetry": { + "type": "object", + "required": [ + "id", + "remote" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "local": { + "anyOf": [ + { + "$ref": "#/components/schemas/LocalShardTelemetry" + }, + { + "nullable": true + } + ] + }, + "remote": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardTelemetry" + } + } + } + }, + "LocalShardTelemetry": { + "type": "object", + "required": [ + "optimizations", + "segments" + ], + "properties": { + "variant_name": { + "type": "string", + "nullable": true + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizations": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index_searches" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index_searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorIndexSearchesTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "index", + "storage_type", + "vector_data" + ], + "properties": { + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "storage_type": { + "$ref": "#/components/schemas/StorageType" + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Indexes": { + "description": "Vector index configuration of the segment", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "StorageType": { + "description": "Type of vector storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mmap" + ] + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexSearchesTelemetry": { + "type": "object", + "required": [ + "filtered_exact", + "filtered_large_cardinality", + "filtered_plain", + "filtered_small_cardinality", + "unfiltered_exact", + "unfiltered_hnsw", + "unfiltered_plain" + ], + "properties": { + "index_name": { + "type": "string", + "nullable": true + }, + "unfiltered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_hnsw": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_small_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_large_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "OperationDurationStatistics": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "avg_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "min_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "max_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "field_name": { + "type": "string", + "nullable": true + }, + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "type": "object", + "required": [ + "optimizations", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "optimizations": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "RemoteShardTelemetry": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "searches": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "CollectionsAggregatedTelemetry": { + "type": "object", + "required": [ + "optimizers_status", + "params", + "vectors" + ], + "properties": { + "vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "optimizers_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + } + } + }, + "ClusterTelemetry": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterStatusTelemetry" + }, + { + "nullable": true + } + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatusTelemetry": { + "type": "object", + "required": [ + "commit", + "is_voter", + "number_of_peers", + "pending_operations", + "term" + ], + "properties": { + "number_of_peers": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "term": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "role": { + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "type": "boolean" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "RequestsTelemetry": { + "type": "object", + "required": [ + "grpc", + "rest" + ], + "properties": { + "rest": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc": { + "$ref": "#/components/schemas/GrpcTelemetry" + } + } + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + } + }, + "GrpcTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/ReplicateShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + }, + { + "$ref": "#/components/schemas/DropReplicaOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ReplicateShardOperation": { + "type": "object", + "required": [ + "replicate_shard" + ], + "properties": { + "replicate_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "DropReplicaOperation": { + "type": "object", + "required": [ + "drop_replica" + ], + "properties": { + "drop_replica": { + "$ref": "#/components/schemas/Replica" + } + } + }, + "Replica": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "LocksOption": { + "type": "object", + "required": [ + "write" + ], + "properties": { + "error_message": { + "type": "string", + "nullable": true + }, + "write": { + "type": "boolean" + } + } + } + } + } +} diff --git a/docs/redoc/v0.11.2/openapi.json b/docs/redoc/v0.11.2/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..70f735f62da2685a3850f9691cfe0c210225d2db --- /dev/null +++ b/docs/redoc/v0.11.2/openapi.json @@ -0,0 +1,5910 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + } + }, + "/locks": { + "post": { + "summary": "Set lock options", + "description": "Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options", + "operationId": "post_locks", + "tags": [ + "service" + ], + "requestBody": { + "description": "Lock options and optional error message", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + }, + "get": { + "summary": "Get lock options", + "description": "Get lock options. If write is locked, all write operations and collection creation are forbidden", + "operationId": "get_locks", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "force", + "in": "query", + "description": "If true - removes peer even if it has shards/replicas on it.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v0.11.2" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection All vectors in collection are available for querying Calculated as `points_count x vectors_per_point` Where `vectors_per_point` is a number of named vectors in schema", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in vector index (HNSW)", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points (vectors + payloads) in collection Each point could be accessed by unique id", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection. Each segment has independent vector as payload indexes", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection. `Green` - all good. `Yellow` - optimization is running, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "replication_factor": { + "description": "Number of replicas for each shard", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256 If not set, mmap will not be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type", + "points" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + }, + "points": { + "description": "Number of points indexed with this index", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unanmed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "exact": { + "description": "Search without approximation. If set to true, search may run long but with exact results.", + "default": false, + "type": "boolean" + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "description": "`Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.", + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "negative", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + } + } + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "replication_factor": { + "description": "Number of shards replicas. Default is 1 Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Collection base params. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionParamsDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParamsDiff": { + "type": "object", + "properties": { + "replication_factor": { + "description": "Number of replicas for each shard", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Minimal number successful responses from replicas to consider operation successful", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload", + "points" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys", + "points" + ], + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "message_send_failures", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + }, + "message_send_failures": { + "description": "Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MessageSendErrors" + } + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "description": "Role of the peer in the consensus", + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "MessageSendErrors": { + "description": "Message send failures for a particular peer", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "latest_error": { + "type": "string", + "nullable": true + } + } + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ReplicaState": { + "description": "State of the single shard within a replica set.", + "type": "string", + "enum": [ + "Active", + "Dead", + "Partial" + ] + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "sync", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sync": { + "description": "If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another", + "type": "boolean" + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster", + "collections", + "id", + "requests" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "collections": { + "$ref": "#/components/schemas/CollectionsTelemetry" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterTelemetry" + }, + "requests": { + "$ref": "#/components/schemas/RequestsTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppFeaturesTelemetry" + }, + { + "nullable": true + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "AppFeaturesTelemetry": { + "type": "object", + "required": [ + "debug", + "service_debug_feature", + "web_feature" + ], + "properties": { + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "CollectionsTelemetry": { + "type": "object", + "required": [ + "number_of_collections" + ], + "properties": { + "number_of_collections": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetryEnum" + }, + "nullable": true + } + } + }, + "CollectionTelemetryEnum": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionTelemetry" + }, + { + "$ref": "#/components/schemas/CollectionsAggregatedTelemetry" + } + ] + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time_ms", + "shards" + ], + "properties": { + "id": { + "type": "string" + }, + "init_time_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplicaSetTelemetry" + } + } + } + }, + "ReplicaSetTelemetry": { + "type": "object", + "required": [ + "id", + "remote" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "local": { + "anyOf": [ + { + "$ref": "#/components/schemas/LocalShardTelemetry" + }, + { + "nullable": true + } + ] + }, + "remote": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardTelemetry" + } + } + } + }, + "LocalShardTelemetry": { + "type": "object", + "required": [ + "optimizations", + "segments" + ], + "properties": { + "variant_name": { + "type": "string", + "nullable": true + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizations": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index_searches" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index_searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorIndexSearchesTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "index", + "storage_type", + "vector_data" + ], + "properties": { + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "storage_type": { + "$ref": "#/components/schemas/StorageType" + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Indexes": { + "description": "Vector index configuration of the segment", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "StorageType": { + "description": "Type of vector storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mmap" + ] + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexSearchesTelemetry": { + "type": "object", + "required": [ + "filtered_exact", + "filtered_large_cardinality", + "filtered_plain", + "filtered_small_cardinality", + "unfiltered_exact", + "unfiltered_hnsw", + "unfiltered_plain" + ], + "properties": { + "index_name": { + "type": "string", + "nullable": true + }, + "unfiltered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_hnsw": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_small_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_large_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "OperationDurationStatistics": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "avg_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "min_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "max_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "field_name": { + "type": "string", + "nullable": true + }, + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "type": "object", + "required": [ + "optimizations", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "optimizations": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "RemoteShardTelemetry": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "searches": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "CollectionsAggregatedTelemetry": { + "type": "object", + "required": [ + "optimizers_status", + "params", + "vectors" + ], + "properties": { + "vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "optimizers_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + } + } + }, + "ClusterTelemetry": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterStatusTelemetry" + }, + { + "nullable": true + } + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatusTelemetry": { + "type": "object", + "required": [ + "commit", + "is_voter", + "number_of_peers", + "pending_operations", + "term" + ], + "properties": { + "number_of_peers": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "term": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "role": { + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "type": "boolean" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "RequestsTelemetry": { + "type": "object", + "required": [ + "grpc", + "rest" + ], + "properties": { + "rest": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc": { + "$ref": "#/components/schemas/GrpcTelemetry" + } + } + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + } + }, + "GrpcTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/ReplicateShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + }, + { + "$ref": "#/components/schemas/DropReplicaOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ReplicateShardOperation": { + "type": "object", + "required": [ + "replicate_shard" + ], + "properties": { + "replicate_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "DropReplicaOperation": { + "type": "object", + "required": [ + "drop_replica" + ], + "properties": { + "drop_replica": { + "$ref": "#/components/schemas/Replica" + } + } + }, + "Replica": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "LocksOption": { + "type": "object", + "required": [ + "write" + ], + "properties": { + "error_message": { + "type": "string", + "nullable": true + }, + "write": { + "type": "boolean" + } + } + } + } + } +} diff --git a/docs/redoc/v0.11.3/openapi.json b/docs/redoc/v0.11.3/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..8ae34e51f2536ffa5e2debf997b0caed9b2370e6 --- /dev/null +++ b/docs/redoc/v0.11.3/openapi.json @@ -0,0 +1,6003 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + } + }, + "/locks": { + "post": { + "summary": "Set lock options", + "description": "Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options", + "operationId": "post_locks", + "tags": [ + "service" + ], + "requestBody": { + "description": "Lock options and optional error message", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + }, + "get": { + "summary": "Get lock options", + "description": "Get lock options. If write is locked, all write operations and collection creation are forbidden", + "operationId": "get_locks", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "force", + "in": "query", + "description": "If true - removes peer even if it has shards/replicas on it.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection.", + "operationId": "recover_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v0.11.3" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection All vectors in collection are available for querying Calculated as `points_count x vectors_per_point` Where `vectors_per_point` is a number of named vectors in schema", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in vector index (HNSW)", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points (vectors + payloads) in collection Each point could be accessed by unique id", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection. Each segment has independent vector as payload indexes", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection. `Green` - all good. `Yellow` - optimization is running, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "replication_factor": { + "description": "Number of replicas for each shard", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256 If not set, mmap will not be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type", + "points" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + }, + "points": { + "description": "Number of points indexed with this index", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unanmed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "exact": { + "description": "Search without approximation. If set to true, search may run long but with exact results.", + "default": false, + "type": "boolean" + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "description": "`Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.", + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "negative", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + } + } + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "replication_factor": { + "description": "Number of shards replicas. Default is 1 Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Collection base params. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionParamsDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParamsDiff": { + "type": "object", + "properties": { + "replication_factor": { + "description": "Number of replicas for each shard", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Minimal number successful responses from replicas to consider operation successful", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload", + "points" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys", + "points" + ], + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "message_send_failures", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + }, + "message_send_failures": { + "description": "Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MessageSendErrors" + } + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "description": "Role of the peer in the consensus", + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "MessageSendErrors": { + "description": "Message send failures for a particular peer", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "latest_error": { + "type": "string", + "nullable": true + } + } + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ReplicaState": { + "description": "State of the single shard within a replica set.", + "type": "string", + "enum": [ + "Active", + "Dead", + "Partial" + ] + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "sync", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sync": { + "description": "If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another", + "type": "boolean" + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster", + "collections", + "id", + "requests" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "collections": { + "$ref": "#/components/schemas/CollectionsTelemetry" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterTelemetry" + }, + "requests": { + "$ref": "#/components/schemas/RequestsTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppFeaturesTelemetry" + }, + { + "nullable": true + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "AppFeaturesTelemetry": { + "type": "object", + "required": [ + "debug", + "service_debug_feature", + "web_feature" + ], + "properties": { + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "CollectionsTelemetry": { + "type": "object", + "required": [ + "number_of_collections" + ], + "properties": { + "number_of_collections": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetryEnum" + }, + "nullable": true + } + } + }, + "CollectionTelemetryEnum": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionTelemetry" + }, + { + "$ref": "#/components/schemas/CollectionsAggregatedTelemetry" + } + ] + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time_ms", + "shards" + ], + "properties": { + "id": { + "type": "string" + }, + "init_time_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplicaSetTelemetry" + } + } + } + }, + "ReplicaSetTelemetry": { + "type": "object", + "required": [ + "id", + "remote" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "local": { + "anyOf": [ + { + "$ref": "#/components/schemas/LocalShardTelemetry" + }, + { + "nullable": true + } + ] + }, + "remote": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardTelemetry" + } + } + } + }, + "LocalShardTelemetry": { + "type": "object", + "required": [ + "optimizations", + "segments" + ], + "properties": { + "variant_name": { + "type": "string", + "nullable": true + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizations": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index_searches" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index_searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorIndexSearchesTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "index", + "storage_type", + "vector_data" + ], + "properties": { + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "storage_type": { + "$ref": "#/components/schemas/StorageType" + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Indexes": { + "description": "Vector index configuration of the segment", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "StorageType": { + "description": "Type of vector storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mmap" + ] + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexSearchesTelemetry": { + "type": "object", + "required": [ + "filtered_exact", + "filtered_large_cardinality", + "filtered_plain", + "filtered_small_cardinality", + "unfiltered_exact", + "unfiltered_hnsw", + "unfiltered_plain" + ], + "properties": { + "index_name": { + "type": "string", + "nullable": true + }, + "unfiltered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_hnsw": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_small_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_large_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "OperationDurationStatistics": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "avg_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "min_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "max_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "field_name": { + "type": "string", + "nullable": true + }, + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "type": "object", + "required": [ + "optimizations", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "optimizations": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "RemoteShardTelemetry": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "searches": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "CollectionsAggregatedTelemetry": { + "type": "object", + "required": [ + "optimizers_status", + "params", + "vectors" + ], + "properties": { + "vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "optimizers_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + } + } + }, + "ClusterTelemetry": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterStatusTelemetry" + }, + { + "nullable": true + } + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatusTelemetry": { + "type": "object", + "required": [ + "commit", + "is_voter", + "number_of_peers", + "pending_operations", + "term" + ], + "properties": { + "number_of_peers": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "term": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "role": { + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "type": "boolean" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "RequestsTelemetry": { + "type": "object", + "required": [ + "grpc", + "rest" + ], + "properties": { + "rest": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc": { + "$ref": "#/components/schemas/GrpcTelemetry" + } + } + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + } + }, + "GrpcTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/ReplicateShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + }, + { + "$ref": "#/components/schemas/DropReplicaOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ReplicateShardOperation": { + "type": "object", + "required": [ + "replicate_shard" + ], + "properties": { + "replicate_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "DropReplicaOperation": { + "type": "object", + "required": [ + "drop_replica" + ], + "properties": { + "drop_replica": { + "$ref": "#/components/schemas/Replica" + } + } + }, + "Replica": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "LocksOption": { + "type": "object", + "required": [ + "write" + ], + "properties": { + "error_message": { + "type": "string", + "nullable": true + }, + "write": { + "type": "boolean" + } + } + }, + "SnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "description": "Examples: - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot` - Local path `file:///qdrant/snapshots/test_collection-2022-08-04-10-49-10.snapshot`", + "type": "string", + "format": "uri" + } + } + } + } + } +} diff --git a/docs/redoc/v0.11.4/openapi.json b/docs/redoc/v0.11.4/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..78f2994bf6aeb92ea439cd41a18c4b9f39eb0d56 --- /dev/null +++ b/docs/redoc/v0.11.4/openapi.json @@ -0,0 +1,6052 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + } + }, + "/locks": { + "post": { + "summary": "Set lock options", + "description": "Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options", + "operationId": "post_locks", + "tags": [ + "service" + ], + "requestBody": { + "description": "Lock options and optional error message", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + }, + "get": { + "summary": "Get lock options", + "description": "Get lock options. If write is locked, all write operations and collection creation are forbidden", + "operationId": "get_locks", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "force", + "in": "query", + "description": "If true - removes peer even if it has shards/replicas on it.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection.", + "operationId": "recover_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v0.11.4" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection All vectors in collection are available for querying Calculated as `points_count x vectors_per_point` Where `vectors_per_point` is a number of named vectors in schema", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in vector index (HNSW)", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points (vectors + payloads) in collection Each point could be accessed by unique id", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection. Each segment has independent vector as payload indexes", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection. `Green` - all good. `Yellow` - optimization is running, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "replication_factor": { + "description": "Number of replicas for each shard", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256 If not set, mmap will not be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type", + "points" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + }, + "points": { + "description": "Number of points indexed with this index", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unanmed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "exact": { + "description": "Search without approximation. If set to true, search may run long but with exact results.", + "default": false, + "type": "boolean" + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "description": "`Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.", + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "negative", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + } + } + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "replication_factor": { + "description": "Number of shards replicas. Default is 1 Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "default": null, + "type": "boolean", + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Collection base params. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionParamsDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParamsDiff": { + "type": "object", + "properties": { + "replication_factor": { + "description": "Number of replicas for each shard", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Minimal number successful responses from replicas to consider operation successful", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload", + "points" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys", + "points" + ], + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "message_send_failures", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + }, + "message_send_failures": { + "description": "Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MessageSendErrors" + } + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "description": "Role of the peer in the consensus", + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "MessageSendErrors": { + "description": "Message send failures for a particular peer", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "latest_error": { + "type": "string", + "nullable": true + } + } + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ReplicaState": { + "description": "State of the single shard within a replica set.", + "type": "string", + "enum": [ + "Active", + "Dead", + "Partial" + ] + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "sync", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sync": { + "description": "If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another", + "type": "boolean" + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster", + "collections", + "id", + "requests" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "collections": { + "$ref": "#/components/schemas/CollectionsTelemetry" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterTelemetry" + }, + "requests": { + "$ref": "#/components/schemas/RequestsTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppFeaturesTelemetry" + }, + { + "nullable": true + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "AppFeaturesTelemetry": { + "type": "object", + "required": [ + "debug", + "service_debug_feature", + "web_feature" + ], + "properties": { + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "CollectionsTelemetry": { + "type": "object", + "required": [ + "number_of_collections" + ], + "properties": { + "number_of_collections": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetryEnum" + }, + "nullable": true + } + } + }, + "CollectionTelemetryEnum": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionTelemetry" + }, + { + "$ref": "#/components/schemas/CollectionsAggregatedTelemetry" + } + ] + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time_ms", + "shards", + "transfers" + ], + "properties": { + "id": { + "type": "string" + }, + "init_time_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplicaSetTelemetry" + } + }, + "transfers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "ReplicaSetTelemetry": { + "type": "object", + "required": [ + "id", + "remote", + "replicate_states" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "local": { + "anyOf": [ + { + "$ref": "#/components/schemas/LocalShardTelemetry" + }, + { + "nullable": true + } + ] + }, + "remote": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardTelemetry" + } + }, + "replicate_states": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ReplicaState" + } + } + } + }, + "LocalShardTelemetry": { + "type": "object", + "required": [ + "optimizations", + "segments" + ], + "properties": { + "variant_name": { + "type": "string", + "nullable": true + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizations": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index_searches" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index_searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorIndexSearchesTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "index", + "storage_type", + "vector_data" + ], + "properties": { + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "storage_type": { + "$ref": "#/components/schemas/StorageType" + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Indexes": { + "description": "Vector index configuration of the segment", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "StorageType": { + "description": "Type of vector storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mmap" + ] + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexSearchesTelemetry": { + "type": "object", + "required": [ + "filtered_exact", + "filtered_large_cardinality", + "filtered_plain", + "filtered_small_cardinality", + "unfiltered_exact", + "unfiltered_hnsw", + "unfiltered_plain" + ], + "properties": { + "index_name": { + "type": "string", + "nullable": true + }, + "unfiltered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_hnsw": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_small_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_large_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "OperationDurationStatistics": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "avg_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "min_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "max_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "field_name": { + "type": "string", + "nullable": true + }, + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "type": "object", + "required": [ + "optimizations", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "optimizations": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "RemoteShardTelemetry": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "searches": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "CollectionsAggregatedTelemetry": { + "type": "object", + "required": [ + "optimizers_status", + "params", + "vectors" + ], + "properties": { + "vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "optimizers_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + } + } + }, + "ClusterTelemetry": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterStatusTelemetry" + }, + { + "nullable": true + } + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatusTelemetry": { + "type": "object", + "required": [ + "commit", + "consensus_thread_status", + "is_voter", + "number_of_peers", + "pending_operations", + "term" + ], + "properties": { + "number_of_peers": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "term": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "role": { + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "type": "boolean" + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "RequestsTelemetry": { + "type": "object", + "required": [ + "grpc", + "rest" + ], + "properties": { + "rest": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc": { + "$ref": "#/components/schemas/GrpcTelemetry" + } + } + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + } + }, + "GrpcTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/ReplicateShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + }, + { + "$ref": "#/components/schemas/DropReplicaOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ReplicateShardOperation": { + "type": "object", + "required": [ + "replicate_shard" + ], + "properties": { + "replicate_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "DropReplicaOperation": { + "type": "object", + "required": [ + "drop_replica" + ], + "properties": { + "drop_replica": { + "$ref": "#/components/schemas/Replica" + } + } + }, + "Replica": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "LocksOption": { + "type": "object", + "required": [ + "write" + ], + "properties": { + "error_message": { + "type": "string", + "nullable": true + }, + "write": { + "type": "boolean" + } + } + }, + "SnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "description": "Examples: - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot` - Local path `file:///qdrant/snapshots/test_collection-2022-08-04-10-49-10.snapshot`", + "type": "string", + "format": "uri" + } + } + } + } + } +} diff --git a/docs/redoc/v0.11.5/openapi.json b/docs/redoc/v0.11.5/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..0a8387d3ae44c9c3a53eb8599492d9e2728edef3 --- /dev/null +++ b/docs/redoc/v0.11.5/openapi.json @@ -0,0 +1,6187 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + } + }, + "/locks": { + "post": { + "summary": "Set lock options", + "description": "Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options", + "operationId": "post_locks", + "tags": [ + "service" + ], + "requestBody": { + "description": "Lock options and optional error message", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + }, + "get": { + "summary": "Get lock options", + "description": "Get lock options. If write is locked, all write operations and collection creation are forbidden", + "operationId": "get_locks", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "force", + "in": "query", + "description": "If true - removes peer even if it has shards/replicas on it.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection.", + "operationId": "recover_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload values for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Overwrite payload", + "description": "Replace full payload of points with new one", + "operationId": "overwrite_payload", + "requestBody": { + "description": "Payload and points selector", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v0.11.5" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection All vectors in collection are available for querying Calculated as `points_count x vectors_per_point` Where `vectors_per_point` is a number of named vectors in schema", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in vector index (HNSW)", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points (vectors + payloads) in collection Each point could be accessed by unique id", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection. Each segment has independent vector as payload indexes", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection. `Green` - all good. `Yellow` - optimization is running, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "replication_factor": { + "description": "Number of replicas for each shard", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for hnsw graph built for payload index. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256 If not set, mmap will not be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type", + "points" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + }, + "points": { + "description": "Number of points indexed with this index", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unanmed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "exact": { + "description": "Search without approximation. If set to true, search may run long but with exact results.", + "default": false, + "type": "boolean" + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "description": "`Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.", + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "negative", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + } + } + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "replication_factor": { + "description": "Number of shards replicas. Default is 1 Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "default": null, + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for additional payload-aware HNSW links. If not set, default M will be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Collection base params. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionParamsDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParamsDiff": { + "type": "object", + "properties": { + "replication_factor": { + "description": "Number of replicas for each shard", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Minimal number successful responses from replicas to consider operation successful", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Assigns payload to each point that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys" + ], + "properties": { + "keys": { + "description": "List of payload keys to remove from payload", + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "message_send_failures", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + }, + "message_send_failures": { + "description": "Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MessageSendErrors" + } + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "description": "Role of the peer in the consensus", + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "MessageSendErrors": { + "description": "Message send failures for a particular peer", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "latest_error": { + "type": "string", + "nullable": true + } + } + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ReplicaState": { + "description": "State of the single shard within a replica set.", + "type": "string", + "enum": [ + "Active", + "Dead", + "Partial" + ] + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "sync", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sync": { + "description": "If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another", + "type": "boolean" + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster", + "collections", + "id", + "requests" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "collections": { + "$ref": "#/components/schemas/CollectionsTelemetry" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterTelemetry" + }, + "requests": { + "$ref": "#/components/schemas/RequestsTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppFeaturesTelemetry" + }, + { + "nullable": true + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "AppFeaturesTelemetry": { + "type": "object", + "required": [ + "debug", + "service_debug_feature", + "web_feature" + ], + "properties": { + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "CollectionsTelemetry": { + "type": "object", + "required": [ + "number_of_collections" + ], + "properties": { + "number_of_collections": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetryEnum" + }, + "nullable": true + } + } + }, + "CollectionTelemetryEnum": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionTelemetry" + }, + { + "$ref": "#/components/schemas/CollectionsAggregatedTelemetry" + } + ] + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time_ms", + "shards", + "transfers" + ], + "properties": { + "id": { + "type": "string" + }, + "init_time_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplicaSetTelemetry" + } + }, + "transfers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "ReplicaSetTelemetry": { + "type": "object", + "required": [ + "id", + "remote", + "replicate_states" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "local": { + "anyOf": [ + { + "$ref": "#/components/schemas/LocalShardTelemetry" + }, + { + "nullable": true + } + ] + }, + "remote": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardTelemetry" + } + }, + "replicate_states": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ReplicaState" + } + } + } + }, + "LocalShardTelemetry": { + "type": "object", + "required": [ + "optimizations", + "segments" + ], + "properties": { + "variant_name": { + "type": "string", + "nullable": true + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizations": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index_searches" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index_searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorIndexSearchesTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "index", + "storage_type", + "vector_data" + ], + "properties": { + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "storage_type": { + "$ref": "#/components/schemas/StorageType" + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Indexes": { + "description": "Vector index configuration of the segment", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "StorageType": { + "description": "Type of vector storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mmap" + ] + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexSearchesTelemetry": { + "type": "object", + "required": [ + "filtered_exact", + "filtered_large_cardinality", + "filtered_plain", + "filtered_small_cardinality", + "unfiltered_exact", + "unfiltered_hnsw", + "unfiltered_plain" + ], + "properties": { + "index_name": { + "type": "string", + "nullable": true + }, + "unfiltered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_hnsw": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_small_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_large_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "OperationDurationStatistics": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "avg_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "min_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "max_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "field_name": { + "type": "string", + "nullable": true + }, + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "type": "object", + "required": [ + "optimizations", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "optimizations": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "RemoteShardTelemetry": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "searches": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "CollectionsAggregatedTelemetry": { + "type": "object", + "required": [ + "optimizers_status", + "params", + "vectors" + ], + "properties": { + "vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "optimizers_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + } + } + }, + "ClusterTelemetry": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterStatusTelemetry" + }, + { + "nullable": true + } + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatusTelemetry": { + "type": "object", + "required": [ + "commit", + "consensus_thread_status", + "is_voter", + "number_of_peers", + "pending_operations", + "term" + ], + "properties": { + "number_of_peers": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "term": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "role": { + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "type": "boolean" + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "RequestsTelemetry": { + "type": "object", + "required": [ + "grpc", + "rest" + ], + "properties": { + "rest": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc": { + "$ref": "#/components/schemas/GrpcTelemetry" + } + } + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + } + }, + "GrpcTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/ReplicateShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + }, + { + "$ref": "#/components/schemas/DropReplicaOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ReplicateShardOperation": { + "type": "object", + "required": [ + "replicate_shard" + ], + "properties": { + "replicate_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "DropReplicaOperation": { + "type": "object", + "required": [ + "drop_replica" + ], + "properties": { + "drop_replica": { + "$ref": "#/components/schemas/Replica" + } + } + }, + "Replica": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "LocksOption": { + "type": "object", + "required": [ + "write" + ], + "properties": { + "error_message": { + "type": "string", + "nullable": true + }, + "write": { + "type": "boolean" + } + } + }, + "SnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "description": "Examples: - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot` - Local path `file:///qdrant/snapshots/test_collection-2022-08-04-10-49-10.snapshot`", + "type": "string", + "format": "uri" + }, + "priority": { + "$ref": "#/components/schemas/SnapshotPriority" + } + } + }, + "SnapshotPriority": { + "description": "Defines source of truth for snapshot recovery `Snapshot` means - prefer snapshot data over the current state `Replica` means - prefer existing data over the snapshot", + "type": "string", + "enum": [ + "snapshot", + "replica" + ] + } + } + } +} diff --git a/docs/redoc/v0.11.6/openapi.json b/docs/redoc/v0.11.6/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..88afc65c17d6a0f5aab647693a96e61512adbf8a --- /dev/null +++ b/docs/redoc/v0.11.6/openapi.json @@ -0,0 +1,6218 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + } + }, + "/locks": { + "post": { + "summary": "Set lock options", + "description": "Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options", + "operationId": "post_locks", + "tags": [ + "service" + ], + "requestBody": { + "description": "Lock options and optional error message", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + }, + "get": { + "summary": "Get lock options", + "description": "Get lock options. If write is locked, all write operations and collection creation are forbidden", + "operationId": "get_locks", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "force", + "in": "query", + "description": "If true - removes peer even if it has shards/replicas on it.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection.", + "operationId": "recover_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload values for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Overwrite payload", + "description": "Replace full payload of points with new one", + "operationId": "overwrite_payload", + "requestBody": { + "description": "Payload and points selector", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v0.11.6" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection All vectors in collection are available for querying Calculated as `points_count x vectors_per_point` Where `vectors_per_point` is a number of named vectors in schema", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in vector index (HNSW)", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points (vectors + payloads) in collection Each point could be accessed by unique id", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection. Each segment has independent vector as payload indexes", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection. `Green` - all good. `Yellow` - optimization is running, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "replication_factor": { + "description": "Number of replicas for each shard", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for hnsw graph built for payload index. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256 If not set, mmap will not be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type", + "points" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + }, + "points": { + "description": "Number of points indexed with this index", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unanmed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "exact": { + "description": "Search without approximation. If set to true, search may run long but with exact results.", + "default": false, + "type": "boolean" + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "description": "`Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.", + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "LookupLocation": { + "description": "Defines a location to use for looking up the vector. Specifies collection and vector field name.", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection used for lookup", + "type": "string" + }, + "vector": { + "description": "Optional name of the vector field within the collection. If not provided, the default vector field will be used.", + "default": null, + "type": "string", + "nullable": true + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "replication_factor": { + "description": "Number of shards replicas. Default is 1 Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "default": null, + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for additional payload-aware HNSW links. If not set, default M will be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Collection base params. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionParamsDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParamsDiff": { + "type": "object", + "properties": { + "replication_factor": { + "description": "Number of replicas for each shard", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Minimal number successful responses from replicas to consider operation successful", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Assigns payload to each point that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys" + ], + "properties": { + "keys": { + "description": "List of payload keys to remove from payload", + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "message_send_failures", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + }, + "message_send_failures": { + "description": "Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MessageSendErrors" + } + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "description": "Role of the peer in the consensus", + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "MessageSendErrors": { + "description": "Message send failures for a particular peer", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "latest_error": { + "type": "string", + "nullable": true + } + } + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ReplicaState": { + "description": "State of the single shard within a replica set.", + "type": "string", + "enum": [ + "Active", + "Dead", + "Partial" + ] + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "sync", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sync": { + "description": "If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another", + "type": "boolean" + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster", + "collections", + "id", + "requests" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "collections": { + "$ref": "#/components/schemas/CollectionsTelemetry" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterTelemetry" + }, + "requests": { + "$ref": "#/components/schemas/RequestsTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppFeaturesTelemetry" + }, + { + "nullable": true + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "AppFeaturesTelemetry": { + "type": "object", + "required": [ + "debug", + "service_debug_feature", + "web_feature" + ], + "properties": { + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "CollectionsTelemetry": { + "type": "object", + "required": [ + "number_of_collections" + ], + "properties": { + "number_of_collections": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetryEnum" + }, + "nullable": true + } + } + }, + "CollectionTelemetryEnum": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionTelemetry" + }, + { + "$ref": "#/components/schemas/CollectionsAggregatedTelemetry" + } + ] + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time_ms", + "shards", + "transfers" + ], + "properties": { + "id": { + "type": "string" + }, + "init_time_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplicaSetTelemetry" + } + }, + "transfers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "ReplicaSetTelemetry": { + "type": "object", + "required": [ + "id", + "remote", + "replicate_states" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "local": { + "anyOf": [ + { + "$ref": "#/components/schemas/LocalShardTelemetry" + }, + { + "nullable": true + } + ] + }, + "remote": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardTelemetry" + } + }, + "replicate_states": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ReplicaState" + } + } + } + }, + "LocalShardTelemetry": { + "type": "object", + "required": [ + "optimizations", + "segments" + ], + "properties": { + "variant_name": { + "type": "string", + "nullable": true + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizations": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index_searches" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index_searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorIndexSearchesTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "index", + "storage_type", + "vector_data" + ], + "properties": { + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "storage_type": { + "$ref": "#/components/schemas/StorageType" + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Indexes": { + "description": "Vector index configuration of the segment", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "StorageType": { + "description": "Type of vector storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mmap" + ] + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexSearchesTelemetry": { + "type": "object", + "required": [ + "filtered_exact", + "filtered_large_cardinality", + "filtered_plain", + "filtered_small_cardinality", + "unfiltered_exact", + "unfiltered_hnsw", + "unfiltered_plain" + ], + "properties": { + "index_name": { + "type": "string", + "nullable": true + }, + "unfiltered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_hnsw": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_small_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_large_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "OperationDurationStatistics": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "avg_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "min_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "max_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "field_name": { + "type": "string", + "nullable": true + }, + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "type": "object", + "required": [ + "optimizations", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "optimizations": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "RemoteShardTelemetry": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "searches": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "CollectionsAggregatedTelemetry": { + "type": "object", + "required": [ + "optimizers_status", + "params", + "vectors" + ], + "properties": { + "vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "optimizers_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + } + } + }, + "ClusterTelemetry": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterStatusTelemetry" + }, + { + "nullable": true + } + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatusTelemetry": { + "type": "object", + "required": [ + "commit", + "consensus_thread_status", + "is_voter", + "number_of_peers", + "pending_operations", + "term" + ], + "properties": { + "number_of_peers": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "term": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "role": { + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "type": "boolean" + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "RequestsTelemetry": { + "type": "object", + "required": [ + "grpc", + "rest" + ], + "properties": { + "rest": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc": { + "$ref": "#/components/schemas/GrpcTelemetry" + } + } + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + } + }, + "GrpcTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/ReplicateShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + }, + { + "$ref": "#/components/schemas/DropReplicaOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ReplicateShardOperation": { + "type": "object", + "required": [ + "replicate_shard" + ], + "properties": { + "replicate_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "DropReplicaOperation": { + "type": "object", + "required": [ + "drop_replica" + ], + "properties": { + "drop_replica": { + "$ref": "#/components/schemas/Replica" + } + } + }, + "Replica": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "LocksOption": { + "type": "object", + "required": [ + "write" + ], + "properties": { + "error_message": { + "type": "string", + "nullable": true + }, + "write": { + "type": "boolean" + } + } + }, + "SnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "description": "Examples: - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot` - Local path `file:///qdrant/snapshots/test_collection-2022-08-04-10-49-10.snapshot`", + "type": "string", + "format": "uri" + }, + "priority": { + "$ref": "#/components/schemas/SnapshotPriority" + } + } + }, + "SnapshotPriority": { + "description": "Defines source of truth for snapshot recovery `Snapshot` means - prefer snapshot data over the current state `Replica` means - prefer existing data over the snapshot", + "type": "string", + "enum": [ + "snapshot", + "replica" + ] + } + } + } +} diff --git a/docs/redoc/v0.11.7/openapi.json b/docs/redoc/v0.11.7/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..f7d32f39b839c753dcacbc57cbf3d4401bfd14d4 --- /dev/null +++ b/docs/redoc/v0.11.7/openapi.json @@ -0,0 +1,6218 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + } + }, + "/locks": { + "post": { + "summary": "Set lock options", + "description": "Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options", + "operationId": "post_locks", + "tags": [ + "service" + ], + "requestBody": { + "description": "Lock options and optional error message", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + }, + "get": { + "summary": "Get lock options", + "description": "Get lock options. If write is locked, all write operations and collection creation are forbidden", + "operationId": "get_locks", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "force", + "in": "query", + "description": "If true - removes peer even if it has shards/replicas on it.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection.", + "operationId": "recover_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload values for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Overwrite payload", + "description": "Replace full payload of points with new one", + "operationId": "overwrite_payload", + "requestBody": { + "description": "Payload and points selector", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v0.11.7" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection All vectors in collection are available for querying Calculated as `points_count x vectors_per_point` Where `vectors_per_point` is a number of named vectors in schema", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in vector index (HNSW)", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points (vectors + payloads) in collection Each point could be accessed by unique id", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection. Each segment has independent vector as payload indexes", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection. `Green` - all good. `Yellow` - optimization is running, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "replication_factor": { + "description": "Number of replicas for each shard", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for hnsw graph built for payload index. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256 If not set, mmap will not be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type", + "points" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + }, + "points": { + "description": "Number of points indexed with this index", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unanmed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "exact": { + "description": "Search without approximation. If set to true, search may run long but with exact results.", + "default": false, + "type": "boolean" + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "description": "`Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.", + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "LookupLocation": { + "description": "Defines a location to use for looking up the vector. Specifies collection and vector field name.", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection used for lookup", + "type": "string" + }, + "vector": { + "description": "Optional name of the vector field within the collection. If not provided, the default vector field will be used.", + "default": null, + "type": "string", + "nullable": true + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "replication_factor": { + "description": "Number of shards replicas. Default is 1 Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "default": null, + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for additional payload-aware HNSW links. If not set, default M will be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Collection base params. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionParamsDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParamsDiff": { + "type": "object", + "properties": { + "replication_factor": { + "description": "Number of replicas for each shard", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Minimal number successful responses from replicas to consider operation successful", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Assigns payload to each point that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys" + ], + "properties": { + "keys": { + "description": "List of payload keys to remove from payload", + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "message_send_failures", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + }, + "message_send_failures": { + "description": "Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MessageSendErrors" + } + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "description": "Role of the peer in the consensus", + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "MessageSendErrors": { + "description": "Message send failures for a particular peer", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "latest_error": { + "type": "string", + "nullable": true + } + } + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ReplicaState": { + "description": "State of the single shard within a replica set.", + "type": "string", + "enum": [ + "Active", + "Dead", + "Partial" + ] + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "sync", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sync": { + "description": "If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another", + "type": "boolean" + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster", + "collections", + "id", + "requests" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "collections": { + "$ref": "#/components/schemas/CollectionsTelemetry" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterTelemetry" + }, + "requests": { + "$ref": "#/components/schemas/RequestsTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppFeaturesTelemetry" + }, + { + "nullable": true + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "AppFeaturesTelemetry": { + "type": "object", + "required": [ + "debug", + "service_debug_feature", + "web_feature" + ], + "properties": { + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "CollectionsTelemetry": { + "type": "object", + "required": [ + "number_of_collections" + ], + "properties": { + "number_of_collections": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetryEnum" + }, + "nullable": true + } + } + }, + "CollectionTelemetryEnum": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionTelemetry" + }, + { + "$ref": "#/components/schemas/CollectionsAggregatedTelemetry" + } + ] + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time_ms", + "shards", + "transfers" + ], + "properties": { + "id": { + "type": "string" + }, + "init_time_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplicaSetTelemetry" + } + }, + "transfers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "ReplicaSetTelemetry": { + "type": "object", + "required": [ + "id", + "remote", + "replicate_states" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "local": { + "anyOf": [ + { + "$ref": "#/components/schemas/LocalShardTelemetry" + }, + { + "nullable": true + } + ] + }, + "remote": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardTelemetry" + } + }, + "replicate_states": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ReplicaState" + } + } + } + }, + "LocalShardTelemetry": { + "type": "object", + "required": [ + "optimizations", + "segments" + ], + "properties": { + "variant_name": { + "type": "string", + "nullable": true + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizations": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index_searches" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index_searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorIndexSearchesTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "index", + "storage_type", + "vector_data" + ], + "properties": { + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "storage_type": { + "$ref": "#/components/schemas/StorageType" + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Indexes": { + "description": "Vector index configuration of the segment", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "StorageType": { + "description": "Type of vector storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mmap" + ] + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexSearchesTelemetry": { + "type": "object", + "required": [ + "filtered_exact", + "filtered_large_cardinality", + "filtered_plain", + "filtered_small_cardinality", + "unfiltered_exact", + "unfiltered_hnsw", + "unfiltered_plain" + ], + "properties": { + "index_name": { + "type": "string", + "nullable": true + }, + "unfiltered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_hnsw": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_small_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_large_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "OperationDurationStatistics": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "avg_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "min_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "max_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "field_name": { + "type": "string", + "nullable": true + }, + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "type": "object", + "required": [ + "optimizations", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "optimizations": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "RemoteShardTelemetry": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "searches": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "CollectionsAggregatedTelemetry": { + "type": "object", + "required": [ + "optimizers_status", + "params", + "vectors" + ], + "properties": { + "vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "optimizers_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + } + } + }, + "ClusterTelemetry": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterStatusTelemetry" + }, + { + "nullable": true + } + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatusTelemetry": { + "type": "object", + "required": [ + "commit", + "consensus_thread_status", + "is_voter", + "number_of_peers", + "pending_operations", + "term" + ], + "properties": { + "number_of_peers": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "term": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "role": { + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "type": "boolean" + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "RequestsTelemetry": { + "type": "object", + "required": [ + "grpc", + "rest" + ], + "properties": { + "rest": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc": { + "$ref": "#/components/schemas/GrpcTelemetry" + } + } + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + } + }, + "GrpcTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/ReplicateShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + }, + { + "$ref": "#/components/schemas/DropReplicaOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ReplicateShardOperation": { + "type": "object", + "required": [ + "replicate_shard" + ], + "properties": { + "replicate_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "DropReplicaOperation": { + "type": "object", + "required": [ + "drop_replica" + ], + "properties": { + "drop_replica": { + "$ref": "#/components/schemas/Replica" + } + } + }, + "Replica": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "LocksOption": { + "type": "object", + "required": [ + "write" + ], + "properties": { + "error_message": { + "type": "string", + "nullable": true + }, + "write": { + "type": "boolean" + } + } + }, + "SnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "description": "Examples: - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot` - Local path `file:///qdrant/snapshots/test_collection-2022-08-04-10-49-10.snapshot`", + "type": "string", + "format": "uri" + }, + "priority": { + "$ref": "#/components/schemas/SnapshotPriority" + } + } + }, + "SnapshotPriority": { + "description": "Defines source of truth for snapshot recovery `Snapshot` means - prefer snapshot data over the current state `Replica` means - prefer existing data over the snapshot", + "type": "string", + "enum": [ + "snapshot", + "replica" + ] + } + } + } +} diff --git a/docs/redoc/v0.4.2/openapi.json b/docs/redoc/v0.4.2/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..9fd0322fce022a05f79fc10534c630ae7d8acd48 --- /dev/null +++ b/docs/redoc/v0.4.2/openapi.json @@ -0,0 +1,2357 @@ +{ + "components": { + "schemas": { + "AliasOperations": { + "anyOf": [ + { + "additionalProperties": false, + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "properties": { + "create_alias": { + "properties": { + "alias_name": { + "type": "string" + }, + "collection_name": { + "type": "string" + } + }, + "required": [ + "alias_name", + "collection_name" + ], + "type": "object" + } + }, + "required": [ + "create_alias" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Delete alias if exists", + "properties": { + "delete_alias": { + "properties": { + "alias_name": { + "type": "string" + } + }, + "required": [ + "alias_name" + ], + "type": "object" + } + }, + "required": [ + "delete_alias" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Change alias to a new one", + "properties": { + "rename_alias": { + "properties": { + "new_alias_name": { + "type": "string" + }, + "old_alias_name": { + "type": "string" + } + }, + "required": [ + "new_alias_name", + "old_alias_name" + ], + "type": "object" + } + }, + "required": [ + "rename_alias" + ], + "type": "object" + } + ] + }, + "CollectionConfig": { + "properties": { + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + }, + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "type": "object" + }, + "CollectionDescription": { + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection.", + "properties": { + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "disk_data_size": { + "description": "Disk space, used by collection", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "payload_schema": { + "additionalProperties": { + "$ref": "#/components/schemas/PayloadSchemaInfo" + }, + "description": "Types of stored payload", + "type": "object" + }, + "ram_data_size": { + "description": "RAM used by collection", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "segments_count": { + "description": "Number of segments in collection", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "config", + "disk_data_size", + "payload_schema", + "ram_data_size", + "segments_count", + "status", + "vectors_count" + ], + "type": "object" + }, + "CollectionParams": { + "properties": { + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "vector_size": { + "description": "Size of a vectors used", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "distance", + "vector_size" + ], + "type": "object" + }, + "CollectionStatus": { + "enum": [ + "green", + "yellow", + "red" + ], + "type": "string" + }, + "CollectionUpdateOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointOperations" + }, + { + "$ref": "#/components/schemas/PayloadOps" + }, + { + "$ref": "#/components/schemas/FieldIndexOperations" + } + ] + }, + "CollectionsResponse": { + "properties": { + "collections": { + "items": { + "$ref": "#/components/schemas/CollectionDescription" + }, + "type": "array" + } + }, + "required": [ + "collections" + ], + "type": "object" + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ], + "type": "string" + }, + "ErrorResponse": { + "properties": { + "result": { + "nullable": true, + "type": "object" + }, + "status": { + "properties": { + "error": { + "description": "Description of the occurred error.", + "type": "string" + } + }, + "type": "object" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "FieldCondition": { + "properties": { + "geo_bounding_box": { + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ], + "description": "Check if points geo location lies in a given area" + }, + "geo_radius": { + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ], + "description": "Check if geo point is within a given radius" + }, + "key": { + "type": "string" + }, + "match": { + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ], + "description": "Check if point has field with a given value" + }, + "range": { + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ], + "description": "Check if points value lies in a given range" + } + }, + "required": [ + "key" + ], + "type": "object" + }, + "FieldIndexOperations": { + "anyOf": [ + { + "additionalProperties": false, + "description": "Create index for payload field", + "properties": { + "create_index": { + "type": "string" + } + }, + "required": [ + "create_index" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Delete index for the field", + "properties": { + "delete_index": { + "type": "string" + } + }, + "required": [ + "delete_index" + ], + "type": "object" + } + ] + }, + "Filter": { + "additionalProperties": false, + "properties": { + "must": { + "description": "All conditions must match", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true, + "type": "array" + }, + "must_not": { + "description": "All conditions must NOT match", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true, + "type": "array" + }, + "should": { + "description": "At least one of thous conditions should match", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true, + "type": "array" + } + }, + "type": "object" + }, + "GeoBoundingBox": { + "properties": { + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + }, + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + } + }, + "required": [ + "bottom_right", + "top_left" + ], + "type": "object" + }, + "GeoPoint": { + "properties": { + "lat": { + "format": "double", + "type": "number" + }, + "lon": { + "format": "double", + "type": "number" + } + }, + "required": [ + "lat", + "lon" + ], + "type": "object" + }, + "GeoRadius": { + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "format": "double", + "type": "number" + } + }, + "required": [ + "center", + "radius" + ], + "type": "object" + }, + "HasIdCondition": { + "properties": { + "has_id": { + "items": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "type": "array", + "uniqueItems": true + } + }, + "required": [ + "has_id" + ], + "type": "object" + }, + "HnswConfig": { + "properties": { + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "full_scan_threshold": { + "description": "Minimal amount of points for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required.", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "type": "object" + }, + "HnswConfigDiff": { + "properties": { + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "full_scan_threshold": { + "description": "Minimal amount of points for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "Match": { + "properties": { + "integer": { + "description": "Integer value to match", + "format": "int64", + "nullable": true, + "type": "integer" + }, + "keyword": { + "description": "Keyword value to match", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "OptimizersConfig": { + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "format": "double", + "type": "number" + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "indexing_threshold": { + "description": "Maximum number of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "max_segment_number": { + "description": "If the number of segments exceeds this value, the optimizer will merge the smallest segments.", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "memmap_threshold": { + "description": "Maximum number of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "payload_indexing_threshold": { + "description": "Starting from this amount of vectors per-segment the engine will start building index for payload.", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_segment_number", + "memmap_threshold", + "payload_indexing_threshold", + "vacuum_min_vector_number" + ], + "type": "object" + }, + "OptimizersConfigDiff": { + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "format": "double", + "nullable": true, + "type": "number" + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "format": "uint64", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "indexing_threshold": { + "description": "Maximum number of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "max_segment_number": { + "description": "If the number of segments exceeds this value, the optimizer will merge the smallest segments.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "memmap_threshold": { + "description": "Maximum number of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "payload_indexing_threshold": { + "description": "Starting from this amount of vectors per-segment the engine will start building index for payload.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "PayloadInterface": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadVariant_for_String" + }, + { + "$ref": "#/components/schemas/PayloadVariant_for_int64" + }, + { + "$ref": "#/components/schemas/PayloadVariant_for_double" + }, + { + "$ref": "#/components/schemas/PayloadInterfaceStrict" + } + ] + }, + "PayloadInterfaceStrict": { + "anyOf": [ + { + "properties": { + "type": { + "enum": [ + "keyword" + ], + "type": "string" + }, + "value": { + "$ref": "#/components/schemas/PayloadVariant_for_String" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "integer" + ], + "type": "string" + }, + "value": { + "$ref": "#/components/schemas/PayloadVariant_for_int64" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "float" + ], + "type": "string" + }, + "value": { + "$ref": "#/components/schemas/PayloadVariant_for_double" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "geo" + ], + "type": "string" + }, + "value": { + "$ref": "#/components/schemas/PayloadVariant_for_GeoPoint" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + } + ] + }, + "PayloadOps": { + "anyOf": [ + { + "additionalProperties": false, + "description": "Set payload value, overrides if it is already exists", + "properties": { + "set_payload": { + "properties": { + "payload": { + "additionalProperties": { + "$ref": "#/components/schemas/PayloadInterface" + }, + "type": "object" + }, + "points": { + "description": "Assigns payload to each point in this list", + "items": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "type": "array" + } + }, + "required": [ + "payload", + "points" + ], + "type": "object" + } + }, + "required": [ + "set_payload" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Deletes specified payload values if they are assigned", + "properties": { + "delete_payload": { + "properties": { + "keys": { + "items": { + "type": "string" + }, + "type": "array" + }, + "points": { + "description": "Deletes values from each point in this list", + "items": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "type": "array" + } + }, + "required": [ + "keys", + "points" + ], + "type": "object" + } + }, + "required": [ + "delete_payload" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Drops all Payload values associated with given points.", + "properties": { + "clear_payload": { + "properties": { + "points": { + "items": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "type": "array" + } + }, + "required": [ + "points" + ], + "type": "object" + } + }, + "required": [ + "clear_payload" + ], + "type": "object" + } + ], + "description": "Define operations description for point payloads manipulation" + }, + "PayloadSchemaInfo": { + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "indexed": { + "type": "boolean" + } + }, + "required": [ + "data_type", + "indexed" + ], + "type": "object" + }, + "PayloadSchemaType": { + "anyOf": [ + { + "properties": { + "type": { + "enum": [ + "keyword" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "integer" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "float" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "geo" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + } + ] + }, + "PayloadSelector": { + "additionalProperties": false, + "properties": { + "exclude": { + "description": "Post-exclude return payload key type", + "items": { + "type": "string" + }, + "type": "array" + }, + "include": { + "description": "Include return payload key type", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "exclude", + "include" + ], + "type": "object" + }, + "PayloadType": { + "anyOf": [ + { + "properties": { + "type": { + "enum": [ + "keyword" + ], + "type": "string" + }, + "value": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "integer" + ], + "type": "string" + }, + "value": { + "items": { + "format": "int64", + "type": "integer" + }, + "type": "array" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "float" + ], + "type": "string" + }, + "value": { + "items": { + "format": "double", + "type": "number" + }, + "type": "array" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "geo" + ], + "type": "string" + }, + "value": { + "items": { + "$ref": "#/components/schemas/GeoPoint" + }, + "type": "array" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + } + ] + }, + "PayloadVariant_for_GeoPoint": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/GeoPoint" + }, + "type": "array" + }, + { + "$ref": "#/components/schemas/GeoPoint" + } + ] + }, + "PayloadVariant_for_String": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ] + }, + "PayloadVariant_for_double": { + "anyOf": [ + { + "items": { + "format": "double", + "type": "number" + }, + "type": "array" + }, + { + "format": "double", + "type": "number" + } + ] + }, + "PayloadVariant_for_int64": { + "anyOf": [ + { + "items": { + "format": "int64", + "type": "integer" + }, + "type": "array" + }, + { + "format": "int64", + "type": "integer" + } + ] + }, + "PointInsertOperations": { + "anyOf": [ + { + "additionalProperties": false, + "description": "Inset points from a batch.", + "properties": { + "batch": { + "properties": { + "ids": { + "items": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "type": "array" + }, + "payloads": { + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/PayloadInterface" + }, + "nullable": true, + "type": "object" + }, + "nullable": true, + "type": "array" + }, + "vectors": { + "items": { + "items": { + "format": "float", + "type": "number" + }, + "type": "array" + }, + "type": "array" + } + }, + "required": [ + "ids", + "vectors" + ], + "type": "object" + } + }, + "required": [ + "batch" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Insert points from a list", + "properties": { + "points": { + "items": { + "$ref": "#/components/schemas/PointStruct" + }, + "type": "array" + } + }, + "required": [ + "points" + ], + "type": "object" + } + ] + }, + "PointOperations": { + "anyOf": [ + { + "additionalProperties": false, + "description": "Insert or update points", + "properties": { + "upsert_points": { + "$ref": "#/components/schemas/PointInsertOperations" + } + }, + "required": [ + "upsert_points" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Delete point if exists", + "properties": { + "delete_points": { + "properties": { + "ids": { + "items": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "type": "array" + } + }, + "required": [ + "ids" + ], + "type": "object" + } + }, + "required": [ + "delete_points" + ], + "type": "object" + } + ] + }, + "PointRequest": { + "properties": { + "ids": { + "items": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "type": "array" + }, + "with_payload": { + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + } + }, + "required": [ + "ids" + ], + "type": "object" + }, + "PointStruct": { + "properties": { + "id": { + "description": "Point id", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "payload": { + "additionalProperties": { + "$ref": "#/components/schemas/PayloadInterface" + }, + "description": "Payload values (optional)", + "nullable": true, + "type": "object" + }, + "vector": { + "description": "Vector", + "items": { + "format": "float", + "type": "number" + }, + "type": "array" + } + }, + "required": [ + "id", + "vector" + ], + "type": "object" + }, + "Range": { + "properties": { + "gt": { + "description": "point.key > range.gt", + "format": "double", + "nullable": true, + "type": "number" + }, + "gte": { + "description": "point.key >= range.gte", + "format": "double", + "nullable": true, + "type": "number" + }, + "lt": { + "description": "point.key < range.lt", + "format": "double", + "nullable": true, + "type": "number" + }, + "lte": { + "description": "point.key <= range.lte", + "format": "double", + "nullable": true, + "type": "number" + } + }, + "type": "object" + }, + "RecommendRequest": { + "description": "Search request", + "properties": { + "filter": { + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ], + "description": "Look only for points which satisfies this conditions" + }, + "negative": { + "description": "Try to avoid vectors like this", + "items": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "type": "array" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ], + "description": "Additional search params" + }, + "positive": { + "description": "Look for vectors closest to those", + "items": { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "type": "array" + }, + "top": { + "description": "Max number of result to return", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "negative", + "positive", + "top" + ], + "type": "object" + }, + "Record": { + "description": "Point data", + "properties": { + "id": { + "description": "Id of the point", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "payload": { + "additionalProperties": { + "$ref": "#/components/schemas/PayloadType" + }, + "description": "Payload - values assigned to the point", + "nullable": true, + "type": "object" + }, + "vector": { + "description": "Vector of the point", + "items": { + "format": "float", + "type": "number" + }, + "nullable": true, + "type": "array" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "ScoredPoint": { + "properties": { + "id": { + "description": "Point id", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "payload": { + "additionalProperties": { + "$ref": "#/components/schemas/PayloadType" + }, + "description": "Payload storage", + "nullable": true, + "type": "object" + }, + "score": { + "description": "Points vector distance to the query vector", + "format": "float", + "type": "number" + }, + "version": { + "description": "Point version", + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "id", + "score", + "version" + ], + "type": "object" + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "properties": { + "filter": { + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ], + "description": "Look only for points which satisfies this conditions. If not provided - all points." + }, + "limit": { + "description": "Page size. Default: 10", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "offset": { + "description": "Start ID to read points from. Default: 0", + "format": "uint64", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "with_payload": { + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ], + "description": "Return point payload with the result. Default: True" + }, + "with_vector": { + "description": "Return point vector with the result. Default: false", + "nullable": true, + "type": "boolean" + } + }, + "type": "object" + }, + "ScrollResult": { + "description": "Result of the points read request. Contains", + "properties": { + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "format": "uint64", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "points": { + "description": "List of retrieved points", + "items": { + "$ref": "#/components/schemas/Record" + }, + "type": "array" + } + }, + "required": [ + "points" + ], + "type": "object" + }, + "SearchParams": { + "description": "Additional parameters of the search", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "SearchRequest": { + "description": "Search request", + "properties": { + "filter": { + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ], + "description": "Look only for points which satisfies this conditions" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ], + "description": "Additional search params" + }, + "top": { + "description": "Max number of result to return", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "vector": { + "description": "Look for vectors closest to this", + "items": { + "format": "float", + "type": "number" + }, + "type": "array" + }, + "with_payload": { + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ], + "description": "Payload interface" + } + }, + "required": [ + "top", + "vector" + ], + "type": "object" + }, + "StorageOperations": { + "anyOf": [ + { + "additionalProperties": false, + "description": "Create new collection and (optionally) specify index params", + "properties": { + "create_collection": { + "properties": { + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "hnsw_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for HNSW index. If none - values from service configuration file are used." + }, + "name": { + "type": "string" + }, + "optimizers_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for Optimizers. If none - values from service configuration file are used." + }, + "vector_size": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "wal_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for WAL. If none - values from service configuration file are used." + } + }, + "required": [ + "distance", + "name", + "vector_size" + ], + "type": "object" + } + }, + "required": [ + "create_collection" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Update parameters of the existing collection", + "properties": { + "update_collection": { + "properties": { + "name": { + "type": "string" + }, + "optimizers_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete" + } + }, + "required": [ + "name" + ], + "type": "object" + } + }, + "required": [ + "update_collection" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Delete collection with given name", + "properties": { + "delete_collection": { + "type": "string" + } + }, + "required": [ + "delete_collection" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Perform changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "properties": { + "change_aliases": { + "properties": { + "actions": { + "items": { + "$ref": "#/components/schemas/AliasOperations" + }, + "type": "array" + } + }, + "required": [ + "actions" + ], + "type": "object" + } + }, + "required": [ + "change_aliases" + ], + "type": "object" + } + ] + }, + "UpdateResult": { + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + }, + "required": [ + "operation_id", + "status" + ], + "type": "object" + }, + "UpdateStatus": { + "enum": [ + "acknowledged", + "completed" + ], + "type": "string" + }, + "WalConfig": { + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "type": "object" + }, + "WalConfigDiff": { + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "WithPayloadInterface": { + "anyOf": [ + { + "type": "boolean" + }, + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + } + } + }, + "externalDocs": { + "description": "Find out more about Qdrant aplications and demo", + "url": "demo.qdrant.tech" + }, + "info": { + "contact": { + "email": "andrey@vasnetsov.com" + }, + "description": "\nAPI description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X POST 'http://localhost:6333/collections' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"create_collection\": {\n \"name\": \"test_collection\",\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"payload_indexing_threshold\": 10000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"upsert_points\": {\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": \"Berlin\"}}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"Berlin\", \"London\"] }}},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"Berlin\", \"Moscow\"] }}},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"London\", \"Moscow\"]}}},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": {\"type\": \"integer\", \"value\": [0]}}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n }\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362 },\n { \"id\": 1, \"score\": 1.273 },\n { \"id\": 3, \"score\": 1.208 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"keyword\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362 },\n { \"id\": 2, \"score\": 0.871 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "title": "Qdrant API", + "version": "0.4.2" + }, + "openapi": "3.0.1", + "paths": { + "/collections": { + "get": { + "operationId": "get_collections", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Get list of existing collections", + "tags": [ + "collections" + ] + }, + "post": { + "operationId": "update_collections", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StorageOperations" + } + } + }, + "description": "Operation to perform on collections" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "type": "boolean" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Perform update operation on collections", + "tags": [ + "collections" + ] + } + }, + "/collections/{name}": { + "get": { + "operationId": "get_collection", + "parameters": [ + { + "description": "Name of the collection to retrieve", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/CollectionInfo" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Get information about existing collection", + "tags": [ + "collections" + ] + }, + "post": { + "operationId": "update_points", + "parameters": [ + { + "description": "Name of the collection to search in", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Wait for changes to actually happen? Default: false", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CollectionUpdateOperations" + } + } + }, + "description": "Collection update operations" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Update points (vectors, payloads, indexes) in collection", + "tags": [ + "points" + ] + } + }, + "/collections/{name}/points": { + "post": { + "operationId": "get_points", + "parameters": [ + { + "description": "Name of the collection to retrieve from", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + }, + "description": "List of points to retrieve" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "items": { + "$ref": "#/components/schemas/Record" + }, + "type": "array" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Retrieve points by ids", + "tags": [ + "points" + ] + } + }, + "/collections/{name}/points/recommend": { + "post": { + "operationId": "recommend_points", + "parameters": [ + { + "description": "Name of the collection to search in", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + }, + "description": "Request points based on positive and negative examples." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "items": { + "$ref": "#/components/schemas/ScoredPoint" + }, + "type": "array" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Recommend points", + "tags": [ + "points" + ] + } + }, + "/collections/{name}/points/scroll": { + "post": { + "description": "Scroll request - paginate over all points which matches given condition", + "operationId": "scroll_points", + "parameters": [ + { + "description": "Name of the collection to retrieve from", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + }, + "description": "Pagination and filter parameters" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/ScrollResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Scroll points", + "tags": [ + "points" + ] + } + }, + "/collections/{name}/points/search": { + "post": { + "operationId": "search_points", + "parameters": [ + { + "description": "Name of the collection to search in", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + }, + "description": "Search request with optional filtering" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "items": { + "$ref": "#/components/schemas/ScoredPoint" + }, + "type": "array" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Search points", + "tags": [ + "points" + ] + } + }, + "/collections/{name}/points/{id}": { + "get": { + "operationId": "get_point", + "parameters": [ + { + "description": "Name of the collection to retrieve from", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Id of the point", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/Record" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Retrieve point by id", + "tags": [ + "points" + ] + } + } + }, + "servers": [ + { + "url": "http://localhost:6333" + } + ], + "tags": [ + { + "description": "Searchable collections of points.", + "name": "collections" + }, + { + "description": "Float-point vectors with payload.", + "name": "points" + } + ] +} diff --git a/docs/redoc/v0.5.0/openapi.json b/docs/redoc/v0.5.0/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..0d34cc97f9c10c8c3958210d99463708f30611a6 --- /dev/null +++ b/docs/redoc/v0.5.0/openapi.json @@ -0,0 +1,3589 @@ +{ + "components": { + "schemas": { + "AliasOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ], + "description": "Group of all the possible operations related to collection aliases" + }, + "Batch": { + "properties": { + "ids": { + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + }, + "payloads": { + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/PayloadInterface" + }, + "nullable": true, + "type": "object" + }, + "nullable": true, + "type": "array" + }, + "vectors": { + "items": { + "items": { + "format": "float", + "type": "number" + }, + "type": "array" + }, + "type": "array" + } + }, + "required": [ + "ids", + "vectors" + ], + "type": "object" + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "properties": { + "actions": { + "items": { + "$ref": "#/components/schemas/AliasOperations" + }, + "type": "array" + } + }, + "required": [ + "actions" + ], + "type": "object" + }, + "CollectionConfig": { + "properties": { + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + }, + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "type": "object" + }, + "CollectionDescription": { + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "properties": { + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "disk_data_size": { + "description": "Disk space, used by collection", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "payload_schema": { + "additionalProperties": { + "$ref": "#/components/schemas/PayloadSchemaInfo" + }, + "description": "Types of stored payload", + "type": "object" + }, + "ram_data_size": { + "description": "RAM used by collection", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "segments_count": { + "description": "Number of segments in collection", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "config", + "disk_data_size", + "payload_schema", + "ram_data_size", + "segments_count", + "status", + "vectors_count" + ], + "type": "object" + }, + "CollectionParams": { + "properties": { + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "vector_size": { + "description": "Size of a vectors used", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "distance", + "vector_size" + ], + "type": "object" + }, + "CollectionStatus": { + "description": "Current state of the collection", + "enum": [ + "green", + "yellow", + "red" + ], + "type": "string" + }, + "CollectionUpdateOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointOperations" + }, + { + "$ref": "#/components/schemas/PayloadOps" + }, + { + "$ref": "#/components/schemas/FieldIndexOperations" + } + ] + }, + "CollectionsResponse": { + "properties": { + "collections": { + "items": { + "$ref": "#/components/schemas/CollectionDescription" + }, + "type": "array" + } + }, + "required": [ + "collections" + ], + "type": "object" + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "properties": { + "alias_name": { + "type": "string" + }, + "collection_name": { + "type": "string" + } + }, + "required": [ + "alias_name", + "collection_name" + ], + "type": "object" + }, + "CreateAliasOperation": { + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + }, + "required": [ + "create_alias" + ], + "type": "object" + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "properties": { + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "hnsw_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for HNSW index. If none - values from service configuration file are used." + }, + "optimizers_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for Optimizers. If none - values from service configuration file are used." + }, + "vector_size": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "wal_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for WAL. If none - values from service configuration file are used." + } + }, + "required": [ + "distance", + "vector_size" + ], + "type": "object" + }, + "CreateCollectionOperation": { + "description": "Operation for creating new collection and (optionally) specify index params", + "properties": { + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "hnsw_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for HNSW index. If none - values from service configuration file are used." + }, + "name": { + "type": "string" + }, + "optimizers_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for Optimizers. If none - values from service configuration file are used." + }, + "vector_size": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "wal_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for WAL. If none - values from service configuration file are used." + } + }, + "required": [ + "distance", + "name", + "vector_size" + ], + "type": "object" + }, + "CreateFieldIndex": { + "properties": { + "field_name": { + "type": "string" + } + }, + "required": [ + "field_name" + ], + "type": "object" + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "properties": { + "alias_name": { + "type": "string" + } + }, + "required": [ + "alias_name" + ], + "type": "object" + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + }, + "required": [ + "delete_alias" + ], + "type": "object" + }, + "DeleteCollectionOperation": { + "description": "Operation for deleting collection with given name", + "type": "string" + }, + "DeletePayload": { + "properties": { + "keys": { + "items": { + "type": "string" + }, + "type": "array" + }, + "points": { + "description": "Deletes values from each point in this list", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + } + }, + "required": [ + "keys", + "points" + ], + "type": "object" + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ], + "type": "string" + }, + "ErrorResponse": { + "properties": { + "result": { + "nullable": true, + "type": "object" + }, + "status": { + "properties": { + "error": { + "description": "Description of the occurred error.", + "type": "string" + } + }, + "type": "object" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "ExtendedPointId": { + "anyOf": [ + { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + { + "format": "uuid", + "type": "string" + } + ], + "description": "Type, used for specifying point ID in user interface" + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "properties": { + "geo_bounding_box": { + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ], + "description": "Check if points geo location lies in a given area" + }, + "geo_radius": { + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ], + "description": "Check if geo point is within a given radius" + }, + "key": { + "type": "string" + }, + "match": { + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ], + "description": "Check if point has field with a given value" + }, + "range": { + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ], + "description": "Check if points value lies in a given range" + } + }, + "required": [ + "key" + ], + "type": "object" + }, + "FieldIndexOperations": { + "oneOf": [ + { + "additionalProperties": false, + "description": "Create index for payload field", + "properties": { + "create_index": { + "type": "string" + } + }, + "required": [ + "create_index" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Delete index for the field", + "properties": { + "delete_index": { + "type": "string" + } + }, + "required": [ + "delete_index" + ], + "type": "object" + } + ] + }, + "Filter": { + "additionalProperties": false, + "properties": { + "must": { + "description": "All conditions must match", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true, + "type": "array" + }, + "must_not": { + "description": "All conditions must NOT match", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true, + "type": "array" + }, + "should": { + "description": "At least one of thous conditions should match", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true, + "type": "array" + } + }, + "type": "object" + }, + "FilterSelector": { + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + }, + "required": [ + "filter" + ], + "type": "object" + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "properties": { + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + }, + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + } + }, + "required": [ + "bottom_right", + "top_left" + ], + "type": "object" + }, + "GeoPoint": { + "description": "Geo point payload schema", + "properties": { + "lat": { + "format": "double", + "type": "number" + }, + "lon": { + "format": "double", + "type": "number" + } + }, + "required": [ + "lat", + "lon" + ], + "type": "object" + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "format": "double", + "type": "number" + } + }, + "required": [ + "center", + "radius" + ], + "type": "object" + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "properties": { + "has_id": { + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array", + "uniqueItems": true + } + }, + "required": [ + "has_id" + ], + "type": "object" + }, + "HnswConfig": { + "description": "Config of HNSW index", + "properties": { + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "full_scan_threshold": { + "description": "Minimal amount of points for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required.", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "type": "object" + }, + "HnswConfigDiff": { + "properties": { + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "full_scan_threshold": { + "description": "Minimal amount of points for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "Match": { + "description": "Match filter request", + "properties": { + "integer": { + "description": "Integer value to match", + "format": "int64", + "nullable": true, + "type": "integer" + }, + "keyword": { + "description": "Keyword value to match", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "OptimizersConfig": { + "properties": { + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "format": "double", + "type": "number" + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "indexing_threshold": { + "description": "Maximum number of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "max_segment_size": { + "description": "Do not create segments larger this number of points. Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher.", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "memmap_threshold": { + "description": "Maximum number of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "payload_indexing_threshold": { + "description": "Starting from this amount of vectors per-segment the engine will start building index for payload.", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "max_segment_size", + "memmap_threshold", + "payload_indexing_threshold", + "vacuum_min_vector_number" + ], + "type": "object" + }, + "OptimizersConfigDiff": { + "properties": { + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "format": "double", + "nullable": true, + "type": "number" + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "format": "uint64", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "indexing_threshold": { + "description": "Maximum number of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "max_segment_size": { + "description": "Do not create segments larger this number of points. Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "memmap_threshold": { + "description": "Maximum number of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "payload_indexing_threshold": { + "description": "Starting from this amount of vectors per-segment the engine will start building index for payload.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "PayloadInterface": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadVariant_for_String" + }, + { + "$ref": "#/components/schemas/PayloadVariant_for_int64" + }, + { + "$ref": "#/components/schemas/PayloadVariant_for_double" + }, + { + "$ref": "#/components/schemas/PayloadInterfaceStrict" + } + ], + "description": "Structure for converting user-provided payload into internal structure representation\n\nUsed to allow user provide payload in more human-friendly format, and do not force explicit brackets, included constructions, e.t.c.\n\nExample:\n\n```json {..., \"payload\": {\"city\": \"Berlin\"}, ... } ```\n\nShould be captured by `KeywordShortcut`" + }, + "PayloadInterfaceStrict": { + "description": "Fallback for `PayloadInterface` which is used if user explicitly specifies type of payload\n\nExample:\n\n```json {..., \"payload\": {\"city\": { \"type\": \"keyword\", \"value\": \"Berlin\" }}, ... } ```\n\nShould be captured by `Keyword(PayloadVariant)`", + "oneOf": [ + { + "properties": { + "type": { + "enum": [ + "keyword" + ], + "type": "string" + }, + "value": { + "$ref": "#/components/schemas/PayloadVariant_for_String" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "integer" + ], + "type": "string" + }, + "value": { + "$ref": "#/components/schemas/PayloadVariant_for_int64" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "float" + ], + "type": "string" + }, + "value": { + "$ref": "#/components/schemas/PayloadVariant_for_double" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "geo" + ], + "type": "string" + }, + "value": { + "$ref": "#/components/schemas/PayloadVariant_for_GeoPoint" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + } + ] + }, + "PayloadOps": { + "description": "Define operations description for point payloads manipulation", + "oneOf": [ + { + "additionalProperties": false, + "description": "Set payload value, overrides if it is already exists", + "properties": { + "set_payload": { + "$ref": "#/components/schemas/SetPayload" + } + }, + "required": [ + "set_payload" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Deletes specified payload values if they are assigned", + "properties": { + "delete_payload": { + "$ref": "#/components/schemas/DeletePayload" + } + }, + "required": [ + "delete_payload" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Drops all Payload values associated with given points.", + "properties": { + "clear_payload": { + "properties": { + "points": { + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + } + }, + "required": [ + "points" + ], + "type": "object" + } + }, + "required": [ + "clear_payload" + ], + "type": "object" + } + ] + }, + "PayloadSchemaInfo": { + "description": "Payload field type & index information", + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "indexed": { + "type": "boolean" + } + }, + "required": [ + "data_type", + "indexed" + ], + "type": "object" + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "oneOf": [ + { + "properties": { + "type": { + "enum": [ + "keyword" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "integer" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "float" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "geo" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + } + ] + }, + "PayloadSelector": { + "additionalProperties": false, + "description": "Specifies how to treat payload selector", + "properties": { + "exclude": { + "description": "Post-exclude return payload key type", + "items": { + "type": "string" + }, + "type": "array" + }, + "include": { + "description": "Include return payload key type", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "exclude", + "include" + ], + "type": "object" + }, + "PayloadType": { + "description": "All possible payload types", + "oneOf": [ + { + "properties": { + "type": { + "enum": [ + "keyword" + ], + "type": "string" + }, + "value": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "integer" + ], + "type": "string" + }, + "value": { + "items": { + "format": "int64", + "type": "integer" + }, + "type": "array" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "float" + ], + "type": "string" + }, + "value": { + "items": { + "format": "double", + "type": "number" + }, + "type": "array" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "geo" + ], + "type": "string" + }, + "value": { + "items": { + "$ref": "#/components/schemas/GeoPoint" + }, + "type": "array" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + } + ] + }, + "PayloadVariant_for_GeoPoint": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/GeoPoint" + }, + "type": "array" + }, + { + "$ref": "#/components/schemas/GeoPoint" + } + ], + "description": "Payload interface structure which ensures that user is allowed to pass payload in both - array and single element forms.\n\nExample:\n\nBoth versions should work: ```json {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"Berlin\", \"London\"] }}}, {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": \"Moscow\" }}}, ```" + }, + "PayloadVariant_for_String": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Payload interface structure which ensures that user is allowed to pass payload in both - array and single element forms.\n\nExample:\n\nBoth versions should work: ```json {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"Berlin\", \"London\"] }}}, {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": \"Moscow\" }}}, ```" + }, + "PayloadVariant_for_double": { + "anyOf": [ + { + "items": { + "format": "double", + "type": "number" + }, + "type": "array" + }, + { + "format": "double", + "type": "number" + } + ], + "description": "Payload interface structure which ensures that user is allowed to pass payload in both - array and single element forms.\n\nExample:\n\nBoth versions should work: ```json {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"Berlin\", \"London\"] }}}, {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": \"Moscow\" }}}, ```" + }, + "PayloadVariant_for_int64": { + "anyOf": [ + { + "items": { + "format": "int64", + "type": "integer" + }, + "type": "array" + }, + { + "format": "int64", + "type": "integer" + } + ], + "description": "Payload interface structure which ensures that user is allowed to pass payload in both - array and single element forms.\n\nExample:\n\nBoth versions should work: ```json {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"Berlin\", \"London\"] }}}, {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": \"Moscow\" }}}, ```" + }, + "PointIdsList": { + "properties": { + "points": { + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + } + }, + "required": [ + "points" + ], + "type": "object" + }, + "PointInsertOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "PointOperations": { + "oneOf": [ + { + "additionalProperties": false, + "description": "Insert or update points", + "properties": { + "upsert_points": { + "$ref": "#/components/schemas/PointInsertOperations" + } + }, + "required": [ + "upsert_points" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Delete point if exists", + "properties": { + "delete_points": { + "properties": { + "ids": { + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + } + }, + "required": [ + "ids" + ], + "type": "object" + } + }, + "required": [ + "delete_points" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Delete points by given filter criteria", + "properties": { + "delete_points_by_filter": { + "$ref": "#/components/schemas/Filter" + } + }, + "required": [ + "delete_points_by_filter" + ], + "type": "object" + } + ] + }, + "PointRequest": { + "properties": { + "ids": { + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + }, + "with_payload": { + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "nullable": true, + "type": "boolean" + } + }, + "required": [ + "ids" + ], + "type": "object" + }, + "PointStruct": { + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "additionalProperties": { + "$ref": "#/components/schemas/PayloadInterface" + }, + "description": "Payload values (optional)", + "nullable": true, + "type": "object" + }, + "vector": { + "description": "Vector", + "items": { + "format": "float", + "type": "number" + }, + "type": "array" + } + }, + "required": [ + "id", + "vector" + ], + "type": "object" + }, + "PointsBatch": { + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + }, + "required": [ + "batch" + ], + "type": "object" + }, + "PointsList": { + "properties": { + "points": { + "items": { + "$ref": "#/components/schemas/PointStruct" + }, + "type": "array" + } + }, + "required": [ + "points" + ], + "type": "object" + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "Range": { + "description": "Range filter request", + "properties": { + "gt": { + "description": "point.key > range.gt", + "format": "double", + "nullable": true, + "type": "number" + }, + "gte": { + "description": "point.key >= range.gte", + "format": "double", + "nullable": true, + "type": "number" + }, + "lt": { + "description": "point.key < range.lt", + "format": "double", + "nullable": true, + "type": "number" + }, + "lte": { + "description": "point.key <= range.lte", + "format": "double", + "nullable": true, + "type": "number" + } + }, + "type": "object" + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "properties": { + "filter": { + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ], + "description": "Look only for points which satisfies this conditions" + }, + "negative": { + "description": "Try to avoid vectors like this", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ], + "description": "Additional search params" + }, + "positive": { + "description": "Look for vectors closest to those", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + }, + "top": { + "description": "Max number of result to return", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "negative", + "positive", + "top" + ], + "type": "object" + }, + "Record": { + "description": "Point data", + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "additionalProperties": { + "$ref": "#/components/schemas/PayloadType" + }, + "description": "Payload - values assigned to the point", + "nullable": true, + "type": "object" + }, + "vector": { + "description": "Vector of the point", + "items": { + "format": "float", + "type": "number" + }, + "nullable": true, + "type": "array" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "RenameAlias": { + "description": "Change alias to a new one", + "properties": { + "new_alias_name": { + "type": "string" + }, + "old_alias_name": { + "type": "string" + } + }, + "required": [ + "new_alias_name", + "old_alias_name" + ], + "type": "object" + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + }, + "required": [ + "rename_alias" + ], + "type": "object" + }, + "ScoredPoint": { + "description": "Search result", + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "additionalProperties": { + "$ref": "#/components/schemas/PayloadType" + }, + "description": "Payload - values assigned to the point", + "nullable": true, + "type": "object" + }, + "score": { + "description": "Points vector distance to the query vector", + "format": "float", + "type": "number" + }, + "vector": { + "description": "Vector of the point", + "items": { + "format": "float", + "type": "number" + }, + "nullable": true, + "type": "array" + }, + "version": { + "description": "Point version", + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "id", + "score", + "version" + ], + "type": "object" + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "properties": { + "filter": { + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ], + "description": "Look only for points which satisfies this conditions. If not provided - all points." + }, + "limit": { + "description": "Page size. Default: 10", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "offset": { + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ], + "description": "Start ID to read points from. Default: 0" + }, + "with_payload": { + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ], + "description": "Return point payload with the result. Default: True" + }, + "with_vector": { + "description": "Return point vector with the result. Default: false", + "nullable": true, + "type": "boolean" + } + }, + "type": "object" + }, + "ScrollResult": { + "description": "Result of the points read request", + "properties": { + "next_page_offset": { + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ], + "description": "Offset which should be used to retrieve a next page result" + }, + "points": { + "description": "List of retrieved points", + "items": { + "$ref": "#/components/schemas/Record" + }, + "type": "array" + } + }, + "required": [ + "points" + ], + "type": "object" + }, + "SearchParams": { + "description": "Additional parameters of the search", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "properties": { + "filter": { + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ], + "description": "Look only for points which satisfies this conditions" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ], + "description": "Additional search params" + }, + "top": { + "description": "Max number of result to return", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "vector": { + "description": "Look for vectors closest to this", + "items": { + "format": "float", + "type": "number" + }, + "type": "array" + }, + "with_payload": { + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ], + "description": "Payload interface" + }, + "with_vector": { + "description": "Return point vector with the result. Default: false", + "nullable": true, + "type": "boolean" + } + }, + "required": [ + "top", + "vector" + ], + "type": "object" + }, + "SetPayload": { + "properties": { + "payload": { + "additionalProperties": { + "$ref": "#/components/schemas/PayloadInterface" + }, + "type": "object" + }, + "points": { + "description": "Assigns payload to each point in this list", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + } + }, + "required": [ + "payload", + "points" + ], + "type": "object" + }, + "StorageOperations": { + "description": "Enumeration of all possible collection update operations", + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "create_collection": { + "$ref": "#/components/schemas/CreateCollectionOperation" + } + }, + "required": [ + "create_collection" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "update_collection": { + "$ref": "#/components/schemas/UpdateCollectionOperation" + } + }, + "required": [ + "update_collection" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "delete_collection": { + "$ref": "#/components/schemas/DeleteCollectionOperation" + } + }, + "required": [ + "delete_collection" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "change_aliases": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + }, + "required": [ + "change_aliases" + ], + "type": "object" + } + ] + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "properties": { + "optimizers_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete" + } + }, + "type": "object" + }, + "UpdateCollectionOperation": { + "description": "Operation for updating parameters of the existing collection", + "properties": { + "name": { + "type": "string" + }, + "optimizers_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "UpdateResult": { + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + }, + "required": [ + "operation_id", + "status" + ], + "type": "object" + }, + "UpdateStatus": { + "enum": [ + "acknowledged", + "completed" + ], + "type": "string" + }, + "WalConfig": { + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "type": "object" + }, + "WalConfigDiff": { + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "WithPayloadInterface": { + "anyOf": [ + { + "type": "boolean" + }, + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ], + "description": "Options for specifying which payload to include or not" + } + } + }, + "externalDocs": { + "description": "Find out more about Qdrant aplications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "info": { + "contact": { + "email": "andrey@vasnetsov.com" + }, + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"payload_indexing_threshold\": 10000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": \"Berlin\"}}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"Berlin\", \"London\"] }}},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"Berlin\", \"Moscow\"] }}},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"London\", \"Moscow\"]}}},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": {\"type\": \"integer\", \"value\": [0]}}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"keyword\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "title": "Qdrant API", + "version": "0.5.0" + }, + "openapi": "3.0.1", + "paths": { + "/collections": { + "get": { + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4xx": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "List collections", + "tags": [ + "collections" + ] + }, + "post": { + "deprecated": true, + "description": "Perform update, create, remove or alias change operations on collections", + "operationId": "update_collections", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StorageOperations" + } + } + }, + "description": "Operation to perform on collections" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "type": "boolean" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4xx": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Update collection", + "tags": [ + "collections" + ] + } + }, + "/collections/aliases": { + "post": { + "operationId": "update_aliases", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + }, + "description": "Alias update operations" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "type": "boolean" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4xx": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Update aliases of the collections", + "tags": [ + "collections" + ] + } + }, + "/collections/{collection_name}/index": { + "put": { + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "description": "Name of the collection", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + }, + "description": "Field name" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4xx": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Create index for field in collection", + "tags": [ + "collections" + ] + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "description": "Name of the collection", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Name of the field where to delete the index", + "in": "path", + "name": "field_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4xx": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Delete index for field in collection", + "tags": [ + "collections" + ] + } + }, + "/collections/{name}": { + "delete": { + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "description": "Name of the collection to delete", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "type": "boolean" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4xx": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Delete collection", + "tags": [ + "collections" + ] + }, + "get": { + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "description": "Name of the collection to retrieve", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/CollectionInfo" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4xx": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Collection info", + "tags": [ + "collections" + ] + }, + "patch": { + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "parameters": [ + { + "description": "Name of the collection to update", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + }, + "description": "New parameters" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "type": "boolean" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4xx": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Update collection parameters", + "tags": [ + "collections" + ] + }, + "post": { + "deprecated": true, + "description": "Perform point update operation (vectors, payloads, indexes) in collection", + "operationId": "update_points", + "parameters": [ + { + "description": "Name of the collection to search in", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CollectionUpdateOperations" + } + } + }, + "description": "Collection update operations" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4xx": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Update points", + "tags": [ + "points" + ] + }, + "put": { + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "parameters": [ + { + "description": "Name of the new collection", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + }, + "description": "Parameters of a new collection" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "type": "boolean" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4xx": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Create collection", + "tags": [ + "collections" + ] + } + }, + "/collections/{name}/points": { + "post": { + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "parameters": [ + { + "description": "Name of the collection to retrieve from", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + }, + "description": "List of points to retrieve" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "items": { + "$ref": "#/components/schemas/Record" + }, + "type": "array" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4xx": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Get points", + "tags": [ + "points" + ] + }, + "put": { + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "parameters": [ + { + "description": "Name of the collection to update from", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + }, + "description": "Operation to perform on points" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4xx": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Upsert points", + "tags": [ + "points" + ] + } + }, + "/collections/{name}/points/delete": { + "post": { + "description": "Delete points", + "operationId": "delete_points", + "parameters": [ + { + "description": "Name of the collection to delete from", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + }, + "description": "Operation to perform on points" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4xx": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Delete points", + "tags": [ + "points" + ] + } + }, + "/collections/{name}/points/payload": { + "post": { + "description": "Set payload for points", + "operationId": "set_payload", + "parameters": [ + { + "description": "Name of the collection to set from", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + }, + "description": "Set payload on points" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4xx": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Set payload", + "tags": [ + "points" + ] + } + }, + "/collections/{name}/points/payload/clear": { + "post": { + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "parameters": [ + { + "description": "Name of the collection to clear payload from", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + }, + "description": "clear payload on points" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4xx": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Clear payload", + "tags": [ + "points" + ] + } + }, + "/collections/{name}/points/payload/delete": { + "post": { + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "parameters": [ + { + "description": "Name of the collection to delete from", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + }, + "description": "delete payload on points" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4xx": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Delete payload", + "tags": [ + "points" + ] + } + }, + "/collections/{name}/points/recommend": { + "post": { + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "parameters": [ + { + "description": "Name of the collection to search in", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + }, + "description": "Request points based on positive and negative examples." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "items": { + "$ref": "#/components/schemas/ScoredPoint" + }, + "type": "array" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4xx": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Recommend points", + "tags": [ + "points" + ] + } + }, + "/collections/{name}/points/scroll": { + "post": { + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "parameters": [ + { + "description": "Name of the collection to retrieve from", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + }, + "description": "Pagination and filter parameters" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/ScrollResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4xx": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Scroll points", + "tags": [ + "points" + ] + } + }, + "/collections/{name}/points/search": { + "post": { + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "parameters": [ + { + "description": "Name of the collection to search in", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + }, + "description": "Search request with optional filtering" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "items": { + "$ref": "#/components/schemas/ScoredPoint" + }, + "type": "array" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4xx": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Search points", + "tags": [ + "points" + ] + } + }, + "/collections/{name}/points/{id}": { + "get": { + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "description": "Name of the collection to retrieve from", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Id of the point", + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/Record" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4xx": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Get point", + "tags": [ + "points" + ] + } + } + }, + "servers": [ + { + "url": "http://localhost:6333" + } + ], + "tags": [ + { + "description": "Searchable collections of points.", + "name": "collections" + }, + { + "description": "Float-point vectors with payload.", + "name": "points" + } + ] +} diff --git a/docs/redoc/v0.5.1/openapi.json b/docs/redoc/v0.5.1/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..1c7b859740ba1b063df4058eaa45519b7e41ee95 --- /dev/null +++ b/docs/redoc/v0.5.1/openapi.json @@ -0,0 +1,3687 @@ +{ + "components": { + "schemas": { + "AliasOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ], + "description": "Group of all the possible operations related to collection aliases" + }, + "Batch": { + "properties": { + "ids": { + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + }, + "payloads": { + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/PayloadInterface" + }, + "nullable": true, + "type": "object" + }, + "nullable": true, + "type": "array" + }, + "vectors": { + "items": { + "items": { + "format": "float", + "type": "number" + }, + "type": "array" + }, + "type": "array" + } + }, + "required": [ + "ids", + "vectors" + ], + "type": "object" + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "properties": { + "actions": { + "items": { + "$ref": "#/components/schemas/AliasOperations" + }, + "type": "array" + } + }, + "required": [ + "actions" + ], + "type": "object" + }, + "CollectionConfig": { + "properties": { + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + }, + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "type": "object" + }, + "CollectionDescription": { + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "properties": { + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "disk_data_size": { + "description": "Disk space, used by collection", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "payload_schema": { + "additionalProperties": { + "$ref": "#/components/schemas/PayloadSchemaInfo" + }, + "description": "Types of stored payload", + "type": "object" + }, + "ram_data_size": { + "description": "RAM used by collection", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "segments_count": { + "description": "Number of segments in collection", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "config", + "disk_data_size", + "optimizer_status", + "payload_schema", + "ram_data_size", + "segments_count", + "status", + "vectors_count" + ], + "type": "object" + }, + "CollectionParams": { + "properties": { + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "vector_size": { + "description": "Size of a vectors used", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "distance", + "vector_size" + ], + "type": "object" + }, + "CollectionStatus": { + "description": "Current state of the collection", + "enum": [ + "green", + "yellow", + "red" + ], + "type": "string" + }, + "CollectionUpdateOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointOperations" + }, + { + "$ref": "#/components/schemas/PayloadOps" + }, + { + "$ref": "#/components/schemas/FieldIndexOperations" + } + ] + }, + "CollectionsResponse": { + "properties": { + "collections": { + "items": { + "$ref": "#/components/schemas/CollectionDescription" + }, + "type": "array" + } + }, + "required": [ + "collections" + ], + "type": "object" + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "properties": { + "alias_name": { + "type": "string" + }, + "collection_name": { + "type": "string" + } + }, + "required": [ + "alias_name", + "collection_name" + ], + "type": "object" + }, + "CreateAliasOperation": { + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + }, + "required": [ + "create_alias" + ], + "type": "object" + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "properties": { + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "hnsw_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for HNSW index. If none - values from service configuration file are used." + }, + "optimizers_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for Optimizers. If none - values from service configuration file are used." + }, + "vector_size": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "wal_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for WAL. If none - values from service configuration file are used." + } + }, + "required": [ + "distance", + "vector_size" + ], + "type": "object" + }, + "CreateCollectionOperation": { + "description": "Operation for creating new collection and (optionally) specify index params", + "properties": { + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "hnsw_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for HNSW index. If none - values from service configuration file are used." + }, + "name": { + "type": "string" + }, + "optimizers_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for Optimizers. If none - values from service configuration file are used." + }, + "vector_size": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "wal_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for WAL. If none - values from service configuration file are used." + } + }, + "required": [ + "distance", + "name", + "vector_size" + ], + "type": "object" + }, + "CreateFieldIndex": { + "properties": { + "field_name": { + "type": "string" + } + }, + "required": [ + "field_name" + ], + "type": "object" + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "properties": { + "alias_name": { + "type": "string" + } + }, + "required": [ + "alias_name" + ], + "type": "object" + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + }, + "required": [ + "delete_alias" + ], + "type": "object" + }, + "DeleteCollectionOperation": { + "description": "Operation for deleting collection with given name", + "type": "string" + }, + "DeletePayload": { + "properties": { + "keys": { + "items": { + "type": "string" + }, + "type": "array" + }, + "points": { + "description": "Deletes values from each point in this list", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + } + }, + "required": [ + "keys", + "points" + ], + "type": "object" + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ], + "type": "string" + }, + "ErrorResponse": { + "properties": { + "result": { + "nullable": true, + "type": "object" + }, + "status": { + "properties": { + "error": { + "description": "Description of the occurred error.", + "type": "string" + } + }, + "type": "object" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "ExtendedPointId": { + "anyOf": [ + { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + { + "format": "uuid", + "type": "string" + } + ], + "description": "Type, used for specifying point ID in user interface" + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "properties": { + "geo_bounding_box": { + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ], + "description": "Check if points geo location lies in a given area" + }, + "geo_radius": { + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ], + "description": "Check if geo point is within a given radius" + }, + "key": { + "type": "string" + }, + "match": { + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ], + "description": "Check if point has field with a given value" + }, + "range": { + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ], + "description": "Check if points value lies in a given range" + } + }, + "required": [ + "key" + ], + "type": "object" + }, + "FieldIndexOperations": { + "oneOf": [ + { + "additionalProperties": false, + "description": "Create index for payload field", + "properties": { + "create_index": { + "type": "string" + } + }, + "required": [ + "create_index" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Delete index for the field", + "properties": { + "delete_index": { + "type": "string" + } + }, + "required": [ + "delete_index" + ], + "type": "object" + } + ] + }, + "Filter": { + "additionalProperties": false, + "properties": { + "must": { + "description": "All conditions must match", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true, + "type": "array" + }, + "must_not": { + "description": "All conditions must NOT match", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true, + "type": "array" + }, + "should": { + "description": "At least one of thous conditions should match", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true, + "type": "array" + } + }, + "type": "object" + }, + "FilterSelector": { + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + }, + "required": [ + "filter" + ], + "type": "object" + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "properties": { + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + }, + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + } + }, + "required": [ + "bottom_right", + "top_left" + ], + "type": "object" + }, + "GeoPoint": { + "description": "Geo point payload schema", + "properties": { + "lat": { + "format": "double", + "type": "number" + }, + "lon": { + "format": "double", + "type": "number" + } + }, + "required": [ + "lat", + "lon" + ], + "type": "object" + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "format": "double", + "type": "number" + } + }, + "required": [ + "center", + "radius" + ], + "type": "object" + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "properties": { + "has_id": { + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array", + "uniqueItems": true + } + }, + "required": [ + "has_id" + ], + "type": "object" + }, + "HnswConfig": { + "description": "Config of HNSW index", + "properties": { + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "full_scan_threshold": { + "description": "Minimal amount of points for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required.", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "type": "object" + }, + "HnswConfigDiff": { + "properties": { + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "full_scan_threshold": { + "description": "Minimal amount of points for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "Match": { + "anyOf": [ + { + "$ref": "#/components/schemas/MatchKeyword" + }, + { + "$ref": "#/components/schemas/MatchInteger" + } + ], + "description": "Match filter request" + }, + "MatchInteger": { + "description": "Match filter request", + "properties": { + "integer": { + "description": "Integer value to match", + "format": "int64", + "type": "integer" + } + }, + "required": [ + "integer" + ], + "type": "object" + }, + "MatchKeyword": { + "description": "Match by keyword", + "properties": { + "keyword": { + "description": "Keyword value to match", + "type": "string" + } + }, + "required": [ + "keyword" + ], + "type": "object" + }, + "OptimizersConfig": { + "properties": { + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "format": "double", + "type": "number" + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "indexing_threshold": { + "description": "Maximum number of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "max_segment_size": { + "description": "Do not create segments larger this number of points. Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher.", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "memmap_threshold": { + "description": "Maximum number of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "payload_indexing_threshold": { + "description": "Starting from this amount of vectors per-segment the engine will start building index for payload.", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "max_segment_size", + "memmap_threshold", + "payload_indexing_threshold", + "vacuum_min_vector_number" + ], + "type": "object" + }, + "OptimizersConfigDiff": { + "properties": { + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "format": "double", + "nullable": true, + "type": "number" + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "format": "uint64", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "indexing_threshold": { + "description": "Maximum number of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "max_segment_size": { + "description": "Do not create segments larger this number of points. Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "memmap_threshold": { + "description": "Maximum number of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "payload_indexing_threshold": { + "description": "Starting from this amount of vectors per-segment the engine will start building index for payload.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "enum": [ + "ok" + ], + "type": "string" + }, + { + "additionalProperties": false, + "description": "Something wrong happened with optimizers", + "properties": { + "error": { + "type": "string" + } + }, + "required": [ + "error" + ], + "type": "object" + } + ] + }, + "PayloadInterface": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadVariant_for_String" + }, + { + "$ref": "#/components/schemas/PayloadVariant_for_int64" + }, + { + "$ref": "#/components/schemas/PayloadVariant_for_double" + }, + { + "$ref": "#/components/schemas/PayloadInterfaceStrict" + } + ], + "description": "Structure for converting user-provided payload into internal structure representation\n\nUsed to allow user provide payload in more human-friendly format, and do not force explicit brackets, included constructions, e.t.c.\n\nExample:\n\n```json {..., \"payload\": {\"city\": \"Berlin\"}, ... } ```\n\nShould be captured by `KeywordShortcut`" + }, + "PayloadInterfaceStrict": { + "description": "Fallback for `PayloadInterface` which is used if user explicitly specifies type of payload\n\nExample:\n\n```json {..., \"payload\": {\"city\": { \"type\": \"keyword\", \"value\": \"Berlin\" }}, ... } ```\n\nShould be captured by `Keyword(PayloadVariant)`", + "oneOf": [ + { + "properties": { + "type": { + "enum": [ + "keyword" + ], + "type": "string" + }, + "value": { + "$ref": "#/components/schemas/PayloadVariant_for_String" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "integer" + ], + "type": "string" + }, + "value": { + "$ref": "#/components/schemas/PayloadVariant_for_int64" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "float" + ], + "type": "string" + }, + "value": { + "$ref": "#/components/schemas/PayloadVariant_for_double" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "geo" + ], + "type": "string" + }, + "value": { + "$ref": "#/components/schemas/PayloadVariant_for_GeoPoint" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + } + ] + }, + "PayloadOps": { + "description": "Define operations description for point payloads manipulation", + "oneOf": [ + { + "additionalProperties": false, + "description": "Set payload value, overrides if it is already exists", + "properties": { + "set_payload": { + "$ref": "#/components/schemas/SetPayload" + } + }, + "required": [ + "set_payload" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Deletes specified payload values if they are assigned", + "properties": { + "delete_payload": { + "$ref": "#/components/schemas/DeletePayload" + } + }, + "required": [ + "delete_payload" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Drops all Payload values associated with given points.", + "properties": { + "clear_payload": { + "properties": { + "points": { + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + } + }, + "required": [ + "points" + ], + "type": "object" + } + }, + "required": [ + "clear_payload" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Clear all Payload values by given filter criteria.", + "properties": { + "clear_payload_by_filter": { + "$ref": "#/components/schemas/Filter" + } + }, + "required": [ + "clear_payload_by_filter" + ], + "type": "object" + } + ] + }, + "PayloadSchemaInfo": { + "description": "Payload field type & index information", + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "indexed": { + "type": "boolean" + } + }, + "required": [ + "data_type", + "indexed" + ], + "type": "object" + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "oneOf": [ + { + "properties": { + "type": { + "enum": [ + "keyword" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "integer" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "float" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "geo" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "include": { + "$ref": "#/components/schemas/PayloadSelectorInclude" + } + }, + "required": [ + "include" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "exclude": { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + }, + "required": [ + "exclude" + ], + "type": "object" + } + ] + }, + "PayloadSelectorExclude": { + "additionalProperties": false, + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "exclude" + ], + "type": "object" + }, + "PayloadSelectorInclude": { + "additionalProperties": false, + "properties": { + "include": { + "description": "Only include this payload keys", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "include" + ], + "type": "object" + }, + "PayloadType": { + "description": "All possible payload types", + "oneOf": [ + { + "properties": { + "type": { + "enum": [ + "keyword" + ], + "type": "string" + }, + "value": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "integer" + ], + "type": "string" + }, + "value": { + "items": { + "format": "int64", + "type": "integer" + }, + "type": "array" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "float" + ], + "type": "string" + }, + "value": { + "items": { + "format": "double", + "type": "number" + }, + "type": "array" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "geo" + ], + "type": "string" + }, + "value": { + "items": { + "$ref": "#/components/schemas/GeoPoint" + }, + "type": "array" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + } + ] + }, + "PayloadVariant_for_GeoPoint": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/GeoPoint" + }, + "type": "array" + }, + { + "$ref": "#/components/schemas/GeoPoint" + } + ], + "description": "Payload interface structure which ensures that user is allowed to pass payload in both - array and single element forms.\n\nExample:\n\nBoth versions should work: ```json {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"Berlin\", \"London\"] }}}, {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": \"Moscow\" }}}, ```" + }, + "PayloadVariant_for_String": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Payload interface structure which ensures that user is allowed to pass payload in both - array and single element forms.\n\nExample:\n\nBoth versions should work: ```json {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"Berlin\", \"London\"] }}}, {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": \"Moscow\" }}}, ```" + }, + "PayloadVariant_for_double": { + "anyOf": [ + { + "items": { + "format": "double", + "type": "number" + }, + "type": "array" + }, + { + "format": "double", + "type": "number" + } + ], + "description": "Payload interface structure which ensures that user is allowed to pass payload in both - array and single element forms.\n\nExample:\n\nBoth versions should work: ```json {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"Berlin\", \"London\"] }}}, {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": \"Moscow\" }}}, ```" + }, + "PayloadVariant_for_int64": { + "anyOf": [ + { + "items": { + "format": "int64", + "type": "integer" + }, + "type": "array" + }, + { + "format": "int64", + "type": "integer" + } + ], + "description": "Payload interface structure which ensures that user is allowed to pass payload in both - array and single element forms.\n\nExample:\n\nBoth versions should work: ```json {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"Berlin\", \"London\"] }}}, {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": \"Moscow\" }}}, ```" + }, + "PointIdsList": { + "properties": { + "points": { + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + } + }, + "required": [ + "points" + ], + "type": "object" + }, + "PointInsertOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "PointOperations": { + "oneOf": [ + { + "additionalProperties": false, + "description": "Insert or update points", + "properties": { + "upsert_points": { + "$ref": "#/components/schemas/PointInsertOperations" + } + }, + "required": [ + "upsert_points" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Delete point if exists", + "properties": { + "delete_points": { + "properties": { + "ids": { + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + } + }, + "required": [ + "ids" + ], + "type": "object" + } + }, + "required": [ + "delete_points" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Delete points by given filter criteria", + "properties": { + "delete_points_by_filter": { + "$ref": "#/components/schemas/Filter" + } + }, + "required": [ + "delete_points_by_filter" + ], + "type": "object" + } + ] + }, + "PointRequest": { + "properties": { + "ids": { + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + }, + "with_payload": { + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "nullable": true, + "type": "boolean" + } + }, + "required": [ + "ids" + ], + "type": "object" + }, + "PointStruct": { + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "additionalProperties": { + "$ref": "#/components/schemas/PayloadInterface" + }, + "description": "Payload values (optional)", + "nullable": true, + "type": "object" + }, + "vector": { + "description": "Vector", + "items": { + "format": "float", + "type": "number" + }, + "type": "array" + } + }, + "required": [ + "id", + "vector" + ], + "type": "object" + }, + "PointsBatch": { + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + }, + "required": [ + "batch" + ], + "type": "object" + }, + "PointsList": { + "properties": { + "points": { + "items": { + "$ref": "#/components/schemas/PointStruct" + }, + "type": "array" + } + }, + "required": [ + "points" + ], + "type": "object" + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "Range": { + "description": "Range filter request", + "properties": { + "gt": { + "description": "point.key > range.gt", + "format": "double", + "nullable": true, + "type": "number" + }, + "gte": { + "description": "point.key >= range.gte", + "format": "double", + "nullable": true, + "type": "number" + }, + "lt": { + "description": "point.key < range.lt", + "format": "double", + "nullable": true, + "type": "number" + }, + "lte": { + "description": "point.key <= range.lte", + "format": "double", + "nullable": true, + "type": "number" + } + }, + "type": "object" + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "properties": { + "filter": { + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ], + "description": "Look only for points which satisfies this conditions" + }, + "negative": { + "description": "Try to avoid vectors like this", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ], + "description": "Additional search params" + }, + "positive": { + "description": "Look for vectors closest to those", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + }, + "top": { + "description": "Max number of result to return", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "negative", + "positive", + "top" + ], + "type": "object" + }, + "Record": { + "description": "Point data", + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "additionalProperties": { + "$ref": "#/components/schemas/PayloadType" + }, + "description": "Payload - values assigned to the point", + "nullable": true, + "type": "object" + }, + "vector": { + "description": "Vector of the point", + "items": { + "format": "float", + "type": "number" + }, + "nullable": true, + "type": "array" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "RenameAlias": { + "description": "Change alias to a new one", + "properties": { + "new_alias_name": { + "type": "string" + }, + "old_alias_name": { + "type": "string" + } + }, + "required": [ + "new_alias_name", + "old_alias_name" + ], + "type": "object" + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + }, + "required": [ + "rename_alias" + ], + "type": "object" + }, + "ScoredPoint": { + "description": "Search result", + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "additionalProperties": { + "$ref": "#/components/schemas/PayloadType" + }, + "description": "Payload - values assigned to the point", + "nullable": true, + "type": "object" + }, + "score": { + "description": "Points vector distance to the query vector", + "format": "float", + "type": "number" + }, + "vector": { + "description": "Vector of the point", + "items": { + "format": "float", + "type": "number" + }, + "nullable": true, + "type": "array" + }, + "version": { + "description": "Point version", + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "id", + "score", + "version" + ], + "type": "object" + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "properties": { + "filter": { + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ], + "description": "Look only for points which satisfies this conditions. If not provided - all points." + }, + "limit": { + "description": "Page size. Default: 10", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "offset": { + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ], + "description": "Start ID to read points from. Default: 0" + }, + "with_payload": { + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ], + "description": "Return point payload with the result. Default: True" + }, + "with_vector": { + "description": "Return point vector with the result. Default: false", + "nullable": true, + "type": "boolean" + } + }, + "type": "object" + }, + "ScrollResult": { + "description": "Result of the points read request", + "properties": { + "next_page_offset": { + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ], + "description": "Offset which should be used to retrieve a next page result" + }, + "points": { + "description": "List of retrieved points", + "items": { + "$ref": "#/components/schemas/Record" + }, + "type": "array" + } + }, + "required": [ + "points" + ], + "type": "object" + }, + "SearchParams": { + "description": "Additional parameters of the search", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "properties": { + "filter": { + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ], + "description": "Look only for points which satisfies this conditions" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ], + "description": "Additional search params" + }, + "top": { + "description": "Max number of result to return", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "vector": { + "description": "Look for vectors closest to this", + "items": { + "format": "float", + "type": "number" + }, + "type": "array" + }, + "with_payload": { + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ], + "description": "Payload interface" + }, + "with_vector": { + "description": "Return point vector with the result. Default: false", + "nullable": true, + "type": "boolean" + } + }, + "required": [ + "top", + "vector" + ], + "type": "object" + }, + "SetPayload": { + "properties": { + "payload": { + "additionalProperties": { + "$ref": "#/components/schemas/PayloadInterface" + }, + "type": "object" + }, + "points": { + "description": "Assigns payload to each point in this list", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + } + }, + "required": [ + "payload", + "points" + ], + "type": "object" + }, + "StorageOperations": { + "description": "Enumeration of all possible collection update operations", + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "create_collection": { + "$ref": "#/components/schemas/CreateCollectionOperation" + } + }, + "required": [ + "create_collection" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "update_collection": { + "$ref": "#/components/schemas/UpdateCollectionOperation" + } + }, + "required": [ + "update_collection" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "delete_collection": { + "$ref": "#/components/schemas/DeleteCollectionOperation" + } + }, + "required": [ + "delete_collection" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "change_aliases": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + }, + "required": [ + "change_aliases" + ], + "type": "object" + } + ] + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "properties": { + "optimizers_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete" + } + }, + "type": "object" + }, + "UpdateCollectionOperation": { + "description": "Operation for updating parameters of the existing collection", + "properties": { + "name": { + "type": "string" + }, + "optimizers_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "UpdateResult": { + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + }, + "required": [ + "operation_id", + "status" + ], + "type": "object" + }, + "UpdateStatus": { + "enum": [ + "acknowledged", + "completed" + ], + "type": "string" + }, + "WalConfig": { + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "type": "object" + }, + "WalConfigDiff": { + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "WithPayloadInterface": { + "anyOf": [ + { + "type": "boolean" + }, + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ], + "description": "Options for specifying which payload to include or not" + } + } + }, + "externalDocs": { + "description": "Find out more about Qdrant aplications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "info": { + "contact": { + "email": "andrey@vasnetsov.com" + }, + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"payload_indexing_threshold\": 10000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": \"Berlin\"}}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"Berlin\", \"London\"] }}},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"Berlin\", \"Moscow\"] }}},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"London\", \"Moscow\"]}}},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": {\"type\": \"integer\", \"value\": [0]}}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"keyword\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "title": "Qdrant API", + "version": "v0.5.1" + }, + "openapi": "3.0.1", + "paths": { + "/collections": { + "get": { + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "List collections", + "tags": [ + "collections" + ] + }, + "post": { + "deprecated": true, + "description": "Perform update, create, remove or alias change operations on collections", + "operationId": "update_collections", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StorageOperations" + } + } + }, + "description": "Operation to perform on collections" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "type": "boolean" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Update collection", + "tags": [ + "collections" + ] + } + }, + "/collections/aliases": { + "post": { + "operationId": "update_aliases", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + }, + "description": "Alias update operations" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "type": "boolean" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Update aliases of the collections", + "tags": [ + "collections" + ] + } + }, + "/collections/{name}": { + "delete": { + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "description": "Name of the collection to delete", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "type": "boolean" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Delete collection", + "tags": [ + "collections" + ] + }, + "get": { + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "description": "Name of the collection to retrieve", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/CollectionInfo" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Collection info", + "tags": [ + "collections" + ] + }, + "patch": { + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "parameters": [ + { + "description": "Name of the collection to update", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + }, + "description": "New parameters" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "type": "boolean" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Update collection parameters", + "tags": [ + "collections" + ] + }, + "post": { + "deprecated": true, + "description": "Perform point update operation (vectors, payloads, indexes) in collection", + "operationId": "update_points", + "parameters": [ + { + "description": "Name of the collection to search in", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CollectionUpdateOperations" + } + } + }, + "description": "Collection update operations" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Update points", + "tags": [ + "points" + ] + }, + "put": { + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "parameters": [ + { + "description": "Name of the new collection", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + }, + "description": "Parameters of a new collection" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "type": "boolean" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Create collection", + "tags": [ + "collections" + ] + } + }, + "/collections/{name}/index": { + "put": { + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "description": "Name of the collection", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + }, + "description": "Field name" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Create index for field in collection", + "tags": [ + "collections" + ] + } + }, + "/collections/{name}/index/{field_name}": { + "delete": { + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "description": "Name of the collection", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Name of the field where to delete the index", + "in": "path", + "name": "field_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Delete index for field in collection", + "tags": [ + "collections" + ] + } + }, + "/collections/{name}/points": { + "post": { + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "parameters": [ + { + "description": "Name of the collection to retrieve from", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + }, + "description": "List of points to retrieve" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "items": { + "$ref": "#/components/schemas/Record" + }, + "type": "array" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Get points", + "tags": [ + "points" + ] + }, + "put": { + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "parameters": [ + { + "description": "Name of the collection to update from", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + }, + "description": "Operation to perform on points" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Upsert points", + "tags": [ + "points" + ] + } + }, + "/collections/{name}/points/delete": { + "post": { + "description": "Delete points", + "operationId": "delete_points", + "parameters": [ + { + "description": "Name of the collection to delete from", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + }, + "description": "Operation to perform on points" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Delete points", + "tags": [ + "points" + ] + } + }, + "/collections/{name}/points/payload": { + "post": { + "description": "Set payload for points", + "operationId": "set_payload", + "parameters": [ + { + "description": "Name of the collection to set from", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + }, + "description": "Set payload on points" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Set payload", + "tags": [ + "points" + ] + } + }, + "/collections/{name}/points/payload/clear": { + "post": { + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "parameters": [ + { + "description": "Name of the collection to clear payload from", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + }, + "description": "clear payload on points" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Clear payload", + "tags": [ + "points" + ] + } + }, + "/collections/{name}/points/payload/delete": { + "post": { + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "parameters": [ + { + "description": "Name of the collection to delete from", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + }, + "description": "delete payload on points" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Delete payload", + "tags": [ + "points" + ] + } + }, + "/collections/{name}/points/recommend": { + "post": { + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "parameters": [ + { + "description": "Name of the collection to search in", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + }, + "description": "Request points based on positive and negative examples." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "items": { + "$ref": "#/components/schemas/ScoredPoint" + }, + "type": "array" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Recommend points", + "tags": [ + "points" + ] + } + }, + "/collections/{name}/points/scroll": { + "post": { + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "parameters": [ + { + "description": "Name of the collection to retrieve from", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + }, + "description": "Pagination and filter parameters" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/ScrollResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Scroll points", + "tags": [ + "points" + ] + } + }, + "/collections/{name}/points/search": { + "post": { + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "parameters": [ + { + "description": "Name of the collection to search in", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + }, + "description": "Search request with optional filtering" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "items": { + "$ref": "#/components/schemas/ScoredPoint" + }, + "type": "array" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Search points", + "tags": [ + "points" + ] + } + }, + "/collections/{name}/points/{id}": { + "get": { + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "description": "Name of the collection to retrieve from", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Id of the point", + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/Record" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Get point", + "tags": [ + "points" + ] + } + } + }, + "servers": [ + { + "url": "http://localhost:6333" + } + ], + "tags": [ + { + "description": "Searchable collections of points.", + "name": "collections" + }, + { + "description": "Float-point vectors with payload.", + "name": "points" + } + ] +} diff --git a/docs/redoc/v0.6.0/openapi.json b/docs/redoc/v0.6.0/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..d644fb2a43eb84e48779023b9f15630b7ffe1055 --- /dev/null +++ b/docs/redoc/v0.6.0/openapi.json @@ -0,0 +1,3690 @@ +{ + "components": { + "schemas": { + "AliasOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ], + "description": "Group of all the possible operations related to collection aliases" + }, + "Batch": { + "properties": { + "ids": { + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + }, + "payloads": { + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/PayloadInterface" + }, + "nullable": true, + "type": "object" + }, + "nullable": true, + "type": "array" + }, + "vectors": { + "items": { + "items": { + "format": "float", + "type": "number" + }, + "type": "array" + }, + "type": "array" + } + }, + "required": [ + "ids", + "vectors" + ], + "type": "object" + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "properties": { + "actions": { + "items": { + "$ref": "#/components/schemas/AliasOperations" + }, + "type": "array" + } + }, + "required": [ + "actions" + ], + "type": "object" + }, + "CollectionConfig": { + "properties": { + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + }, + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "type": "object" + }, + "CollectionDescription": { + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "properties": { + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "disk_data_size": { + "description": "Disk space, used by collection", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "payload_schema": { + "additionalProperties": { + "$ref": "#/components/schemas/PayloadSchemaInfo" + }, + "description": "Types of stored payload", + "type": "object" + }, + "ram_data_size": { + "description": "RAM used by collection", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "segments_count": { + "description": "Number of segments in collection", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "config", + "disk_data_size", + "optimizer_status", + "payload_schema", + "ram_data_size", + "segments_count", + "status", + "vectors_count" + ], + "type": "object" + }, + "CollectionParams": { + "properties": { + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "vector_size": { + "description": "Size of a vectors used", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "distance", + "vector_size" + ], + "type": "object" + }, + "CollectionStatus": { + "description": "Current state of the collection", + "enum": [ + "green", + "yellow", + "red" + ], + "type": "string" + }, + "CollectionUpdateOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointOperations" + }, + { + "$ref": "#/components/schemas/PayloadOps" + }, + { + "$ref": "#/components/schemas/FieldIndexOperations" + } + ] + }, + "CollectionsResponse": { + "properties": { + "collections": { + "items": { + "$ref": "#/components/schemas/CollectionDescription" + }, + "type": "array" + } + }, + "required": [ + "collections" + ], + "type": "object" + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "properties": { + "alias_name": { + "type": "string" + }, + "collection_name": { + "type": "string" + } + }, + "required": [ + "alias_name", + "collection_name" + ], + "type": "object" + }, + "CreateAliasOperation": { + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + }, + "required": [ + "create_alias" + ], + "type": "object" + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "properties": { + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "hnsw_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for HNSW index. If none - values from service configuration file are used." + }, + "optimizers_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for Optimizers. If none - values from service configuration file are used." + }, + "vector_size": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "wal_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for WAL. If none - values from service configuration file are used." + } + }, + "required": [ + "distance", + "vector_size" + ], + "type": "object" + }, + "CreateCollectionOperation": { + "description": "Operation for creating new collection and (optionally) specify index params", + "properties": { + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "hnsw_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for HNSW index. If none - values from service configuration file are used." + }, + "name": { + "type": "string" + }, + "optimizers_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for Optimizers. If none - values from service configuration file are used." + }, + "vector_size": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "wal_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for WAL. If none - values from service configuration file are used." + } + }, + "required": [ + "distance", + "name", + "vector_size" + ], + "type": "object" + }, + "CreateFieldIndex": { + "properties": { + "field_name": { + "type": "string" + } + }, + "required": [ + "field_name" + ], + "type": "object" + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "properties": { + "alias_name": { + "type": "string" + } + }, + "required": [ + "alias_name" + ], + "type": "object" + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + }, + "required": [ + "delete_alias" + ], + "type": "object" + }, + "DeleteCollectionOperation": { + "description": "Operation for deleting collection with given name", + "type": "string" + }, + "DeletePayload": { + "properties": { + "keys": { + "items": { + "type": "string" + }, + "type": "array" + }, + "points": { + "description": "Deletes values from each point in this list", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + } + }, + "required": [ + "keys", + "points" + ], + "type": "object" + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ], + "type": "string" + }, + "ErrorResponse": { + "properties": { + "result": { + "nullable": true, + "type": "object" + }, + "status": { + "properties": { + "error": { + "description": "Description of the occurred error.", + "type": "string" + } + }, + "type": "object" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "ExtendedPointId": { + "anyOf": [ + { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + { + "format": "uuid", + "type": "string" + } + ], + "description": "Type, used for specifying point ID in user interface" + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "properties": { + "geo_bounding_box": { + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ], + "description": "Check if points geo location lies in a given area" + }, + "geo_radius": { + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ], + "description": "Check if geo point is within a given radius" + }, + "key": { + "type": "string" + }, + "match": { + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ], + "description": "Check if point has field with a given value" + }, + "range": { + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ], + "description": "Check if points value lies in a given range" + } + }, + "required": [ + "key" + ], + "type": "object" + }, + "FieldIndexOperations": { + "oneOf": [ + { + "additionalProperties": false, + "description": "Create index for payload field", + "properties": { + "create_index": { + "type": "string" + } + }, + "required": [ + "create_index" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Delete index for the field", + "properties": { + "delete_index": { + "type": "string" + } + }, + "required": [ + "delete_index" + ], + "type": "object" + } + ] + }, + "Filter": { + "additionalProperties": false, + "properties": { + "must": { + "description": "All conditions must match", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true, + "type": "array" + }, + "must_not": { + "description": "All conditions must NOT match", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true, + "type": "array" + }, + "should": { + "description": "At least one of thous conditions should match", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true, + "type": "array" + } + }, + "type": "object" + }, + "FilterSelector": { + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + }, + "required": [ + "filter" + ], + "type": "object" + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "properties": { + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + }, + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + } + }, + "required": [ + "bottom_right", + "top_left" + ], + "type": "object" + }, + "GeoPoint": { + "description": "Geo point payload schema", + "properties": { + "lat": { + "format": "double", + "type": "number" + }, + "lon": { + "format": "double", + "type": "number" + } + }, + "required": [ + "lat", + "lon" + ], + "type": "object" + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "format": "double", + "type": "number" + } + }, + "required": [ + "center", + "radius" + ], + "type": "object" + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "properties": { + "has_id": { + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array", + "uniqueItems": true + } + }, + "required": [ + "has_id" + ], + "type": "object" + }, + "HnswConfig": { + "description": "Config of HNSW index", + "properties": { + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "full_scan_threshold": { + "description": "Minimal amount of points for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required.", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "type": "object" + }, + "HnswConfigDiff": { + "properties": { + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "full_scan_threshold": { + "description": "Minimal amount of points for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "Match": { + "anyOf": [ + { + "$ref": "#/components/schemas/MatchKeyword" + }, + { + "$ref": "#/components/schemas/MatchInteger" + } + ], + "description": "Match filter request" + }, + "MatchInteger": { + "description": "Match filter request", + "properties": { + "integer": { + "description": "Integer value to match", + "format": "int64", + "type": "integer" + } + }, + "required": [ + "integer" + ], + "type": "object" + }, + "MatchKeyword": { + "description": "Match by keyword", + "properties": { + "keyword": { + "description": "Keyword value to match", + "type": "string" + } + }, + "required": [ + "keyword" + ], + "type": "object" + }, + "OptimizersConfig": { + "properties": { + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "format": "double", + "type": "number" + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "indexing_threshold": { + "description": "Maximum number of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "max_segment_size": { + "description": "Do not create segments larger this number of points. Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher.", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "memmap_threshold": { + "description": "Maximum number of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "payload_indexing_threshold": { + "description": "Starting from this amount of vectors per-segment the engine will start building index for payload.", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "max_segment_size", + "memmap_threshold", + "payload_indexing_threshold", + "vacuum_min_vector_number" + ], + "type": "object" + }, + "OptimizersConfigDiff": { + "properties": { + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "format": "double", + "nullable": true, + "type": "number" + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "format": "uint64", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "indexing_threshold": { + "description": "Maximum number of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "max_segment_size": { + "description": "Do not create segments larger this number of points. Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "memmap_threshold": { + "description": "Maximum number of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "payload_indexing_threshold": { + "description": "Starting from this amount of vectors per-segment the engine will start building index for payload.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "enum": [ + "ok" + ], + "type": "string" + }, + { + "additionalProperties": false, + "description": "Something wrong happened with optimizers", + "properties": { + "error": { + "type": "string" + } + }, + "required": [ + "error" + ], + "type": "object" + } + ] + }, + "PayloadInterface": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadVariant_for_String" + }, + { + "$ref": "#/components/schemas/PayloadVariant_for_int64" + }, + { + "$ref": "#/components/schemas/PayloadVariant_for_double" + }, + { + "$ref": "#/components/schemas/PayloadInterfaceStrict" + } + ], + "description": "Structure for converting user-provided payload into internal structure representation\n\nUsed to allow user provide payload in more human-friendly format, and do not force explicit brackets, included constructions, e.t.c.\n\nExample:\n\n```json {..., \"payload\": {\"city\": \"Berlin\"}, ... } ```\n\nShould be captured by `KeywordShortcut`" + }, + "PayloadInterfaceStrict": { + "description": "Fallback for `PayloadInterface` which is used if user explicitly specifies type of payload\n\nExample:\n\n```json {..., \"payload\": {\"city\": { \"type\": \"keyword\", \"value\": \"Berlin\" }}, ... } ```\n\nShould be captured by `Keyword(PayloadVariant)`", + "oneOf": [ + { + "properties": { + "type": { + "enum": [ + "keyword" + ], + "type": "string" + }, + "value": { + "$ref": "#/components/schemas/PayloadVariant_for_String" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "integer" + ], + "type": "string" + }, + "value": { + "$ref": "#/components/schemas/PayloadVariant_for_int64" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "float" + ], + "type": "string" + }, + "value": { + "$ref": "#/components/schemas/PayloadVariant_for_double" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "geo" + ], + "type": "string" + }, + "value": { + "$ref": "#/components/schemas/PayloadVariant_for_GeoPoint" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + } + ] + }, + "PayloadOps": { + "description": "Define operations description for point payloads manipulation", + "oneOf": [ + { + "additionalProperties": false, + "description": "Set payload value, overrides if it is already exists", + "properties": { + "set_payload": { + "$ref": "#/components/schemas/SetPayload" + } + }, + "required": [ + "set_payload" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Deletes specified payload values if they are assigned", + "properties": { + "delete_payload": { + "$ref": "#/components/schemas/DeletePayload" + } + }, + "required": [ + "delete_payload" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Drops all Payload values associated with given points.", + "properties": { + "clear_payload": { + "properties": { + "points": { + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + } + }, + "required": [ + "points" + ], + "type": "object" + } + }, + "required": [ + "clear_payload" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Clear all Payload values by given filter criteria.", + "properties": { + "clear_payload_by_filter": { + "$ref": "#/components/schemas/Filter" + } + }, + "required": [ + "clear_payload_by_filter" + ], + "type": "object" + } + ] + }, + "PayloadSchemaInfo": { + "description": "Payload field type & index information", + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "indexed": { + "type": "boolean" + } + }, + "required": [ + "data_type", + "indexed" + ], + "type": "object" + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "oneOf": [ + { + "properties": { + "type": { + "enum": [ + "keyword" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "integer" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "float" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "geo" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + } + ] + }, + "PayloadSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ], + "description": "Specifies how to treat payload selector" + }, + "PayloadSelectorExclude": { + "additionalProperties": false, + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "exclude" + ], + "type": "object" + }, + "PayloadSelectorInclude": { + "additionalProperties": false, + "properties": { + "include": { + "description": "Only include this payload keys", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "include" + ], + "type": "object" + }, + "PayloadType": { + "description": "All possible payload types", + "oneOf": [ + { + "properties": { + "type": { + "enum": [ + "keyword" + ], + "type": "string" + }, + "value": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "integer" + ], + "type": "string" + }, + "value": { + "items": { + "format": "int64", + "type": "integer" + }, + "type": "array" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "float" + ], + "type": "string" + }, + "value": { + "items": { + "format": "double", + "type": "number" + }, + "type": "array" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + }, + { + "properties": { + "type": { + "enum": [ + "geo" + ], + "type": "string" + }, + "value": { + "items": { + "$ref": "#/components/schemas/GeoPoint" + }, + "type": "array" + } + }, + "required": [ + "type", + "value" + ], + "type": "object" + } + ] + }, + "PayloadVariant_for_GeoPoint": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/GeoPoint" + }, + "type": "array" + }, + { + "$ref": "#/components/schemas/GeoPoint" + } + ], + "description": "Payload interface structure which ensures that user is allowed to pass payload in both - array and single element forms.\n\nExample:\n\nBoth versions should work: ```json {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"Berlin\", \"London\"] }}}, {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": \"Moscow\" }}}, ```" + }, + "PayloadVariant_for_String": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Payload interface structure which ensures that user is allowed to pass payload in both - array and single element forms.\n\nExample:\n\nBoth versions should work: ```json {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"Berlin\", \"London\"] }}}, {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": \"Moscow\" }}}, ```" + }, + "PayloadVariant_for_double": { + "anyOf": [ + { + "items": { + "format": "double", + "type": "number" + }, + "type": "array" + }, + { + "format": "double", + "type": "number" + } + ], + "description": "Payload interface structure which ensures that user is allowed to pass payload in both - array and single element forms.\n\nExample:\n\nBoth versions should work: ```json {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"Berlin\", \"London\"] }}}, {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": \"Moscow\" }}}, ```" + }, + "PayloadVariant_for_int64": { + "anyOf": [ + { + "items": { + "format": "int64", + "type": "integer" + }, + "type": "array" + }, + { + "format": "int64", + "type": "integer" + } + ], + "description": "Payload interface structure which ensures that user is allowed to pass payload in both - array and single element forms.\n\nExample:\n\nBoth versions should work: ```json {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"Berlin\", \"London\"] }}}, {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": \"Moscow\" }}}, ```" + }, + "PointIdsList": { + "properties": { + "points": { + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + } + }, + "required": [ + "points" + ], + "type": "object" + }, + "PointInsertOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "PointOperations": { + "oneOf": [ + { + "additionalProperties": false, + "description": "Insert or update points", + "properties": { + "upsert_points": { + "$ref": "#/components/schemas/PointInsertOperations" + } + }, + "required": [ + "upsert_points" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Delete point if exists", + "properties": { + "delete_points": { + "properties": { + "ids": { + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + } + }, + "required": [ + "ids" + ], + "type": "object" + } + }, + "required": [ + "delete_points" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Delete points by given filter criteria", + "properties": { + "delete_points_by_filter": { + "$ref": "#/components/schemas/Filter" + } + }, + "required": [ + "delete_points_by_filter" + ], + "type": "object" + } + ] + }, + "PointRequest": { + "properties": { + "ids": { + "description": "Look for points with ids", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + }, + "with_payload": { + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ], + "description": "Select which payload to return with the response. Default: All" + }, + "with_vector": { + "default": false, + "description": "Whether to return the point vector with the result?", + "type": "boolean" + } + }, + "required": [ + "ids" + ], + "type": "object" + }, + "PointStruct": { + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "additionalProperties": { + "$ref": "#/components/schemas/PayloadInterface" + }, + "description": "Payload values (optional)", + "nullable": true, + "type": "object" + }, + "vector": { + "description": "Vector", + "items": { + "format": "float", + "type": "number" + }, + "type": "array" + } + }, + "required": [ + "id", + "vector" + ], + "type": "object" + }, + "PointsBatch": { + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + }, + "required": [ + "batch" + ], + "type": "object" + }, + "PointsList": { + "properties": { + "points": { + "items": { + "$ref": "#/components/schemas/PointStruct" + }, + "type": "array" + } + }, + "required": [ + "points" + ], + "type": "object" + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "Range": { + "description": "Range filter request", + "properties": { + "gt": { + "description": "point.key > range.gt", + "format": "double", + "nullable": true, + "type": "number" + }, + "gte": { + "description": "point.key >= range.gte", + "format": "double", + "nullable": true, + "type": "number" + }, + "lt": { + "description": "point.key < range.lt", + "format": "double", + "nullable": true, + "type": "number" + }, + "lte": { + "description": "point.key <= range.lte", + "format": "double", + "nullable": true, + "type": "number" + } + }, + "type": "object" + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "properties": { + "filter": { + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ], + "description": "Look only for points which satisfies this conditions" + }, + "negative": { + "description": "Try to avoid vectors like this", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ], + "description": "Additional search params" + }, + "positive": { + "description": "Look for vectors closest to those", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + }, + "top": { + "description": "Max number of result to return", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "with_payload": { + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ], + "description": "Select which payload to return with the response. Default: None" + }, + "with_vector": { + "default": false, + "description": "Whether to return the point vector with the result?", + "type": "boolean" + } + }, + "required": [ + "negative", + "positive", + "top" + ], + "type": "object" + }, + "Record": { + "description": "Point data", + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "additionalProperties": { + "$ref": "#/components/schemas/PayloadType" + }, + "description": "Payload - values assigned to the point", + "nullable": true, + "type": "object" + }, + "vector": { + "description": "Vector of the point", + "items": { + "format": "float", + "type": "number" + }, + "nullable": true, + "type": "array" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "RenameAlias": { + "description": "Change alias to a new one", + "properties": { + "new_alias_name": { + "type": "string" + }, + "old_alias_name": { + "type": "string" + } + }, + "required": [ + "new_alias_name", + "old_alias_name" + ], + "type": "object" + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + }, + "required": [ + "rename_alias" + ], + "type": "object" + }, + "ScoredPoint": { + "description": "Search result", + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "additionalProperties": { + "$ref": "#/components/schemas/PayloadType" + }, + "description": "Payload - values assigned to the point", + "nullable": true, + "type": "object" + }, + "score": { + "description": "Points vector distance to the query vector", + "format": "float", + "type": "number" + }, + "vector": { + "description": "Vector of the point", + "items": { + "format": "float", + "type": "number" + }, + "nullable": true, + "type": "array" + }, + "version": { + "description": "Point version", + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "id", + "score", + "version" + ], + "type": "object" + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "properties": { + "filter": { + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ], + "description": "Look only for points which satisfies this conditions. If not provided - all points." + }, + "limit": { + "description": "Page size. Default: 10", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "offset": { + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ], + "description": "Start ID to read points from." + }, + "with_payload": { + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ], + "description": "Select which payload to return with the response. Default: All" + }, + "with_vector": { + "default": false, + "description": "Whether to return the point vector with the result?", + "type": "boolean" + } + }, + "type": "object" + }, + "ScrollResult": { + "description": "Result of the points read request", + "properties": { + "next_page_offset": { + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ], + "description": "Offset which should be used to retrieve a next page result" + }, + "points": { + "description": "List of retrieved points", + "items": { + "$ref": "#/components/schemas/Record" + }, + "type": "array" + } + }, + "required": [ + "points" + ], + "type": "object" + }, + "SearchParams": { + "description": "Additional parameters of the search", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "properties": { + "filter": { + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ], + "description": "Look only for points which satisfies this conditions" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ], + "description": "Additional search params" + }, + "top": { + "description": "Max number of result to return", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "vector": { + "description": "Look for vectors closest to this", + "items": { + "format": "float", + "type": "number" + }, + "type": "array" + }, + "with_payload": { + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ], + "description": "Select which payload to return with the response. Default: None" + }, + "with_vector": { + "default": false, + "description": "Whether to return the point vector with the result?", + "type": "boolean" + } + }, + "required": [ + "top", + "vector" + ], + "type": "object" + }, + "SetPayload": { + "properties": { + "payload": { + "additionalProperties": { + "$ref": "#/components/schemas/PayloadInterface" + }, + "type": "object" + }, + "points": { + "description": "Assigns payload to each point in this list", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + } + }, + "required": [ + "payload", + "points" + ], + "type": "object" + }, + "StorageOperations": { + "description": "Enumeration of all possible collection update operations", + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "create_collection": { + "$ref": "#/components/schemas/CreateCollectionOperation" + } + }, + "required": [ + "create_collection" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "update_collection": { + "$ref": "#/components/schemas/UpdateCollectionOperation" + } + }, + "required": [ + "update_collection" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "delete_collection": { + "$ref": "#/components/schemas/DeleteCollectionOperation" + } + }, + "required": [ + "delete_collection" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "change_aliases": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + }, + "required": [ + "change_aliases" + ], + "type": "object" + } + ] + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "properties": { + "optimizers_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete" + } + }, + "type": "object" + }, + "UpdateCollectionOperation": { + "description": "Operation for updating parameters of the existing collection", + "properties": { + "name": { + "type": "string" + }, + "optimizers_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "UpdateResult": { + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + }, + "required": [ + "operation_id", + "status" + ], + "type": "object" + }, + "UpdateStatus": { + "enum": [ + "acknowledged", + "completed" + ], + "type": "string" + }, + "WalConfig": { + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "type": "object" + }, + "WalConfigDiff": { + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "WithPayloadInterface": { + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "items": { + "type": "string" + }, + "type": "array" + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ], + "description": "Options for specifying which payload to include or not" + } + } + }, + "externalDocs": { + "description": "Find out more about Qdrant aplications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "info": { + "contact": { + "email": "andrey@vasnetsov.com" + }, + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"payload_indexing_threshold\": 10000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": \"Berlin\"}}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"Berlin\", \"London\"] }}},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"Berlin\", \"Moscow\"] }}},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"London\", \"Moscow\"]}}},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": {\"type\": \"integer\", \"value\": [0]}}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"keyword\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "title": "Qdrant API", + "version": "v0.6.0" + }, + "openapi": "3.0.1", + "paths": { + "/collections": { + "get": { + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "List collections", + "tags": [ + "collections" + ] + }, + "post": { + "deprecated": true, + "description": "Perform update, create, remove or alias change operations on collections", + "operationId": "update_collections", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StorageOperations" + } + } + }, + "description": "Operation to perform on collections" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "type": "boolean" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Update collection", + "tags": [ + "collections" + ] + } + }, + "/collections/aliases": { + "post": { + "operationId": "update_aliases", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + }, + "description": "Alias update operations" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "type": "boolean" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Update aliases of the collections", + "tags": [ + "collections" + ] + } + }, + "/collections/{collection_name}": { + "delete": { + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "description": "Name of the collection to delete", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "type": "boolean" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Delete collection", + "tags": [ + "collections" + ] + }, + "get": { + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "description": "Name of the collection to retrieve", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/CollectionInfo" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Collection info", + "tags": [ + "collections" + ] + }, + "patch": { + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "parameters": [ + { + "description": "Name of the collection to update", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + }, + "description": "New parameters" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "type": "boolean" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Update collection parameters", + "tags": [ + "collections" + ] + }, + "post": { + "deprecated": true, + "description": "Perform point update operation (vectors, payloads, indexes) in collection", + "operationId": "update_points", + "parameters": [ + { + "description": "Name of the collection to search in", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CollectionUpdateOperations" + } + } + }, + "description": "Collection update operations" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Update points", + "tags": [ + "points" + ] + }, + "put": { + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "parameters": [ + { + "description": "Name of the new collection", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + }, + "description": "Parameters of a new collection" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "type": "boolean" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Create collection", + "tags": [ + "collections" + ] + } + }, + "/collections/{collection_name}/index": { + "put": { + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "description": "Name of the collection", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + }, + "description": "Field name" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Create index for field in collection", + "tags": [ + "collections" + ] + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "description": "Name of the collection", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Name of the field where to delete the index", + "in": "path", + "name": "field_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Delete index for field in collection", + "tags": [ + "collections" + ] + } + }, + "/collections/{collection_name}/points": { + "post": { + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "parameters": [ + { + "description": "Name of the collection to retrieve from", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + }, + "description": "List of points to retrieve" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "items": { + "$ref": "#/components/schemas/Record" + }, + "type": "array" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Get points", + "tags": [ + "points" + ] + }, + "put": { + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "parameters": [ + { + "description": "Name of the collection to update from", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + }, + "description": "Operation to perform on points" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Upsert points", + "tags": [ + "points" + ] + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "description": "Delete points", + "operationId": "delete_points", + "parameters": [ + { + "description": "Name of the collection to delete from", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + }, + "description": "Operation to perform on points" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Delete points", + "tags": [ + "points" + ] + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "description": "Set payload for points", + "operationId": "set_payload", + "parameters": [ + { + "description": "Name of the collection to set from", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + }, + "description": "Set payload on points" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Set payload", + "tags": [ + "points" + ] + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "parameters": [ + { + "description": "Name of the collection to clear payload from", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + }, + "description": "clear payload on points" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Clear payload", + "tags": [ + "points" + ] + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "parameters": [ + { + "description": "Name of the collection to delete from", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + }, + "description": "delete payload on points" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Delete payload", + "tags": [ + "points" + ] + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "parameters": [ + { + "description": "Name of the collection to search in", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + }, + "description": "Request points based on positive and negative examples." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "items": { + "$ref": "#/components/schemas/ScoredPoint" + }, + "type": "array" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Recommend points", + "tags": [ + "points" + ] + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "parameters": [ + { + "description": "Name of the collection to retrieve from", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + }, + "description": "Pagination and filter parameters" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/ScrollResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Scroll points", + "tags": [ + "points" + ] + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "parameters": [ + { + "description": "Name of the collection to search in", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + }, + "description": "Search request with optional filtering" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "items": { + "$ref": "#/components/schemas/ScoredPoint" + }, + "type": "array" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Search points", + "tags": [ + "points" + ] + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "description": "Name of the collection to retrieve from", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Id of the point", + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/Record" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Get point", + "tags": [ + "points" + ] + } + } + }, + "servers": [ + { + "url": "http://localhost:6333" + } + ], + "tags": [ + { + "description": "Searchable collections of points.", + "name": "collections" + }, + { + "description": "Float-point vectors with payload.", + "name": "points" + } + ] +} diff --git a/docs/redoc/v0.7.0/openapi.json b/docs/redoc/v0.7.0/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..631b1b8792402db0676cd19213ff37ee3d389857 --- /dev/null +++ b/docs/redoc/v0.7.0/openapi.json @@ -0,0 +1,3595 @@ +{ + "components": { + "schemas": { + "AliasOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ], + "description": "Group of all the possible operations related to collection aliases" + }, + "Batch": { + "properties": { + "ids": { + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + }, + "payloads": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true, + "type": "array" + }, + "vectors": { + "items": { + "items": { + "format": "float", + "type": "number" + }, + "type": "array" + }, + "type": "array" + } + }, + "required": [ + "ids", + "vectors" + ], + "type": "object" + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "properties": { + "actions": { + "items": { + "$ref": "#/components/schemas/AliasOperations" + }, + "type": "array" + } + }, + "required": [ + "actions" + ], + "type": "object" + }, + "CollectionConfig": { + "properties": { + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + }, + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "type": "object" + }, + "CollectionDescription": { + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "properties": { + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "disk_data_size": { + "description": "Disk space, used by collection", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "payload_schema": { + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + }, + "description": "Types of stored payload", + "type": "object" + }, + "ram_data_size": { + "description": "RAM used by collection", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "segments_count": { + "description": "Number of segments in collection", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "config", + "disk_data_size", + "optimizer_status", + "payload_schema", + "ram_data_size", + "segments_count", + "status", + "vectors_count" + ], + "type": "object" + }, + "CollectionMetaOperations": { + "description": "Enumeration of all possible collection update operations", + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "create_collection": { + "$ref": "#/components/schemas/CreateCollectionOperation" + } + }, + "required": [ + "create_collection" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "update_collection": { + "$ref": "#/components/schemas/UpdateCollectionOperation" + } + }, + "required": [ + "update_collection" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "delete_collection": { + "$ref": "#/components/schemas/DeleteCollectionOperation" + } + }, + "required": [ + "delete_collection" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "change_aliases": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + }, + "required": [ + "change_aliases" + ], + "type": "object" + } + ] + }, + "CollectionParams": { + "properties": { + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "shard_number": { + "default": 1, + "description": "Number of shards the collection has", + "format": "uint32", + "minimum": 1, + "type": "integer" + }, + "vector_size": { + "description": "Size of a vectors used", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "distance", + "vector_size" + ], + "type": "object" + }, + "CollectionStatus": { + "description": "Current state of the collection", + "enum": [ + "green", + "yellow", + "red" + ], + "type": "string" + }, + "CollectionUpdateOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointOperations" + }, + { + "$ref": "#/components/schemas/PayloadOps" + }, + { + "$ref": "#/components/schemas/FieldIndexOperations" + } + ] + }, + "CollectionsResponse": { + "properties": { + "collections": { + "items": { + "$ref": "#/components/schemas/CollectionDescription" + }, + "type": "array" + } + }, + "required": [ + "collections" + ], + "type": "object" + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "properties": { + "alias_name": { + "type": "string" + }, + "collection_name": { + "type": "string" + } + }, + "required": [ + "alias_name", + "collection_name" + ], + "type": "object" + }, + "CreateAliasOperation": { + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + }, + "required": [ + "create_alias" + ], + "type": "object" + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "properties": { + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "hnsw_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for HNSW index. If none - values from service configuration file are used." + }, + "optimizers_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for Optimizers. If none - values from service configuration file are used." + }, + "shard_number": { + "default": 1, + "description": "Number of shards in collection. Default is 1, minimum is 1.", + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "vector_size": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "wal_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for WAL. If none - values from service configuration file are used." + } + }, + "required": [ + "distance", + "vector_size" + ], + "type": "object" + }, + "CreateCollectionOperation": { + "description": "Operation for creating new collection and (optionally) specify index params", + "properties": { + "collection_name": { + "type": "string" + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "hnsw_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for HNSW index. If none - values from service configuration file are used." + }, + "optimizers_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for Optimizers. If none - values from service configuration file are used." + }, + "shard_number": { + "default": 1, + "description": "Number of shards in collection. Default is 1, minimum is 1.", + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "vector_size": { + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "wal_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for WAL. If none - values from service configuration file are used." + } + }, + "required": [ + "collection_name", + "distance", + "vector_size" + ], + "type": "object" + }, + "CreateFieldIndex": { + "properties": { + "field_name": { + "type": "string" + }, + "field_type": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "nullable": true + } + ] + } + }, + "required": [ + "field_name" + ], + "type": "object" + }, + "CreateIndex": { + "properties": { + "field_name": { + "type": "string" + }, + "field_type": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "nullable": true + } + ] + } + }, + "required": [ + "field_name" + ], + "type": "object" + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "properties": { + "alias_name": { + "type": "string" + } + }, + "required": [ + "alias_name" + ], + "type": "object" + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + }, + "required": [ + "delete_alias" + ], + "type": "object" + }, + "DeleteCollectionOperation": { + "description": "Operation for deleting collection with given name", + "type": "string" + }, + "DeletePayload": { + "properties": { + "keys": { + "items": { + "type": "string" + }, + "type": "array" + }, + "points": { + "description": "Deletes values from each point in this list", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + } + }, + "required": [ + "keys", + "points" + ], + "type": "object" + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ], + "type": "string" + }, + "ErrorResponse": { + "properties": { + "result": { + "nullable": true, + "type": "object" + }, + "status": { + "properties": { + "error": { + "description": "Description of the occurred error.", + "type": "string" + } + }, + "type": "object" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "ExtendedPointId": { + "anyOf": [ + { + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + { + "format": "uuid", + "type": "string" + } + ], + "description": "Type, used for specifying point ID in user interface" + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "properties": { + "geo_bounding_box": { + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ], + "description": "Check if points geo location lies in a given area" + }, + "geo_radius": { + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ], + "description": "Check if geo point is within a given radius" + }, + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ], + "description": "Check if point has field with a given value" + }, + "range": { + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ], + "description": "Check if points value lies in a given range" + }, + "values_count": { + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ], + "description": "Check number of values of the field" + } + }, + "required": [ + "key" + ], + "type": "object" + }, + "FieldIndexOperations": { + "oneOf": [ + { + "additionalProperties": false, + "description": "Create index for payload field", + "properties": { + "create_index": { + "$ref": "#/components/schemas/CreateIndex" + } + }, + "required": [ + "create_index" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Delete index for the field", + "properties": { + "delete_index": { + "type": "string" + } + }, + "required": [ + "delete_index" + ], + "type": "object" + } + ] + }, + "Filter": { + "additionalProperties": false, + "properties": { + "must": { + "description": "All conditions must match", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true, + "type": "array" + }, + "must_not": { + "description": "All conditions must NOT match", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true, + "type": "array" + }, + "should": { + "description": "At least one of thous conditions should match", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true, + "type": "array" + } + }, + "type": "object" + }, + "FilterSelector": { + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + }, + "required": [ + "filter" + ], + "type": "object" + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "properties": { + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + }, + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + } + }, + "required": [ + "bottom_right", + "top_left" + ], + "type": "object" + }, + "GeoPoint": { + "description": "Geo point payload schema", + "properties": { + "lat": { + "format": "double", + "type": "number" + }, + "lon": { + "format": "double", + "type": "number" + } + }, + "required": [ + "lat", + "lon" + ], + "type": "object" + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "format": "double", + "type": "number" + } + }, + "required": [ + "center", + "radius" + ], + "type": "object" + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "properties": { + "has_id": { + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array", + "uniqueItems": true + } + }, + "required": [ + "has_id" + ], + "type": "object" + }, + "HnswConfig": { + "description": "Config of HNSW index", + "properties": { + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "full_scan_threshold": { + "description": "Minimal amount of points for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required.", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "type": "object" + }, + "HnswConfigDiff": { + "properties": { + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "full_scan_threshold": { + "description": "Minimal amount of points for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + }, + "required": [ + "is_empty" + ], + "type": "object" + }, + "Match": { + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchKeyword" + }, + { + "$ref": "#/components/schemas/MatchInteger" + } + ], + "description": "Match filter request" + }, + "MatchInteger": { + "deprecated": true, + "description": "Match filter request (deprecated)", + "properties": { + "integer": { + "deprecated": true, + "description": "Integer value to match", + "format": "int64", + "type": "integer" + } + }, + "required": [ + "integer" + ], + "type": "object" + }, + "MatchKeyword": { + "deprecated": true, + "description": "Match by keyword (deprecated)", + "properties": { + "keyword": { + "deprecated": true, + "description": "Keyword value to match", + "type": "string" + } + }, + "required": [ + "keyword" + ], + "type": "object" + }, + "MatchValue": { + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + }, + "required": [ + "value" + ], + "type": "object" + }, + "OptimizersConfig": { + "properties": { + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "format": "double", + "type": "number" + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "indexing_threshold": { + "description": "Maximum number of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "max_segment_size": { + "description": "Do not create segments larger this number of points. Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher.", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "memmap_threshold": { + "description": "Maximum number of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "payload_indexing_threshold": { + "description": "Starting from this amount of vectors per-segment the engine will start building index for payload.", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "max_segment_size", + "memmap_threshold", + "payload_indexing_threshold", + "vacuum_min_vector_number" + ], + "type": "object" + }, + "OptimizersConfigDiff": { + "properties": { + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "format": "double", + "nullable": true, + "type": "number" + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "format": "uint64", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "indexing_threshold": { + "description": "Maximum number of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "max_segment_size": { + "description": "Do not create segments larger this number of points. Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "memmap_threshold": { + "description": "Maximum number of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "payload_indexing_threshold": { + "description": "Starting from this amount of vectors per-segment the engine will start building index for payload.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "enum": [ + "ok" + ], + "type": "string" + }, + { + "additionalProperties": false, + "description": "Something wrong happened with optimizers", + "properties": { + "error": { + "type": "string" + } + }, + "required": [ + "error" + ], + "type": "object" + } + ] + }, + "Payload": { + "additionalProperties": true, + "type": "object" + }, + "PayloadField": { + "description": "Payload field", + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + }, + "required": [ + "key" + ], + "type": "object" + }, + "PayloadIndexInfo": { + "description": "Payload field type & index information", + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + } + }, + "required": [ + "data_type" + ], + "type": "object" + }, + "PayloadOps": { + "description": "Define operations description for point payloads manipulation", + "oneOf": [ + { + "additionalProperties": false, + "description": "Set payload value, overrides if it is already exists", + "properties": { + "set_payload": { + "$ref": "#/components/schemas/SetPayload" + } + }, + "required": [ + "set_payload" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Deletes specified payload values if they are assigned", + "properties": { + "delete_payload": { + "$ref": "#/components/schemas/DeletePayload" + } + }, + "required": [ + "delete_payload" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Drops all Payload values associated with given points.", + "properties": { + "clear_payload": { + "properties": { + "points": { + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + } + }, + "required": [ + "points" + ], + "type": "object" + } + }, + "required": [ + "clear_payload" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Clear all Payload values by given filter criteria.", + "properties": { + "clear_payload_by_filter": { + "$ref": "#/components/schemas/Filter" + } + }, + "required": [ + "clear_payload_by_filter" + ], + "type": "object" + } + ] + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "enum": [ + "keyword", + "integer", + "float", + "geo" + ], + "type": "string" + }, + "PayloadSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ], + "description": "Specifies how to treat payload selector" + }, + "PayloadSelectorExclude": { + "additionalProperties": false, + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "exclude" + ], + "type": "object" + }, + "PayloadSelectorInclude": { + "additionalProperties": false, + "properties": { + "include": { + "description": "Only include this payload keys", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "include" + ], + "type": "object" + }, + "PointIdsList": { + "properties": { + "points": { + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + } + }, + "required": [ + "points" + ], + "type": "object" + }, + "PointInsertOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "PointOperations": { + "oneOf": [ + { + "additionalProperties": false, + "description": "Insert or update points", + "properties": { + "upsert_points": { + "$ref": "#/components/schemas/PointInsertOperations" + } + }, + "required": [ + "upsert_points" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Delete point if exists", + "properties": { + "delete_points": { + "properties": { + "ids": { + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + } + }, + "required": [ + "ids" + ], + "type": "object" + } + }, + "required": [ + "delete_points" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "Delete points by given filter criteria", + "properties": { + "delete_points_by_filter": { + "$ref": "#/components/schemas/Filter" + } + }, + "required": [ + "delete_points_by_filter" + ], + "type": "object" + } + ] + }, + "PointRequest": { + "properties": { + "ids": { + "description": "Look for points with ids", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + }, + "with_payload": { + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ], + "description": "Select which payload to return with the response. Default: All" + }, + "with_vector": { + "default": false, + "description": "Whether to return the point vector with the result?", + "type": "boolean" + } + }, + "required": [ + "ids" + ], + "type": "object" + }, + "PointStruct": { + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ], + "description": "Payload values (optional)" + }, + "vector": { + "description": "Vector", + "items": { + "format": "float", + "type": "number" + }, + "type": "array" + } + }, + "required": [ + "id", + "vector" + ], + "type": "object" + }, + "PointsBatch": { + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + }, + "required": [ + "batch" + ], + "type": "object" + }, + "PointsList": { + "properties": { + "points": { + "items": { + "$ref": "#/components/schemas/PointStruct" + }, + "type": "array" + } + }, + "required": [ + "points" + ], + "type": "object" + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "Range": { + "description": "Range filter request", + "properties": { + "gt": { + "description": "point.key > range.gt", + "format": "double", + "nullable": true, + "type": "number" + }, + "gte": { + "description": "point.key >= range.gte", + "format": "double", + "nullable": true, + "type": "number" + }, + "lt": { + "description": "point.key < range.lt", + "format": "double", + "nullable": true, + "type": "number" + }, + "lte": { + "description": "point.key <= range.lte", + "format": "double", + "nullable": true, + "type": "number" + } + }, + "type": "object" + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "properties": { + "filter": { + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ], + "description": "Look only for points which satisfies this conditions" + }, + "negative": { + "description": "Try to avoid vectors like this", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ], + "description": "Additional search params" + }, + "positive": { + "description": "Look for vectors closest to those", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + }, + "top": { + "description": "Max number of result to return", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "with_payload": { + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ], + "description": "Select which payload to return with the response. Default: None" + }, + "with_vector": { + "default": false, + "description": "Whether to return the point vector with the result?", + "type": "boolean" + } + }, + "required": [ + "negative", + "positive", + "top" + ], + "type": "object" + }, + "Record": { + "description": "Point data", + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ], + "description": "Payload - values assigned to the point" + }, + "vector": { + "description": "Vector of the point", + "items": { + "format": "float", + "type": "number" + }, + "nullable": true, + "type": "array" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "RenameAlias": { + "description": "Change alias to a new one", + "properties": { + "new_alias_name": { + "type": "string" + }, + "old_alias_name": { + "type": "string" + } + }, + "required": [ + "new_alias_name", + "old_alias_name" + ], + "type": "object" + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + }, + "required": [ + "rename_alias" + ], + "type": "object" + }, + "ScoredPoint": { + "description": "Search result", + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ], + "description": "Payload - values assigned to the point" + }, + "score": { + "description": "Points vector distance to the query vector", + "format": "float", + "type": "number" + }, + "vector": { + "description": "Vector of the point", + "items": { + "format": "float", + "type": "number" + }, + "nullable": true, + "type": "array" + }, + "version": { + "description": "Point version", + "format": "uint64", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "id", + "score", + "version" + ], + "type": "object" + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "properties": { + "filter": { + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ], + "description": "Look only for points which satisfies this conditions. If not provided - all points." + }, + "limit": { + "description": "Page size. Default: 10", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "offset": { + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ], + "description": "Start ID to read points from." + }, + "with_payload": { + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ], + "description": "Select which payload to return with the response. Default: All" + }, + "with_vector": { + "default": false, + "description": "Whether to return the point vector with the result?", + "type": "boolean" + } + }, + "type": "object" + }, + "ScrollResult": { + "description": "Result of the points read request", + "properties": { + "next_page_offset": { + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ], + "description": "Offset which should be used to retrieve a next page result" + }, + "points": { + "description": "List of retrieved points", + "items": { + "$ref": "#/components/schemas/Record" + }, + "type": "array" + } + }, + "required": [ + "points" + ], + "type": "object" + }, + "SearchParams": { + "description": "Additional parameters of the search", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "properties": { + "filter": { + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ], + "description": "Look only for points which satisfies this conditions" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ], + "description": "Additional search params" + }, + "top": { + "description": "Max number of result to return", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "vector": { + "description": "Look for vectors closest to this", + "items": { + "format": "float", + "type": "number" + }, + "type": "array" + }, + "with_payload": { + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ], + "description": "Select which payload to return with the response. Default: None" + }, + "with_vector": { + "default": false, + "description": "Whether to return the point vector with the result?", + "type": "boolean" + } + }, + "required": [ + "top", + "vector" + ], + "type": "object" + }, + "SetPayload": { + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "type": "array" + } + }, + "required": [ + "payload", + "points" + ], + "type": "object" + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "properties": { + "optimizers_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete" + } + }, + "type": "object" + }, + "UpdateCollectionOperation": { + "description": "Operation for updating parameters of the existing collection", + "properties": { + "collection_name": { + "type": "string" + }, + "optimizers_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ], + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete" + } + }, + "required": [ + "collection_name" + ], + "type": "object" + }, + "UpdateResult": { + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + }, + "required": [ + "operation_id", + "status" + ], + "type": "object" + }, + "UpdateStatus": { + "enum": [ + "acknowledged", + "completed" + ], + "type": "string" + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "format": "int64", + "type": "integer" + }, + { + "type": "boolean" + } + ] + }, + "ValuesCount": { + "description": "Values count filter request", + "properties": { + "gt": { + "description": "point.key.length() > values_count.gt", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "lt": { + "description": "point.key.length() < values_count.lt", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "WalConfig": { + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "format": "uint", + "minimum": 0, + "type": "integer" + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "format": "uint", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "type": "object" + }, + "WalConfigDiff": { + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "format": "uint", + "minimum": 0, + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "WithPayloadInterface": { + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "items": { + "type": "string" + }, + "type": "array" + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ], + "description": "Options for specifying which payload to include or not" + } + } + }, + "externalDocs": { + "description": "Find out more about Qdrant aplications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "info": { + "contact": { + "email": "andrey@vasnetsov.com" + }, + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"payload_indexing_threshold\": 10000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "title": "Qdrant API", + "version": "v0.7.0" + }, + "openapi": "3.0.1", + "paths": { + "/collections": { + "get": { + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "List collections", + "tags": [ + "collections" + ] + }, + "post": { + "deprecated": true, + "description": "Perform update, create, remove or alias change operations on collections", + "operationId": "update_collections", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CollectionMetaOperations" + } + } + }, + "description": "Operation to perform on collections" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "type": "boolean" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Update collection", + "tags": [ + "collections" + ] + } + }, + "/collections/aliases": { + "post": { + "operationId": "update_aliases", + "parameters": [ + { + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "in": "query", + "name": "timeout", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + }, + "description": "Alias update operations" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "type": "boolean" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Update aliases of the collections", + "tags": [ + "collections" + ] + } + }, + "/collections/{collection_name}": { + "delete": { + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "description": "Name of the collection to delete", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "in": "query", + "name": "timeout", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "type": "boolean" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Delete collection", + "tags": [ + "collections" + ] + }, + "get": { + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "description": "Name of the collection to retrieve", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/CollectionInfo" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Collection info", + "tags": [ + "collections" + ] + }, + "patch": { + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "parameters": [ + { + "description": "Name of the collection to update", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "in": "query", + "name": "timeout", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + }, + "description": "New parameters" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "type": "boolean" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Update collection parameters", + "tags": [ + "collections" + ] + }, + "post": { + "deprecated": true, + "description": "Perform point update operation (vectors, payloads, indexes) in collection", + "operationId": "update_points", + "parameters": [ + { + "description": "Name of the collection to search in", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CollectionUpdateOperations" + } + } + }, + "description": "Collection update operations" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Update points", + "tags": [ + "points" + ] + }, + "put": { + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "parameters": [ + { + "description": "Name of the new collection", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "in": "query", + "name": "timeout", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + }, + "description": "Parameters of a new collection" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "type": "boolean" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Create collection", + "tags": [ + "collections" + ] + } + }, + "/collections/{collection_name}/index": { + "put": { + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "description": "Name of the collection", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + }, + "description": "Field name" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Create index for field in collection", + "tags": [ + "collections" + ] + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "description": "Name of the collection", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Name of the field where to delete the index", + "in": "path", + "name": "field_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Delete index for field in collection", + "tags": [ + "collections" + ] + } + }, + "/collections/{collection_name}/points": { + "post": { + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "parameters": [ + { + "description": "Name of the collection to retrieve from", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + }, + "description": "List of points to retrieve" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "items": { + "$ref": "#/components/schemas/Record" + }, + "type": "array" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Get points", + "tags": [ + "points" + ] + }, + "put": { + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "parameters": [ + { + "description": "Name of the collection to update from", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + }, + "description": "Operation to perform on points" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Upsert points", + "tags": [ + "points" + ] + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "description": "Delete points", + "operationId": "delete_points", + "parameters": [ + { + "description": "Name of the collection to delete from", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + }, + "description": "Operation to perform on points" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Delete points", + "tags": [ + "points" + ] + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "description": "Set payload for points", + "operationId": "set_payload", + "parameters": [ + { + "description": "Name of the collection to set from", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + }, + "description": "Set payload on points" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Set payload", + "tags": [ + "points" + ] + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "parameters": [ + { + "description": "Name of the collection to clear payload from", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + }, + "description": "clear payload on points" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Clear payload", + "tags": [ + "points" + ] + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "parameters": [ + { + "description": "Name of the collection to delete from", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "If true, wait for changes to actually happen", + "in": "query", + "name": "wait", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + }, + "description": "delete payload on points" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/UpdateResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Delete payload", + "tags": [ + "points" + ] + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "parameters": [ + { + "description": "Name of the collection to search in", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + }, + "description": "Request points based on positive and negative examples." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "items": { + "$ref": "#/components/schemas/ScoredPoint" + }, + "type": "array" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Recommend points", + "tags": [ + "points" + ] + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "parameters": [ + { + "description": "Name of the collection to retrieve from", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + }, + "description": "Pagination and filter parameters" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/ScrollResult" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Scroll points", + "tags": [ + "points" + ] + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "parameters": [ + { + "description": "Name of the collection to search in", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + }, + "description": "Search request with optional filtering" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "items": { + "$ref": "#/components/schemas/ScoredPoint" + }, + "type": "array" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Search points", + "tags": [ + "points" + ] + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "description": "Name of the collection to retrieve from", + "in": "path", + "name": "collection_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Id of the point", + "in": "path", + "name": "id", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "$ref": "#/components/schemas/Record" + }, + "status": { + "enum": [ + "ok" + ], + "type": "string" + }, + "time": { + "description": "Time spent to process this request", + "format": "float", + "type": "number" + } + }, + "type": "object" + } + } + }, + "description": "successful operation" + }, + "4XX": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "error" + } + }, + "summary": "Get point", + "tags": [ + "points" + ] + } + } + }, + "servers": [ + { + "url": "http://localhost:6333" + } + ], + "tags": [ + { + "description": "Searchable collections of points.", + "name": "collections" + }, + { + "description": "Float-point vectors with payload.", + "name": "points" + } + ] +} diff --git a/docs/redoc/v0.8.0/openapi.json b/docs/redoc/v0.8.0/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..5094aeacb4b954b38fd3d938bf223bd4de68b4e1 --- /dev/null +++ b/docs/redoc/v0.8.0/openapi.json @@ -0,0 +1,3304 @@ +{ + "paths": { + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v0.8.0" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "http://localhost:6333" + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "disk_data_size", + "optimizer_status", + "payload_schema", + "ram_data_size", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_data_size": { + "description": "Disk space, used by collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_data_size": { + "description": "RAM used by collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "distance", + "vector_size" + ], + "properties": { + "vector_size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "max_segment_size", + "memmap_threshold", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Payload field type & index information", + "type": "object", + "required": [ + "data_type" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "type": "array", + "items": { + "type": "number", + "format": "float" + }, + "nullable": true + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "top", + "vector" + ], + "properties": { + "vector": { + "description": "Look for vectors closest to this", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "top": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smalled than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchKeyword" + }, + { + "$ref": "#/components/schemas/MatchInteger" + } + ] + }, + "MatchValue": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchKeyword": { + "description": "Match by keyword (deprecated)", + "deprecated": true, + "type": "object", + "required": [ + "keyword" + ], + "properties": { + "keyword": { + "description": "Keyword value to match", + "deprecated": true, + "type": "string" + } + } + }, + "MatchInteger": { + "description": "Match filter request (deprecated)", + "deprecated": true, + "type": "object", + "required": [ + "integer" + ], + "properties": { + "integer": { + "description": "Integer value to match", + "deprecated": true, + "type": "integer", + "format": "int64" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "type": "array", + "items": { + "type": "number", + "format": "float" + }, + "nullable": true + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "negative", + "positive", + "top" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "top": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smalled than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "distance", + "vector_size" + ], + "properties": { + "vector_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1, minimum is 1.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_type": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "nullable": true + } + ] + } + } + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "description": "Vector", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload", + "points" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys", + "points" + ], + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + } + } + }, + "StateRole": { + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + } + } + } +} diff --git a/docs/redoc/v0.8.1/openapi.json b/docs/redoc/v0.8.1/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..97ccba3fd2c506989dbbe6356d59f6ac9ce43636 --- /dev/null +++ b/docs/redoc/v0.8.1/openapi.json @@ -0,0 +1,3320 @@ +{ + "paths": { + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v0.8.1" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "disk_data_size", + "optimizer_status", + "payload_schema", + "ram_data_size", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_data_size": { + "description": "Disk space, used by collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_data_size": { + "description": "RAM used by collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "distance", + "vector_size" + ], + "properties": { + "vector_size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "max_segment_size", + "memmap_threshold", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Payload field type & index information", + "type": "object", + "required": [ + "data_type" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "type": "array", + "items": { + "type": "number", + "format": "float" + }, + "nullable": true + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "top", + "vector" + ], + "properties": { + "vector": { + "description": "Look for vectors closest to this", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "top": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchKeyword" + }, + { + "$ref": "#/components/schemas/MatchInteger" + } + ] + }, + "MatchValue": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchKeyword": { + "description": "Match by keyword (deprecated)", + "deprecated": true, + "type": "object", + "required": [ + "keyword" + ], + "properties": { + "keyword": { + "description": "Keyword value to match", + "deprecated": true, + "type": "string" + } + } + }, + "MatchInteger": { + "description": "Match filter request (deprecated)", + "deprecated": true, + "type": "object", + "required": [ + "integer" + ], + "properties": { + "integer": { + "description": "Integer value to match", + "deprecated": true, + "type": "integer", + "format": "int64" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "type": "array", + "items": { + "type": "number", + "format": "float" + }, + "nullable": true + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "negative", + "positive", + "top" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "top": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "distance", + "vector_size" + ], + "properties": { + "vector_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_type": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "nullable": true + } + ] + } + } + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "description": "Vector", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload", + "points" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys", + "points" + ], + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + } + } + }, + "StateRole": { + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + } + } + } +} diff --git a/docs/redoc/v0.8.2/openapi.json b/docs/redoc/v0.8.2/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..ea973e439a4a0123f09627a7001d269e97360a63 --- /dev/null +++ b/docs/redoc/v0.8.2/openapi.json @@ -0,0 +1,3325 @@ +{ + "paths": { + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v0.8.2" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "disk_data_size", + "optimizer_status", + "payload_schema", + "ram_data_size", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_data_size": { + "description": "Disk space, used by collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_data_size": { + "description": "RAM used by collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "distance", + "vector_size" + ], + "properties": { + "vector_size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "max_segment_size", + "memmap_threshold", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Payload field type & index information", + "type": "object", + "required": [ + "data_type" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "type": "array", + "items": { + "type": "number", + "format": "float" + }, + "nullable": true + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "top", + "vector" + ], + "properties": { + "vector": { + "description": "Look for vectors closest to this", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "top": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchKeyword" + }, + { + "$ref": "#/components/schemas/MatchInteger" + } + ] + }, + "MatchValue": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchKeyword": { + "description": "Match by keyword (deprecated)", + "deprecated": true, + "type": "object", + "required": [ + "keyword" + ], + "properties": { + "keyword": { + "description": "Keyword value to match", + "deprecated": true, + "type": "string" + } + } + }, + "MatchInteger": { + "description": "Match filter request (deprecated)", + "deprecated": true, + "type": "object", + "required": [ + "integer" + ], + "properties": { + "integer": { + "description": "Integer value to match", + "deprecated": true, + "type": "integer", + "format": "int64" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "type": "array", + "items": { + "type": "number", + "format": "float" + }, + "nullable": true + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "negative", + "positive", + "top" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "top": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "distance", + "vector_size" + ], + "properties": { + "vector_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_type": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "nullable": true + } + ] + } + } + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "description": "Vector", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload", + "points" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys", + "points" + ], + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + } + } + } +} diff --git a/docs/redoc/v0.8.3/openapi.json b/docs/redoc/v0.8.3/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..0fab7a300129b23dacba8f1ec19d1862e6fb897c --- /dev/null +++ b/docs/redoc/v0.8.3/openapi.json @@ -0,0 +1,3339 @@ +{ + "paths": { + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v0.8.3" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "disk_data_size", + "optimizer_status", + "payload_schema", + "ram_data_size", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_data_size": { + "description": "Disk space, used by collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_data_size": { + "description": "RAM used by collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "distance", + "vector_size" + ], + "properties": { + "vector_size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "max_segment_size", + "memmap_threshold", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Payload field type & index information", + "type": "object", + "required": [ + "data_type" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "type": "array", + "items": { + "type": "number", + "format": "float" + }, + "nullable": true + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "description": "Look for vectors closest to this", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchKeyword" + }, + { + "$ref": "#/components/schemas/MatchInteger" + } + ] + }, + "MatchValue": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchKeyword": { + "description": "Match by keyword (deprecated)", + "deprecated": true, + "type": "object", + "required": [ + "keyword" + ], + "properties": { + "keyword": { + "description": "Keyword value to match", + "deprecated": true, + "type": "string" + } + } + }, + "MatchInteger": { + "description": "Match filter request (deprecated)", + "deprecated": true, + "type": "object", + "required": [ + "integer" + ], + "properties": { + "integer": { + "description": "Integer value to match", + "deprecated": true, + "type": "integer", + "format": "int64" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "type": "array", + "items": { + "type": "number", + "format": "float" + }, + "nullable": true + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "negative", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "distance", + "vector_size" + ], + "properties": { + "vector_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_type": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "nullable": true + } + ] + } + } + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "description": "Vector", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload", + "points" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys", + "points" + ], + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + } + } + } +} diff --git a/docs/redoc/v0.8.4/openapi.json b/docs/redoc/v0.8.4/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..e15347e4033d2f47ca0dcf1c9a621a95335c5e56 --- /dev/null +++ b/docs/redoc/v0.8.4/openapi.json @@ -0,0 +1,3692 @@ +{ + "paths": { + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "collections" + ], + "summary": "List snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections" + ], + "summary": "Create snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Download snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v0.8.4" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "disk_data_size", + "optimizer_status", + "payload_schema", + "points_count", + "ram_data_size", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_data_size": { + "description": "Disk space, used by collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_data_size": { + "description": "RAM used by collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "distance", + "vector_size" + ], + "properties": { + "vector_size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "max_segment_size", + "memmap_threshold", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Payload field type & index information", + "type": "object", + "required": [ + "data_type" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "type": "array", + "items": { + "type": "number", + "format": "float" + }, + "nullable": true + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "description": "Look for vectors closest to this", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchKeyword" + }, + { + "$ref": "#/components/schemas/MatchInteger" + } + ] + }, + "MatchValue": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchKeyword": { + "description": "Match by keyword (deprecated)", + "deprecated": true, + "type": "object", + "required": [ + "keyword" + ], + "properties": { + "keyword": { + "description": "Keyword value to match", + "deprecated": true, + "type": "string" + } + } + }, + "MatchInteger": { + "description": "Match filter request (deprecated)", + "deprecated": true, + "type": "object", + "required": [ + "integer" + ], + "properties": { + "integer": { + "description": "Integer value to match", + "deprecated": true, + "type": "integer", + "format": "int64" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "type": "array", + "items": { + "type": "number", + "format": "float" + }, + "nullable": true + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "negative", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "distance", + "vector_size" + ], + "properties": { + "vector_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_type": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "nullable": true + } + ] + } + } + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "description": "Vector", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload", + "points" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys", + "points" + ], + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "creation_time", + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time" + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster.", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + } + } + } +} diff --git a/docs/redoc/v0.8.5/openapi.json b/docs/redoc/v0.8.5/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..4831aff72b01a79953293a91d3a565e2e4fb2895 --- /dev/null +++ b/docs/redoc/v0.8.5/openapi.json @@ -0,0 +1,4701 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v0.8.5" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "disk_data_size", + "optimizer_status", + "payload_schema", + "points_count", + "ram_data_size", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_data_size": { + "description": "Disk space, used by collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_data_size": { + "description": "RAM used by collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "distance", + "vector_size" + ], + "properties": { + "vector_size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "max_segment_size", + "memmap_threshold", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Payload field type & index information", + "type": "object", + "required": [ + "data_type" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "type": "array", + "items": { + "type": "number", + "format": "float" + }, + "nullable": true + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "description": "Look for vectors closest to this", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchKeyword" + }, + { + "$ref": "#/components/schemas/MatchInteger" + } + ] + }, + "MatchValue": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchKeyword": { + "description": "Match by keyword (deprecated)", + "deprecated": true, + "type": "object", + "required": [ + "keyword" + ], + "properties": { + "keyword": { + "description": "Keyword value to match", + "deprecated": true, + "type": "string" + } + } + }, + "MatchInteger": { + "description": "Match filter request (deprecated)", + "deprecated": true, + "type": "object", + "required": [ + "integer" + ], + "properties": { + "integer": { + "description": "Integer value to match", + "deprecated": true, + "type": "integer", + "format": "int64" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "type": "array", + "items": { + "type": "number", + "format": "float" + }, + "nullable": true + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "negative", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "distance", + "vector_size" + ], + "properties": { + "vector_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_type": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "nullable": true + } + ] + } + } + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "description": "Vector", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload", + "points" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys", + "points" + ], + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "creation_time", + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time" + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "collections", + "configs", + "id", + "system", + "web" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "system": { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + "configs": { + "$ref": "#/components/schemas/ConfigsTelemetry" + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetry" + } + }, + "web": { + "$ref": "#/components/schemas/WebApiTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "debug", + "service_debug_feature", + "version", + "web_feature" + ], + "properties": { + "version": { + "type": "string" + }, + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "ConfigsTelemetry": { + "type": "object", + "required": [ + "cluster_config", + "service_config" + ], + "properties": { + "service_config": { + "$ref": "#/components/schemas/ServiceConfigTelemetry" + }, + "cluster_config": { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + } + } + }, + "ServiceConfigTelemetry": { + "type": "object", + "required": [ + "enable_cors", + "grpc_enable", + "max_request_size_mb" + ], + "properties": { + "grpc_enable": { + "type": "boolean" + }, + "max_request_size_mb": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_workers": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "enable_cors": { + "type": "boolean" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "enabled", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time", + "shards" + ], + "properties": { + "id": { + "type": "string" + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "init_time": { + "$ref": "#/components/schemas/Duration" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTelemetry" + } + } + } + }, + "Duration": { + "type": "object", + "required": [ + "nanos", + "secs" + ], + "properties": { + "secs": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "nanos": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + } + }, + "ShardTelemetry": { + "oneOf": [ + { + "type": "object", + "required": [ + "Remote" + ], + "properties": { + "Remote": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Local" + ], + "properties": { + "Local": { + "type": "object", + "required": [ + "segments" + ], + "properties": { + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Proxy" + ], + "properties": { + "Proxy": { + "type": "object" + } + }, + "additionalProperties": false + } + ] + }, + "TelemetryOperationStatistics": { + "type": "object", + "required": [ + "fail_count", + "ok_avg_time", + "ok_count" + ], + "properties": { + "ok_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ok_avg_time": { + "$ref": "#/components/schemas/Duration" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index": { + "$ref": "#/components/schemas/VectorIndexTelemetry" + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "distance", + "index", + "storage_type", + "vector_size" + ], + "properties": { + "vector_size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "storage_type": { + "$ref": "#/components/schemas/StorageType" + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "Indexes": { + "description": "Vector index configuration of the segment", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "StorageType": { + "description": "Type of vector storage", + "oneOf": [ + { + "description": "Store vectors in memory and use persistence storage only if vectors are changed", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "description": "Use memmap to store vectors, a little slower than `InMemory`, but requires little RAM", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mmap" + ] + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "description": "Store payload in memory and use persistence storage only if vectors are changed", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "description": "Store payload on disk only, read each time it is requested", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexTelemetry": { + "type": "object", + "required": [ + "large_cardinality_searches", + "negative_check_cardinality_searches", + "positive_check_cardinality_searches", + "small_cardinality_searches" + ], + "properties": { + "small_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "large_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "positive_check_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "negative_check_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + }, + "PayloadIndexTelemetry": { + "type": "object" + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + } + } + } + } +} diff --git a/docs/redoc/v0.8.6/openapi.json b/docs/redoc/v0.8.6/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..cd671ef2324647f9f7af82e209891a0db57c27ce --- /dev/null +++ b/docs/redoc/v0.8.6/openapi.json @@ -0,0 +1,4701 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v0.8.6" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "disk_data_size", + "optimizer_status", + "payload_schema", + "points_count", + "ram_data_size", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_data_size": { + "description": "Disk space, used by collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_data_size": { + "description": "RAM used by collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "distance", + "vector_size" + ], + "properties": { + "vector_size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "max_segment_size", + "memmap_threshold", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Payload field type & index information", + "type": "object", + "required": [ + "data_type" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "type": "array", + "items": { + "type": "number", + "format": "float" + }, + "nullable": true + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "description": "Look for vectors closest to this", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchKeyword" + }, + { + "$ref": "#/components/schemas/MatchInteger" + } + ] + }, + "MatchValue": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchKeyword": { + "description": "Match by keyword (deprecated)", + "deprecated": true, + "type": "object", + "required": [ + "keyword" + ], + "properties": { + "keyword": { + "description": "Keyword value to match", + "deprecated": true, + "type": "string" + } + } + }, + "MatchInteger": { + "description": "Match filter request (deprecated)", + "deprecated": true, + "type": "object", + "required": [ + "integer" + ], + "properties": { + "integer": { + "description": "Integer value to match", + "deprecated": true, + "type": "integer", + "format": "int64" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "type": "array", + "items": { + "type": "number", + "format": "float" + }, + "nullable": true + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "negative", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "distance", + "vector_size" + ], + "properties": { + "vector_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_type": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "nullable": true + } + ] + } + } + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "description": "Vector", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload", + "points" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys", + "points" + ], + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "creation_time", + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time" + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "collections", + "configs", + "id", + "system", + "web" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "system": { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + "configs": { + "$ref": "#/components/schemas/ConfigsTelemetry" + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetry" + } + }, + "web": { + "$ref": "#/components/schemas/WebApiTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "debug", + "service_debug_feature", + "version", + "web_feature" + ], + "properties": { + "version": { + "type": "string" + }, + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "ConfigsTelemetry": { + "type": "object", + "required": [ + "cluster_config", + "service_config" + ], + "properties": { + "service_config": { + "$ref": "#/components/schemas/ServiceConfigTelemetry" + }, + "cluster_config": { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + } + } + }, + "ServiceConfigTelemetry": { + "type": "object", + "required": [ + "enable_cors", + "grpc_enable", + "max_request_size_mb" + ], + "properties": { + "grpc_enable": { + "type": "boolean" + }, + "max_request_size_mb": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_workers": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "enable_cors": { + "type": "boolean" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "enabled", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time", + "shards" + ], + "properties": { + "id": { + "type": "string" + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "init_time": { + "$ref": "#/components/schemas/Duration" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTelemetry" + } + } + } + }, + "Duration": { + "type": "object", + "required": [ + "nanos", + "secs" + ], + "properties": { + "secs": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "nanos": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + } + }, + "ShardTelemetry": { + "oneOf": [ + { + "type": "object", + "required": [ + "Remote" + ], + "properties": { + "Remote": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Local" + ], + "properties": { + "Local": { + "type": "object", + "required": [ + "segments" + ], + "properties": { + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Proxy" + ], + "properties": { + "Proxy": { + "type": "object" + } + }, + "additionalProperties": false + } + ] + }, + "TelemetryOperationStatistics": { + "type": "object", + "required": [ + "fail_count", + "ok_avg_time", + "ok_count" + ], + "properties": { + "ok_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ok_avg_time": { + "$ref": "#/components/schemas/Duration" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index": { + "$ref": "#/components/schemas/VectorIndexTelemetry" + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "distance", + "index", + "storage_type", + "vector_size" + ], + "properties": { + "vector_size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "storage_type": { + "$ref": "#/components/schemas/StorageType" + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "Indexes": { + "description": "Vector index configuration of the segment", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "StorageType": { + "description": "Type of vector storage", + "oneOf": [ + { + "description": "Store vectors in memory and use persistence storage only if vectors are changed", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "description": "Use memmap to store vectors, a little slower than `InMemory`, but requires little RAM", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mmap" + ] + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "description": "Store payload in memory and use persistence storage only if vectors are changed", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "description": "Store payload on disk only, read each time it is requested", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexTelemetry": { + "type": "object", + "required": [ + "large_cardinality_searches", + "negative_check_cardinality_searches", + "positive_check_cardinality_searches", + "small_cardinality_searches" + ], + "properties": { + "small_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "large_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "positive_check_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "negative_check_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + }, + "PayloadIndexTelemetry": { + "type": "object" + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + } + } + } + } +} diff --git a/docs/redoc/v0.9.0/openapi.json b/docs/redoc/v0.9.0/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..73e19725f72adc0b8b73322549b656023df206cc --- /dev/null +++ b/docs/redoc/v0.9.0/openapi.json @@ -0,0 +1,5122 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v0.9.0" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "disk_data_size", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "ram_data_size", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_data_size": { + "description": "Disk space, used by collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_data_size": { + "description": "RAM used by collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "distance", + "vector_size" + ], + "properties": { + "vector_size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256 If not set, mmap will not be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Payload field type & index information", + "type": "object", + "required": [ + "data_type" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "type": "array", + "items": { + "type": "number", + "format": "float" + }, + "nullable": true + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "description": "Look for vectors closest to this", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchKeyword" + }, + { + "$ref": "#/components/schemas/MatchInteger" + } + ] + }, + "MatchValue": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchKeyword": { + "description": "Match by keyword (deprecated)", + "deprecated": true, + "type": "object", + "required": [ + "keyword" + ], + "properties": { + "keyword": { + "description": "Keyword value to match", + "deprecated": true, + "type": "string" + } + } + }, + "MatchInteger": { + "description": "Match filter request (deprecated)", + "deprecated": true, + "type": "object", + "required": [ + "integer" + ], + "properties": { + "integer": { + "description": "Integer value to match", + "deprecated": true, + "type": "integer", + "format": "int64" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "type": "array", + "items": { + "type": "number", + "format": "float" + }, + "nullable": true + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "negative", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "distance", + "vector_size" + ], + "properties": { + "vector_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_type": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "nullable": true + } + ] + } + } + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "description": "Vector", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload", + "points" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys", + "points" + ], + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "creation_time", + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time" + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster_status", + "collections", + "configs", + "grpc_calls_statistics", + "id", + "system", + "web" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "system": { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + "configs": { + "$ref": "#/components/schemas/ConfigsTelemetry" + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetry" + } + }, + "web": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc_calls_statistics": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "cluster_status": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "debug", + "service_debug_feature", + "version", + "web_feature" + ], + "properties": { + "version": { + "type": "string" + }, + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "ConfigsTelemetry": { + "type": "object", + "required": [ + "cluster_config", + "service_config" + ], + "properties": { + "service_config": { + "$ref": "#/components/schemas/ServiceConfigTelemetry" + }, + "cluster_config": { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + } + } + }, + "ServiceConfigTelemetry": { + "type": "object", + "required": [ + "enable_cors", + "grpc_enable", + "max_request_size_mb" + ], + "properties": { + "grpc_enable": { + "type": "boolean" + }, + "max_request_size_mb": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_workers": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "enable_cors": { + "type": "boolean" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "enabled", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time", + "shards" + ], + "properties": { + "id": { + "type": "string" + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "init_time": { + "$ref": "#/components/schemas/Duration" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTelemetry" + } + } + } + }, + "Duration": { + "type": "object", + "required": [ + "nanos", + "secs" + ], + "properties": { + "secs": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "nanos": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + } + }, + "ShardTelemetry": { + "oneOf": [ + { + "type": "object", + "required": [ + "Remote" + ], + "properties": { + "Remote": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Local" + ], + "properties": { + "Local": { + "type": "object", + "required": [ + "optimizers", + "segments" + ], + "properties": { + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Proxy" + ], + "properties": { + "Proxy": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ForwardProxy" + ], + "properties": { + "ForwardProxy": { + "type": "object" + } + }, + "additionalProperties": false + } + ] + }, + "TelemetryOperationStatistics": { + "type": "object", + "required": [ + "fail_count", + "ok_avg_time", + "ok_count" + ], + "properties": { + "ok_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ok_avg_time": { + "$ref": "#/components/schemas/Duration" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index": { + "$ref": "#/components/schemas/VectorIndexTelemetry" + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "distance", + "index", + "storage_type", + "vector_size" + ], + "properties": { + "vector_size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "storage_type": { + "$ref": "#/components/schemas/StorageType" + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "Indexes": { + "description": "Vector index configuration of the segment", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "StorageType": { + "description": "Type of vector storage", + "oneOf": [ + { + "description": "Store vectors in memory and use persistence storage only if vectors are changed", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "description": "Use memmap to store vectors, a little slower than `InMemory`, but requires little RAM", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mmap" + ] + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "description": "Store payload in memory and use persistence storage only if vectors are changed", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "description": "Store payload on disk only, read each time it is requested", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexTelemetry": { + "type": "object", + "required": [ + "large_cardinality_searches", + "negative_check_cardinality_searches", + "positive_check_cardinality_searches", + "small_cardinality_searches" + ], + "properties": { + "small_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "large_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "positive_check_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "negative_check_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "oneOf": [ + { + "type": "object", + "required": [ + "Indexing" + ], + "properties": { + "Indexing": { + "type": "object", + "required": [ + "optimizations" + ], + "properties": { + "optimizations": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Merge" + ], + "properties": { + "Merge": { + "type": "object", + "required": [ + "optimizations" + ], + "properties": { + "optimizations": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Vacuum" + ], + "properties": { + "Vacuum": { + "type": "object", + "required": [ + "optimizations" + ], + "properties": { + "optimizations": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + } + } + } +} diff --git a/docs/redoc/v0.9.1/openapi.json b/docs/redoc/v0.9.1/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..f44fc75d0fe3fe23e841183e0c87bd955d8919ea --- /dev/null +++ b/docs/redoc/v0.9.1/openapi.json @@ -0,0 +1,5122 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vector_size\": 4,\n \"distance\": \"Dot\"\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v0.9.1" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "disk_data_size", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "ram_data_size", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_data_size": { + "description": "Disk space, used by collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_data_size": { + "description": "RAM used by collection", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "distance", + "vector_size" + ], + "properties": { + "vector_size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256 If not set, mmap will not be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Payload field type & index information", + "type": "object", + "required": [ + "data_type" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "type": "array", + "items": { + "type": "number", + "format": "float" + }, + "nullable": true + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "description": "Look for vectors closest to this", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchKeyword" + }, + { + "$ref": "#/components/schemas/MatchInteger" + } + ] + }, + "MatchValue": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchKeyword": { + "description": "Match by keyword (deprecated)", + "deprecated": true, + "type": "object", + "required": [ + "keyword" + ], + "properties": { + "keyword": { + "description": "Keyword value to match", + "deprecated": true, + "type": "string" + } + } + }, + "MatchInteger": { + "description": "Match filter request (deprecated)", + "deprecated": true, + "type": "object", + "required": [ + "integer" + ], + "properties": { + "integer": { + "description": "Integer value to match", + "deprecated": true, + "type": "integer", + "format": "int64" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "type": "array", + "items": { + "type": "number", + "format": "float" + }, + "nullable": true + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "negative", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": false, + "type": "boolean" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "distance", + "vector_size" + ], + "properties": { + "vector_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_type": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "nullable": true + } + ] + } + } + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "description": "Vector", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload", + "points" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys", + "points" + ], + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "creation_time", + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time" + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster_status", + "collections", + "configs", + "grpc_calls_statistics", + "id", + "system", + "web" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "system": { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + "configs": { + "$ref": "#/components/schemas/ConfigsTelemetry" + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetry" + } + }, + "web": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc_calls_statistics": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "cluster_status": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "debug", + "service_debug_feature", + "version", + "web_feature" + ], + "properties": { + "version": { + "type": "string" + }, + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "ConfigsTelemetry": { + "type": "object", + "required": [ + "cluster_config", + "service_config" + ], + "properties": { + "service_config": { + "$ref": "#/components/schemas/ServiceConfigTelemetry" + }, + "cluster_config": { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + } + } + }, + "ServiceConfigTelemetry": { + "type": "object", + "required": [ + "enable_cors", + "grpc_enable", + "max_request_size_mb" + ], + "properties": { + "grpc_enable": { + "type": "boolean" + }, + "max_request_size_mb": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_workers": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "enable_cors": { + "type": "boolean" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "enabled", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time", + "shards" + ], + "properties": { + "id": { + "type": "string" + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "init_time": { + "$ref": "#/components/schemas/Duration" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTelemetry" + } + } + } + }, + "Duration": { + "type": "object", + "required": [ + "nanos", + "secs" + ], + "properties": { + "secs": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "nanos": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + } + }, + "ShardTelemetry": { + "oneOf": [ + { + "type": "object", + "required": [ + "Remote" + ], + "properties": { + "Remote": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Local" + ], + "properties": { + "Local": { + "type": "object", + "required": [ + "optimizers", + "segments" + ], + "properties": { + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Proxy" + ], + "properties": { + "Proxy": { + "type": "object" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "ForwardProxy" + ], + "properties": { + "ForwardProxy": { + "type": "object" + } + }, + "additionalProperties": false + } + ] + }, + "TelemetryOperationStatistics": { + "type": "object", + "required": [ + "fail_count", + "ok_avg_time", + "ok_count" + ], + "properties": { + "ok_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ok_avg_time": { + "$ref": "#/components/schemas/Duration" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index": { + "$ref": "#/components/schemas/VectorIndexTelemetry" + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "distance", + "index", + "storage_type", + "vector_size" + ], + "properties": { + "vector_size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "storage_type": { + "$ref": "#/components/schemas/StorageType" + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "Indexes": { + "description": "Vector index configuration of the segment", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "StorageType": { + "description": "Type of vector storage", + "oneOf": [ + { + "description": "Store vectors in memory and use persistence storage only if vectors are changed", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "description": "Use memmap to store vectors, a little slower than `InMemory`, but requires little RAM", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mmap" + ] + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "description": "Store payload in memory and use persistence storage only if vectors are changed", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "description": "Store payload on disk only, read each time it is requested", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexTelemetry": { + "type": "object", + "required": [ + "large_cardinality_searches", + "negative_check_cardinality_searches", + "positive_check_cardinality_searches", + "small_cardinality_searches" + ], + "properties": { + "small_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "large_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "positive_check_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + }, + "negative_check_cardinality_searches": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "oneOf": [ + { + "type": "object", + "required": [ + "Indexing" + ], + "properties": { + "Indexing": { + "type": "object", + "required": [ + "optimizations" + ], + "properties": { + "optimizations": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Merge" + ], + "properties": { + "Merge": { + "type": "object", + "required": [ + "optimizations" + ], + "properties": { + "optimizations": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "Vacuum" + ], + "properties": { + "Vacuum": { + "type": "object", + "required": [ + "optimizations" + ], + "properties": { + "optimizations": { + "$ref": "#/components/schemas/TelemetryOperationStatistics" + } + } + } + }, + "additionalProperties": false + } + ] + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + } + } + } +} diff --git a/docs/redoc/v1.0.1/openapi.json b/docs/redoc/v1.0.1/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..a0bee79d6444338fb6807e8a47e21dc48d2f491c --- /dev/null +++ b/docs/redoc/v1.0.1/openapi.json @@ -0,0 +1,6709 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + } + }, + "/locks": { + "post": { + "summary": "Set lock options", + "description": "Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options", + "operationId": "post_locks", + "tags": [ + "service" + ], + "requestBody": { + "description": "Lock options and optional error message", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + }, + "get": { + "summary": "Get lock options", + "description": "Get lock options. If write is locked, all write operations and collection creation are forbidden", + "operationId": "get_locks", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "force", + "in": "query", + "description": "If true - removes peer even if it has shards/replicas on it.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List aliases for collection", + "description": "Get list of all aliases for a collection", + "operationId": "get_collection_aliases", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections aliases", + "description": "Get list of all existing collections aliases", + "operationId": "get_collections_aliases", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection.", + "operationId": "recover_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Delete collection snapshot", + "description": "Delete snapshot for a collection", + "operationId": "delete_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots" + ], + "summary": "Delete storage snapshot", + "description": "Delete snapshot of the whole storage", + "operationId": "delete_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the full snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload values for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Overwrite payload", + "description": "Replace full payload of points with new one", + "operationId": "overwrite_payload", + "requestBody": { + "description": "Payload and points selector", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v1.0.1" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection All vectors in collection are available for querying Calculated as `points_count x vectors_per_point` Where `vectors_per_point` is a number of named vectors in schema", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in vector index (HNSW)", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points (vectors + payloads) in collection Each point could be accessed by unique id", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection. Each segment has independent vector as payload indexes", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection. `Green` - all good. `Yellow` - optimization is running, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "replication_factor": { + "description": "Number of replicas for each shard", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for hnsw graph built for payload index. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256 If not set, mmap will not be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type", + "points" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + }, + "points": { + "description": "Number of points indexed with this index", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unanmed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "exact": { + "description": "Search without approximation. If set to true, search may run long but with exact results.", + "default": false, + "type": "boolean" + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "description": "`Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.", + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "LookupLocation": { + "description": "Defines a location to use for looking up the vector. Specifies collection and vector field name.", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection used for lookup", + "type": "string" + }, + "vector": { + "description": "Optional name of the vector field within the collection. If not provided, the default vector field will be used.", + "default": null, + "type": "string", + "nullable": true + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "replication_factor": { + "description": "Number of shards replicas. Default is 1 Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "init_from": { + "description": "Specify other collection to copy data from.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/InitFrom" + }, + { + "nullable": true + } + ] + } + } + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "default": null, + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for additional payload-aware HNSW links. If not set, default M will be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "InitFrom": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "type": "string" + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Collection base params. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionParamsDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParamsDiff": { + "type": "object", + "properties": { + "replication_factor": { + "description": "Number of replicas for each shard", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Minimal number successful responses from replicas to consider operation successful", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Assigns payload to each point that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys" + ], + "properties": { + "keys": { + "description": "List of payload keys to remove from payload", + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "message_send_failures", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + }, + "message_send_failures": { + "description": "Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MessageSendErrors" + } + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "description": "Role of the peer in the consensus", + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "MessageSendErrors": { + "description": "Message send failures for a particular peer", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "latest_error": { + "type": "string", + "nullable": true + } + } + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ReplicaState": { + "description": "State of the single shard within a replica set.", + "type": "string", + "enum": [ + "Active", + "Dead", + "Partial", + "Initializing" + ] + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "sync", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sync": { + "description": "If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another", + "type": "boolean" + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster", + "collections", + "id", + "requests" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "collections": { + "$ref": "#/components/schemas/CollectionsTelemetry" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterTelemetry" + }, + "requests": { + "$ref": "#/components/schemas/RequestsTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppFeaturesTelemetry" + }, + { + "nullable": true + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "AppFeaturesTelemetry": { + "type": "object", + "required": [ + "debug", + "service_debug_feature", + "web_feature" + ], + "properties": { + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "CollectionsTelemetry": { + "type": "object", + "required": [ + "number_of_collections" + ], + "properties": { + "number_of_collections": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetryEnum" + }, + "nullable": true + } + } + }, + "CollectionTelemetryEnum": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionTelemetry" + }, + { + "$ref": "#/components/schemas/CollectionsAggregatedTelemetry" + } + ] + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time_ms", + "shards", + "transfers" + ], + "properties": { + "id": { + "type": "string" + }, + "init_time_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplicaSetTelemetry" + } + }, + "transfers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "ReplicaSetTelemetry": { + "type": "object", + "required": [ + "id", + "remote", + "replicate_states" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "local": { + "anyOf": [ + { + "$ref": "#/components/schemas/LocalShardTelemetry" + }, + { + "nullable": true + } + ] + }, + "remote": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardTelemetry" + } + }, + "replicate_states": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ReplicaState" + } + } + } + }, + "LocalShardTelemetry": { + "type": "object", + "required": [ + "optimizations", + "segments" + ], + "properties": { + "variant_name": { + "type": "string", + "nullable": true + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizations": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index_searches" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index_searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorIndexSearchesTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "index", + "storage_type", + "vector_data" + ], + "properties": { + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "storage_type": { + "$ref": "#/components/schemas/StorageType" + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Indexes": { + "description": "Vector index configuration of the segment", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "StorageType": { + "description": "Type of vector storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mmap" + ] + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexSearchesTelemetry": { + "type": "object", + "required": [ + "filtered_exact", + "filtered_large_cardinality", + "filtered_plain", + "filtered_small_cardinality", + "unfiltered_exact", + "unfiltered_hnsw", + "unfiltered_plain" + ], + "properties": { + "index_name": { + "type": "string", + "nullable": true + }, + "unfiltered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_hnsw": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_small_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_large_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "OperationDurationStatistics": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "avg_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "min_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "max_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "field_name": { + "type": "string", + "nullable": true + }, + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "type": "object", + "required": [ + "optimizations", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "optimizations": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "RemoteShardTelemetry": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "searches": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "CollectionsAggregatedTelemetry": { + "type": "object", + "required": [ + "optimizers_status", + "params", + "vectors" + ], + "properties": { + "vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "optimizers_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + } + } + }, + "ClusterTelemetry": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterStatusTelemetry" + }, + { + "nullable": true + } + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatusTelemetry": { + "type": "object", + "required": [ + "commit", + "consensus_thread_status", + "is_voter", + "number_of_peers", + "pending_operations", + "term" + ], + "properties": { + "number_of_peers": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "term": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "role": { + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "type": "boolean" + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "RequestsTelemetry": { + "type": "object", + "required": [ + "grpc", + "rest" + ], + "properties": { + "rest": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc": { + "$ref": "#/components/schemas/GrpcTelemetry" + } + } + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + } + }, + "GrpcTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/ReplicateShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + }, + { + "$ref": "#/components/schemas/DropReplicaOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ReplicateShardOperation": { + "type": "object", + "required": [ + "replicate_shard" + ], + "properties": { + "replicate_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "DropReplicaOperation": { + "type": "object", + "required": [ + "drop_replica" + ], + "properties": { + "drop_replica": { + "$ref": "#/components/schemas/Replica" + } + } + }, + "Replica": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "LocksOption": { + "type": "object", + "required": [ + "write" + ], + "properties": { + "error_message": { + "type": "string", + "nullable": true + }, + "write": { + "type": "boolean" + } + } + }, + "SnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "description": "Examples: - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot` - Local path `file:///qdrant/snapshots/test_collection-2022-08-04-10-49-10.snapshot`", + "type": "string", + "format": "uri" + }, + "priority": { + "$ref": "#/components/schemas/SnapshotPriority" + } + } + }, + "SnapshotPriority": { + "description": "Defines source of truth for snapshot recovery `Snapshot` means - prefer snapshot data over the current state `Replica` means - prefer existing data over the snapshot", + "type": "string", + "enum": [ + "snapshot", + "replica" + ] + }, + "CollectionsAliasesResponse": { + "type": "object", + "required": [ + "aliases" + ], + "properties": { + "aliases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasDescription" + } + } + } + }, + "AliasDescription": { + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "alias_name": { + "type": "string" + }, + "collection_name": { + "type": "string" + } + } + }, + "WriteOrdering": { + "description": "Defines write ordering guarantees for collection operations\n\n* `weak` - write operations may be reordered, works faster, default\n\n* `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change\n\n* `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down", + "type": "string", + "enum": [ + "weak", + "medium", + "strong" + ] + }, + "ReadConsistency": { + "description": "Read consistency parameter\n\nDefines how many replicas should be queried to get the result\n\n* `N` - send N random request and return points, which present on all of them\n\n* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of them\n\n* `all` - send requests to all nodes and return points which present on all of them\n\nDefault value is `Factor(1)`", + "anyOf": [ + { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + { + "$ref": "#/components/schemas/ReadConsistencyType" + } + ] + }, + "ReadConsistencyType": { + "description": "* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of nodes\n\n* `all` - send requests to all nodes and return points which present on all nodes", + "type": "string", + "enum": [ + "majority", + "quorum", + "all" + ] + } + } + } +} diff --git a/docs/redoc/v1.0.2/openapi.json b/docs/redoc/v1.0.2/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..ac672f8f8c1c780e81ec5366ea142700e51172df --- /dev/null +++ b/docs/redoc/v1.0.2/openapi.json @@ -0,0 +1,6709 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + } + }, + "/locks": { + "post": { + "summary": "Set lock options", + "description": "Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options", + "operationId": "post_locks", + "tags": [ + "service" + ], + "requestBody": { + "description": "Lock options and optional error message", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + }, + "get": { + "summary": "Get lock options", + "description": "Get lock options. If write is locked, all write operations and collection creation are forbidden", + "operationId": "get_locks", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "force", + "in": "query", + "description": "If true - removes peer even if it has shards/replicas on it.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List aliases for collection", + "description": "Get list of all aliases for a collection", + "operationId": "get_collection_aliases", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections aliases", + "description": "Get list of all existing collections aliases", + "operationId": "get_collections_aliases", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection.", + "operationId": "recover_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Delete collection snapshot", + "description": "Delete snapshot for a collection", + "operationId": "delete_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots" + ], + "summary": "Delete storage snapshot", + "description": "Delete snapshot of the whole storage", + "operationId": "delete_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the full snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload values for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Overwrite payload", + "description": "Replace full payload of points with new one", + "operationId": "overwrite_payload", + "requestBody": { + "description": "Payload and points selector", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v1.0.2" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection All vectors in collection are available for querying Calculated as `points_count x vectors_per_point` Where `vectors_per_point` is a number of named vectors in schema", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in vector index (HNSW)", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points (vectors + payloads) in collection Each point could be accessed by unique id", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection. Each segment has independent vector as payload indexes", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection. `Green` - all good. `Yellow` - optimization is running, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "replication_factor": { + "description": "Number of replicas for each shard", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for hnsw graph built for payload index. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256 If not set, mmap will not be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type", + "points" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + }, + "points": { + "description": "Number of points indexed with this index", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unanmed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "exact": { + "description": "Search without approximation. If set to true, search may run long but with exact results.", + "default": false, + "type": "boolean" + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "description": "`Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.", + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "LookupLocation": { + "description": "Defines a location to use for looking up the vector. Specifies collection and vector field name.", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection used for lookup", + "type": "string" + }, + "vector": { + "description": "Optional name of the vector field within the collection. If not provided, the default vector field will be used.", + "default": null, + "type": "string", + "nullable": true + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "replication_factor": { + "description": "Number of shards replicas. Default is 1 Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "init_from": { + "description": "Specify other collection to copy data from.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/InitFrom" + }, + { + "nullable": true + } + ] + } + } + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "default": null, + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for additional payload-aware HNSW links. If not set, default M will be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "InitFrom": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "type": "string" + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Collection base params. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionParamsDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParamsDiff": { + "type": "object", + "properties": { + "replication_factor": { + "description": "Number of replicas for each shard", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Minimal number successful responses from replicas to consider operation successful", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Assigns payload to each point that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys" + ], + "properties": { + "keys": { + "description": "List of payload keys to remove from payload", + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "message_send_failures", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + }, + "message_send_failures": { + "description": "Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MessageSendErrors" + } + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "description": "Role of the peer in the consensus", + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "MessageSendErrors": { + "description": "Message send failures for a particular peer", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "latest_error": { + "type": "string", + "nullable": true + } + } + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ReplicaState": { + "description": "State of the single shard within a replica set.", + "type": "string", + "enum": [ + "Active", + "Dead", + "Partial", + "Initializing" + ] + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "sync", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sync": { + "description": "If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another", + "type": "boolean" + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster", + "collections", + "id", + "requests" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "collections": { + "$ref": "#/components/schemas/CollectionsTelemetry" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterTelemetry" + }, + "requests": { + "$ref": "#/components/schemas/RequestsTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppFeaturesTelemetry" + }, + { + "nullable": true + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "AppFeaturesTelemetry": { + "type": "object", + "required": [ + "debug", + "service_debug_feature", + "web_feature" + ], + "properties": { + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "CollectionsTelemetry": { + "type": "object", + "required": [ + "number_of_collections" + ], + "properties": { + "number_of_collections": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetryEnum" + }, + "nullable": true + } + } + }, + "CollectionTelemetryEnum": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionTelemetry" + }, + { + "$ref": "#/components/schemas/CollectionsAggregatedTelemetry" + } + ] + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time_ms", + "shards", + "transfers" + ], + "properties": { + "id": { + "type": "string" + }, + "init_time_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplicaSetTelemetry" + } + }, + "transfers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "ReplicaSetTelemetry": { + "type": "object", + "required": [ + "id", + "remote", + "replicate_states" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "local": { + "anyOf": [ + { + "$ref": "#/components/schemas/LocalShardTelemetry" + }, + { + "nullable": true + } + ] + }, + "remote": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardTelemetry" + } + }, + "replicate_states": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ReplicaState" + } + } + } + }, + "LocalShardTelemetry": { + "type": "object", + "required": [ + "optimizations", + "segments" + ], + "properties": { + "variant_name": { + "type": "string", + "nullable": true + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizations": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index_searches" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index_searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorIndexSearchesTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "index", + "storage_type", + "vector_data" + ], + "properties": { + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "storage_type": { + "$ref": "#/components/schemas/StorageType" + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Indexes": { + "description": "Vector index configuration of the segment", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "StorageType": { + "description": "Type of vector storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mmap" + ] + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexSearchesTelemetry": { + "type": "object", + "required": [ + "filtered_exact", + "filtered_large_cardinality", + "filtered_plain", + "filtered_small_cardinality", + "unfiltered_exact", + "unfiltered_hnsw", + "unfiltered_plain" + ], + "properties": { + "index_name": { + "type": "string", + "nullable": true + }, + "unfiltered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_hnsw": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_small_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_large_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "OperationDurationStatistics": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "avg_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "min_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "max_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "field_name": { + "type": "string", + "nullable": true + }, + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "type": "object", + "required": [ + "optimizations", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "optimizations": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "RemoteShardTelemetry": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "searches": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "CollectionsAggregatedTelemetry": { + "type": "object", + "required": [ + "optimizers_status", + "params", + "vectors" + ], + "properties": { + "vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "optimizers_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + } + } + }, + "ClusterTelemetry": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterStatusTelemetry" + }, + { + "nullable": true + } + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatusTelemetry": { + "type": "object", + "required": [ + "commit", + "consensus_thread_status", + "is_voter", + "number_of_peers", + "pending_operations", + "term" + ], + "properties": { + "number_of_peers": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "term": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "role": { + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "type": "boolean" + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "RequestsTelemetry": { + "type": "object", + "required": [ + "grpc", + "rest" + ], + "properties": { + "rest": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc": { + "$ref": "#/components/schemas/GrpcTelemetry" + } + } + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + } + }, + "GrpcTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/ReplicateShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + }, + { + "$ref": "#/components/schemas/DropReplicaOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ReplicateShardOperation": { + "type": "object", + "required": [ + "replicate_shard" + ], + "properties": { + "replicate_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "DropReplicaOperation": { + "type": "object", + "required": [ + "drop_replica" + ], + "properties": { + "drop_replica": { + "$ref": "#/components/schemas/Replica" + } + } + }, + "Replica": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "LocksOption": { + "type": "object", + "required": [ + "write" + ], + "properties": { + "error_message": { + "type": "string", + "nullable": true + }, + "write": { + "type": "boolean" + } + } + }, + "SnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "description": "Examples: - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot` - Local path `file:///qdrant/snapshots/test_collection-2022-08-04-10-49-10.snapshot`", + "type": "string", + "format": "uri" + }, + "priority": { + "$ref": "#/components/schemas/SnapshotPriority" + } + } + }, + "SnapshotPriority": { + "description": "Defines source of truth for snapshot recovery `Snapshot` means - prefer snapshot data over the current state `Replica` means - prefer existing data over the snapshot", + "type": "string", + "enum": [ + "snapshot", + "replica" + ] + }, + "CollectionsAliasesResponse": { + "type": "object", + "required": [ + "aliases" + ], + "properties": { + "aliases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasDescription" + } + } + } + }, + "AliasDescription": { + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "alias_name": { + "type": "string" + }, + "collection_name": { + "type": "string" + } + } + }, + "WriteOrdering": { + "description": "Defines write ordering guarantees for collection operations\n\n* `weak` - write operations may be reordered, works faster, default\n\n* `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change\n\n* `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down", + "type": "string", + "enum": [ + "weak", + "medium", + "strong" + ] + }, + "ReadConsistency": { + "description": "Read consistency parameter\n\nDefines how many replicas should be queried to get the result\n\n* `N` - send N random request and return points, which present on all of them\n\n* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of them\n\n* `all` - send requests to all nodes and return points which present on all of them\n\nDefault value is `Factor(1)`", + "anyOf": [ + { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + { + "$ref": "#/components/schemas/ReadConsistencyType" + } + ] + }, + "ReadConsistencyType": { + "description": "* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of nodes\n\n* `all` - send requests to all nodes and return points which present on all nodes", + "type": "string", + "enum": [ + "majority", + "quorum", + "all" + ] + } + } + } +} diff --git a/docs/redoc/v1.0.3/openapi.json b/docs/redoc/v1.0.3/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..87b3dc17f44e4f46718429fdefcb3c20a0578151 --- /dev/null +++ b/docs/redoc/v1.0.3/openapi.json @@ -0,0 +1,6709 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + } + }, + "/locks": { + "post": { + "summary": "Set lock options", + "description": "Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options", + "operationId": "post_locks", + "tags": [ + "service" + ], + "requestBody": { + "description": "Lock options and optional error message", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + }, + "get": { + "summary": "Get lock options", + "description": "Get lock options. If write is locked, all write operations and collection creation are forbidden", + "operationId": "get_locks", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "force", + "in": "query", + "description": "If true - removes peer even if it has shards/replicas on it.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List aliases for collection", + "description": "Get list of all aliases for a collection", + "operationId": "get_collection_aliases", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections aliases", + "description": "Get list of all existing collections aliases", + "operationId": "get_collections_aliases", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection.", + "operationId": "recover_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Delete collection snapshot", + "description": "Delete snapshot for a collection", + "operationId": "delete_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots" + ], + "summary": "Delete storage snapshot", + "description": "Delete snapshot of the whole storage", + "operationId": "delete_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the full snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload values for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Overwrite payload", + "description": "Replace full payload of points with new one", + "operationId": "overwrite_payload", + "requestBody": { + "description": "Payload and points selector", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v1.0.3" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection All vectors in collection are available for querying Calculated as `points_count x vectors_per_point` Where `vectors_per_point` is a number of named vectors in schema", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in vector index (HNSW)", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points (vectors + payloads) in collection Each point could be accessed by unique id", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection. Each segment has independent vector as payload indexes", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection. `Green` - all good. `Yellow` - optimization is running, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "replication_factor": { + "description": "Number of replicas for each shard", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for hnsw graph built for payload index. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256 If not set, mmap will not be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type", + "points" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + }, + "points": { + "description": "Number of points indexed with this index", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unanmed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "exact": { + "description": "Search without approximation. If set to true, search may run long but with exact results.", + "default": false, + "type": "boolean" + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "description": "`Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.", + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "LookupLocation": { + "description": "Defines a location to use for looking up the vector. Specifies collection and vector field name.", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection used for lookup", + "type": "string" + }, + "vector": { + "description": "Optional name of the vector field within the collection. If not provided, the default vector field will be used.", + "default": null, + "type": "string", + "nullable": true + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "replication_factor": { + "description": "Number of shards replicas. Default is 1 Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "init_from": { + "description": "Specify other collection to copy data from.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/InitFrom" + }, + { + "nullable": true + } + ] + } + } + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "default": null, + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for additional payload-aware HNSW links. If not set, default M will be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "InitFrom": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "type": "string" + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Collection base params. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionParamsDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParamsDiff": { + "type": "object", + "properties": { + "replication_factor": { + "description": "Number of replicas for each shard", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Minimal number successful responses from replicas to consider operation successful", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Assigns payload to each point that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys" + ], + "properties": { + "keys": { + "description": "List of payload keys to remove from payload", + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "message_send_failures", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + }, + "message_send_failures": { + "description": "Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MessageSendErrors" + } + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "description": "Role of the peer in the consensus", + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "MessageSendErrors": { + "description": "Message send failures for a particular peer", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "latest_error": { + "type": "string", + "nullable": true + } + } + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ReplicaState": { + "description": "State of the single shard within a replica set.", + "type": "string", + "enum": [ + "Active", + "Dead", + "Partial", + "Initializing" + ] + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "sync", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sync": { + "description": "If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another", + "type": "boolean" + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster", + "collections", + "id", + "requests" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "collections": { + "$ref": "#/components/schemas/CollectionsTelemetry" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterTelemetry" + }, + "requests": { + "$ref": "#/components/schemas/RequestsTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "type": "string" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppFeaturesTelemetry" + }, + { + "nullable": true + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "AppFeaturesTelemetry": { + "type": "object", + "required": [ + "debug", + "service_debug_feature", + "web_feature" + ], + "properties": { + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "CollectionsTelemetry": { + "type": "object", + "required": [ + "number_of_collections" + ], + "properties": { + "number_of_collections": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetryEnum" + }, + "nullable": true + } + } + }, + "CollectionTelemetryEnum": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionTelemetry" + }, + { + "$ref": "#/components/schemas/CollectionsAggregatedTelemetry" + } + ] + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time_ms", + "shards", + "transfers" + ], + "properties": { + "id": { + "type": "string" + }, + "init_time_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplicaSetTelemetry" + } + }, + "transfers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "ReplicaSetTelemetry": { + "type": "object", + "required": [ + "id", + "remote", + "replicate_states" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "local": { + "anyOf": [ + { + "$ref": "#/components/schemas/LocalShardTelemetry" + }, + { + "nullable": true + } + ] + }, + "remote": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardTelemetry" + } + }, + "replicate_states": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ReplicaState" + } + } + } + }, + "LocalShardTelemetry": { + "type": "object", + "required": [ + "optimizations", + "segments" + ], + "properties": { + "variant_name": { + "type": "string", + "nullable": true + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizations": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index_searches" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index_searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorIndexSearchesTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "index", + "storage_type", + "vector_data" + ], + "properties": { + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "storage_type": { + "$ref": "#/components/schemas/StorageType" + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Indexes": { + "description": "Vector index configuration of the segment", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "StorageType": { + "description": "Type of vector storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mmap" + ] + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexSearchesTelemetry": { + "type": "object", + "required": [ + "filtered_exact", + "filtered_large_cardinality", + "filtered_plain", + "filtered_small_cardinality", + "unfiltered_exact", + "unfiltered_hnsw", + "unfiltered_plain" + ], + "properties": { + "index_name": { + "type": "string", + "nullable": true + }, + "unfiltered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_hnsw": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_small_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_large_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "OperationDurationStatistics": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "avg_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "min_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "max_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "field_name": { + "type": "string", + "nullable": true + }, + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "type": "object", + "required": [ + "optimizations", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "optimizations": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "RemoteShardTelemetry": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "searches": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "CollectionsAggregatedTelemetry": { + "type": "object", + "required": [ + "optimizers_status", + "params", + "vectors" + ], + "properties": { + "vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "optimizers_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + } + } + }, + "ClusterTelemetry": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterStatusTelemetry" + }, + { + "nullable": true + } + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatusTelemetry": { + "type": "object", + "required": [ + "commit", + "consensus_thread_status", + "is_voter", + "number_of_peers", + "pending_operations", + "term" + ], + "properties": { + "number_of_peers": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "term": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "role": { + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "type": "boolean" + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "RequestsTelemetry": { + "type": "object", + "required": [ + "grpc", + "rest" + ], + "properties": { + "rest": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc": { + "$ref": "#/components/schemas/GrpcTelemetry" + } + } + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + } + }, + "GrpcTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/ReplicateShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + }, + { + "$ref": "#/components/schemas/DropReplicaOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ReplicateShardOperation": { + "type": "object", + "required": [ + "replicate_shard" + ], + "properties": { + "replicate_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "DropReplicaOperation": { + "type": "object", + "required": [ + "drop_replica" + ], + "properties": { + "drop_replica": { + "$ref": "#/components/schemas/Replica" + } + } + }, + "Replica": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "LocksOption": { + "type": "object", + "required": [ + "write" + ], + "properties": { + "error_message": { + "type": "string", + "nullable": true + }, + "write": { + "type": "boolean" + } + } + }, + "SnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "description": "Examples: - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot` - Local path `file:///qdrant/snapshots/test_collection-2022-08-04-10-49-10.snapshot`", + "type": "string", + "format": "uri" + }, + "priority": { + "$ref": "#/components/schemas/SnapshotPriority" + } + } + }, + "SnapshotPriority": { + "description": "Defines source of truth for snapshot recovery `Snapshot` means - prefer snapshot data over the current state `Replica` means - prefer existing data over the snapshot", + "type": "string", + "enum": [ + "snapshot", + "replica" + ] + }, + "CollectionsAliasesResponse": { + "type": "object", + "required": [ + "aliases" + ], + "properties": { + "aliases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasDescription" + } + } + } + }, + "AliasDescription": { + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "alias_name": { + "type": "string" + }, + "collection_name": { + "type": "string" + } + } + }, + "WriteOrdering": { + "description": "Defines write ordering guarantees for collection operations\n\n* `weak` - write operations may be reordered, works faster, default\n\n* `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change\n\n* `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down", + "type": "string", + "enum": [ + "weak", + "medium", + "strong" + ] + }, + "ReadConsistency": { + "description": "Read consistency parameter\n\nDefines how many replicas should be queried to get the result\n\n* `N` - send N random request and return points, which present on all of them\n\n* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of them\n\n* `all` - send requests to all nodes and return points which present on all of them\n\nDefault value is `Factor(1)`", + "anyOf": [ + { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + { + "$ref": "#/components/schemas/ReadConsistencyType" + } + ] + }, + "ReadConsistencyType": { + "description": "* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of nodes\n\n* `all` - send requests to all nodes and return points which present on all nodes", + "type": "string", + "enum": [ + "majority", + "quorum", + "all" + ] + } + } + } +} diff --git a/docs/redoc/v1.1.0/openapi.json b/docs/redoc/v1.1.0/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..1643c3a1d078d8b93962913d41cd4e9a8d9747cc --- /dev/null +++ b/docs/redoc/v1.1.0/openapi.json @@ -0,0 +1,6967 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + } + }, + "/metrics": { + "get": { + "summary": "Collect Prometheus metrics data", + "description": "Collect metrics data including app info, collections info, cluster info and statistics", + "operationId": "metrics", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Metrics data in Prometheus format", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "# HELP app_info information about qdrant server\n# TYPE app_info counter\napp_info{name=\"qdrant\",version=\"0.11.1\"} 1\n# HELP cluster_enabled is cluster support enabled\n# TYPE cluster_enabled gauge\ncluster_enabled 0\n# HELP collections_total number of collections\n# TYPE collections_total gauge\ncollections_total 1\n" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/locks": { + "post": { + "summary": "Set lock options", + "description": "Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options", + "operationId": "post_locks", + "tags": [ + "service" + ], + "requestBody": { + "description": "Lock options and optional error message", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + }, + "get": { + "summary": "Get lock options", + "description": "Get lock options. If write is locked, all write operations and collection creation are forbidden", + "operationId": "get_locks", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/recover": { + "post": { + "tags": [ + "cluster" + ], + "summary": "Tries to recover current peer Raft state.", + "operationId": "recover_current_peer", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "force", + "in": "query", + "description": "If true - removes peer even if it has shards/replicas on it.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List aliases for collection", + "description": "Get list of all aliases for a collection", + "operationId": "get_collection_aliases", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections aliases", + "description": "Get list of all existing collections aliases", + "operationId": "get_collections_aliases", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Delete collection snapshot", + "description": "Delete snapshot for a collection", + "operationId": "delete_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots" + ], + "summary": "Delete storage snapshot", + "description": "Delete snapshot of the whole storage", + "operationId": "delete_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the full snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload values for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Overwrite payload", + "description": "Replace full payload of points with new one", + "operationId": "overwrite_payload", + "requestBody": { + "description": "Payload and points selector", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v1.1.0" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection All vectors in collection are available for querying Calculated as `points_count x vectors_per_point` Where `vectors_per_point` is a number of named vectors in schema", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in vector index (HNSW)", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points (vectors + payloads) in collection Each point could be accessed by unique id", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection. Each segment has independent vector as payload indexes", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection. `Green` - all good. `Yellow` - optimization is running, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + }, + "quantization_config": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "replication_factor": { + "description": "Number of replicas for each shard", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for hnsw graph built for payload index. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double" + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256 If not set, mmap will not be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "QuantizationConfig": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScalarQuantization" + } + ] + }, + "ScalarQuantization": { + "type": "object", + "required": [ + "scalar" + ], + "properties": { + "scalar": { + "$ref": "#/components/schemas/ScalarQuantizationConfig" + } + } + }, + "ScalarQuantizationConfig": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/ScalarType" + }, + "quantile": { + "description": "Quantile for quantization. Expected value range in (0, 1.0]. If not set - use the whole range of values", + "type": "number", + "format": "float", + "nullable": true + }, + "always_ram": { + "description": "If true - quantized vectors always will be stored in RAM, ignoring the config of main storage", + "type": "boolean", + "nullable": true + } + } + }, + "ScalarType": { + "type": "string", + "enum": [ + "int8" + ] + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type", + "points" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + }, + "points": { + "description": "Number of points indexed with this index", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unanmed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + }, + { + "$ref": "#/components/schemas/MatchAny" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "MatchAny": { + "description": "Exact match on any of the given values", + "type": "object", + "required": [ + "any" + ], + "properties": { + "any": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "AnyVariants": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + ] + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "exact": { + "description": "Search without approximation. If set to true, search may run long but with exact results.", + "default": false, + "type": "boolean" + }, + "quantization": { + "description": "Quantization params", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationSearchParams" + }, + { + "nullable": true + } + ] + } + } + }, + "QuantizationSearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "ignore": { + "description": "If true, quantized vectors are ignored. Default is false.", + "default": false, + "type": "boolean" + }, + "rescore": { + "description": "If true, use original vectors to re-score top-k results. Might require more time in case if original vectors are stored on disk. Default is false.", + "default": false, + "type": "boolean" + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "description": "`Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.", + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "LookupLocation": { + "description": "Defines a location to use for looking up the vector. Specifies collection and vector field name.", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection used for lookup", + "type": "string" + }, + "vector": { + "description": "Optional name of the vector field within the collection. If not provided, the default vector field will be used.", + "default": null, + "type": "string", + "nullable": true + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "replication_factor": { + "description": "Number of shards replicas. Default is 1 Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "init_from": { + "description": "Specify other collection to copy data from.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/InitFrom" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Quantization parameters. If none - quantization is disabled.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "default": null, + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for additional payload-aware HNSW links. If not set, default M will be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "InitFrom": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "type": "string" + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Collection base params. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionParamsDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParamsDiff": { + "type": "object", + "properties": { + "replication_factor": { + "description": "Number of replicas for each shard", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Minimal number successful responses from replicas to consider operation successful", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Assigns payload to each point that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys" + ], + "properties": { + "keys": { + "description": "List of payload keys to remove from payload", + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "message_send_failures", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + }, + "message_send_failures": { + "description": "Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MessageSendErrors" + } + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "description": "Role of the peer in the consensus", + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "MessageSendErrors": { + "description": "Message send failures for a particular peer", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "latest_error": { + "type": "string", + "nullable": true + } + } + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ReplicaState": { + "description": "State of the single shard within a replica set.", + "type": "string", + "enum": [ + "Active", + "Dead", + "Partial", + "Initializing", + "Listener" + ] + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "sync", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sync": { + "description": "If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another", + "type": "boolean" + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster", + "collections", + "id", + "requests" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "collections": { + "$ref": "#/components/schemas/CollectionsTelemetry" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterTelemetry" + }, + "requests": { + "$ref": "#/components/schemas/RequestsTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "name", + "version" + ], + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppFeaturesTelemetry" + }, + { + "nullable": true + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "AppFeaturesTelemetry": { + "type": "object", + "required": [ + "debug", + "service_debug_feature", + "web_feature" + ], + "properties": { + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "CollectionsTelemetry": { + "type": "object", + "required": [ + "number_of_collections" + ], + "properties": { + "number_of_collections": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetryEnum" + }, + "nullable": true + } + } + }, + "CollectionTelemetryEnum": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionTelemetry" + }, + { + "$ref": "#/components/schemas/CollectionsAggregatedTelemetry" + } + ] + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time_ms", + "shards", + "transfers" + ], + "properties": { + "id": { + "type": "string" + }, + "init_time_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplicaSetTelemetry" + } + }, + "transfers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "ReplicaSetTelemetry": { + "type": "object", + "required": [ + "id", + "remote", + "replicate_states" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "local": { + "anyOf": [ + { + "$ref": "#/components/schemas/LocalShardTelemetry" + }, + { + "nullable": true + } + ] + }, + "remote": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardTelemetry" + } + }, + "replicate_states": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ReplicaState" + } + } + } + }, + "LocalShardTelemetry": { + "type": "object", + "required": [ + "optimizations", + "segments" + ], + "properties": { + "variant_name": { + "type": "string", + "nullable": true + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizations": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index_searches" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index_searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorIndexSearchesTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "index", + "storage_type", + "vector_data" + ], + "properties": { + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "storage_type": { + "$ref": "#/components/schemas/StorageType" + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + }, + "quantization_config": { + "description": "Quantization parameters. If none - quantization is disabled.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + } + } + }, + "Indexes": { + "description": "Vector index configuration of the segment", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "StorageType": { + "description": "Type of vector storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mmap" + ] + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexSearchesTelemetry": { + "type": "object", + "required": [ + "filtered_exact", + "filtered_large_cardinality", + "filtered_plain", + "filtered_small_cardinality", + "unfiltered_exact", + "unfiltered_hnsw", + "unfiltered_plain" + ], + "properties": { + "index_name": { + "type": "string", + "nullable": true + }, + "unfiltered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_hnsw": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_small_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_large_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "OperationDurationStatistics": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "avg_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "min_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "max_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "field_name": { + "type": "string", + "nullable": true + }, + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "type": "object", + "required": [ + "optimizations", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "optimizations": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "RemoteShardTelemetry": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "searches": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "CollectionsAggregatedTelemetry": { + "type": "object", + "required": [ + "optimizers_status", + "params", + "vectors" + ], + "properties": { + "vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "optimizers_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + } + } + }, + "ClusterTelemetry": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterStatusTelemetry" + }, + { + "nullable": true + } + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatusTelemetry": { + "type": "object", + "required": [ + "commit", + "consensus_thread_status", + "is_voter", + "number_of_peers", + "pending_operations", + "term" + ], + "properties": { + "number_of_peers": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "term": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "role": { + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "type": "boolean" + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "RequestsTelemetry": { + "type": "object", + "required": [ + "grpc", + "rest" + ], + "properties": { + "rest": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc": { + "$ref": "#/components/schemas/GrpcTelemetry" + } + } + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + } + }, + "GrpcTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/ReplicateShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + }, + { + "$ref": "#/components/schemas/DropReplicaOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ReplicateShardOperation": { + "type": "object", + "required": [ + "replicate_shard" + ], + "properties": { + "replicate_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "DropReplicaOperation": { + "type": "object", + "required": [ + "drop_replica" + ], + "properties": { + "drop_replica": { + "$ref": "#/components/schemas/Replica" + } + } + }, + "Replica": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "LocksOption": { + "type": "object", + "required": [ + "write" + ], + "properties": { + "error_message": { + "type": "string", + "nullable": true + }, + "write": { + "type": "boolean" + } + } + }, + "SnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "description": "Examples: - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot` - Local path `file:///qdrant/snapshots/test_collection-2022-08-04-10-49-10.snapshot`", + "type": "string", + "format": "uri" + }, + "priority": { + "description": "Defines which data should be used as a source of truth if there are other replicas in the cluster. If set to `Snapshot`, the snapshot will be used as a source of truth, and the current state will be overwritten. If set to `Replica`, the current state will be used as a source of truth, and after recovery if will be synchronized with the snapshot.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/SnapshotPriority" + }, + { + "nullable": true + } + ] + } + } + }, + "SnapshotPriority": { + "description": "Defines source of truth for snapshot recovery `Snapshot` means - prefer snapshot data over the current state `Replica` means - prefer existing data over the snapshot", + "type": "string", + "enum": [ + "snapshot", + "replica" + ] + }, + "CollectionsAliasesResponse": { + "type": "object", + "required": [ + "aliases" + ], + "properties": { + "aliases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasDescription" + } + } + } + }, + "AliasDescription": { + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "alias_name": { + "type": "string" + }, + "collection_name": { + "type": "string" + } + } + }, + "WriteOrdering": { + "description": "Defines write ordering guarantees for collection operations\n\n* `weak` - write operations may be reordered, works faster, default\n\n* `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change\n\n* `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down", + "type": "string", + "enum": [ + "weak", + "medium", + "strong" + ] + }, + "ReadConsistency": { + "description": "Read consistency parameter\n\nDefines how many replicas should be queried to get the result\n\n* `N` - send N random request and return points, which present on all of them\n\n* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of them\n\n* `all` - send requests to all nodes and return points which present on all of them\n\nDefault value is `Factor(1)`", + "anyOf": [ + { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + { + "$ref": "#/components/schemas/ReadConsistencyType" + } + ] + }, + "ReadConsistencyType": { + "description": "* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of nodes\n\n* `all` - send requests to all nodes and return points which present on all nodes", + "type": "string", + "enum": [ + "majority", + "quorum", + "all" + ] + } + } + } +} diff --git a/docs/redoc/v1.1.1/openapi.json b/docs/redoc/v1.1.1/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..e9b20d259dd96f602fab4dc6ea3f33d3207cdcb7 --- /dev/null +++ b/docs/redoc/v1.1.1/openapi.json @@ -0,0 +1,7318 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + }, + "/metrics": { + "get": { + "summary": "Collect Prometheus metrics data", + "description": "Collect metrics data including app info, collections info, cluster info and statistics", + "operationId": "metrics", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Metrics data in Prometheus format", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "# HELP app_info information about qdrant server\n# TYPE app_info counter\napp_info{name=\"qdrant\",version=\"0.11.1\"} 1\n# HELP cluster_enabled is cluster support enabled\n# TYPE cluster_enabled gauge\ncluster_enabled 0\n# HELP collections_total number of collections\n# TYPE collections_total gauge\ncollections_total 1\n" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/locks": { + "post": { + "summary": "Set lock options", + "description": "Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options", + "operationId": "post_locks", + "tags": [ + "service" + ], + "requestBody": { + "description": "Lock options and optional error message", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + }, + "get": { + "summary": "Get lock options", + "description": "Get lock options. If write is locked, all write operations and collection creation are forbidden", + "operationId": "get_locks", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/recover": { + "post": { + "tags": [ + "cluster" + ], + "summary": "Tries to recover current peer Raft state.", + "operationId": "recover_current_peer", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "force", + "in": "query", + "description": "If true - removes peer even if it has shards/replicas on it.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List aliases for collection", + "description": "Get list of all aliases for a collection", + "operationId": "get_collection_aliases", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections aliases", + "description": "Get list of all existing collections aliases", + "operationId": "get_collections_aliases", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/upload": { + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from an uploaded snapshot", + "description": "Recover local collection data from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_uploaded_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "priority", + "in": "query", + "description": "Defines source of truth for snapshot recovery", + "required": false, + "schema": { + "$ref": "#/components/schemas/SnapshotPriority" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "snapshot": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Delete collection snapshot", + "description": "Delete snapshot for a collection", + "operationId": "delete_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "parameters": [ + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots" + ], + "summary": "Delete storage snapshot", + "description": "Delete snapshot of the whole storage", + "operationId": "delete_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the full snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload values for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Overwrite payload", + "description": "Replace full payload of points with new one", + "operationId": "overwrite_payload", + "requestBody": { + "description": "Payload and points selector", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v1.1.1" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection All vectors in collection are available for querying Calculated as `points_count x vectors_per_point` Where `vectors_per_point` is a number of named vectors in schema", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in vector index (HNSW)", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points (vectors + payloads) in collection Each point could be accessed by unique id", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection. Each segment has independent vector as payload indexes", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection. `Green` - all good. `Yellow` - optimization is running, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + }, + "quantization_config": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "replication_factor": { + "description": "Number of replicas for each shard", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Custom params for quantization. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "maximum": 10000, + "minimum": 4, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build the index.", + "type": "integer", + "format": "uint", + "minimum": 4, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 1000, + "nullable": true + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "type": "integer", + "format": "uint", + "minimum": 1000, + "nullable": true + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, the index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for additional payload-aware HNSW links. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "QuantizationConfig": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScalarQuantization" + } + ] + }, + "ScalarQuantization": { + "type": "object", + "required": [ + "scalar" + ], + "properties": { + "scalar": { + "$ref": "#/components/schemas/ScalarQuantizationConfig" + } + } + }, + "ScalarQuantizationConfig": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/ScalarType" + }, + "quantile": { + "description": "Quantile for quantization. Expected value range in [0.5, 1.0]. If not set - use the whole range of values", + "type": "number", + "format": "float", + "maximum": 1, + "minimum": 0.5, + "nullable": true + }, + "always_ram": { + "description": "If true - quantized vectors always will be stored in RAM, ignoring the config of main storage", + "type": "boolean", + "nullable": true + } + } + }, + "ScalarType": { + "type": "string", + "enum": [ + "int8" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "maximum": 10000, + "minimum": 4 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 4 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for hnsw graph built for payload index. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "maximum": 1, + "minimum": 0 + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 100 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads. If `default_segment_number = 0`, will be automatically selected by the number of available CPUs.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256 If not set, mmap will not be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 1000, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 1000 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type", + "points" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + }, + "points": { + "description": "Number of points indexed with this index", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unanmed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/IsNullCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + }, + { + "$ref": "#/components/schemas/MatchAny" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "MatchAny": { + "description": "Exact match on any of the given values", + "type": "object", + "required": [ + "any" + ], + "properties": { + "any": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "AnyVariants": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + ] + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "IsNullCondition": { + "description": "Select points with null payload for a specified field", + "type": "object", + "required": [ + "is_null" + ], + "properties": { + "is_null": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "exact": { + "description": "Search without approximation. If set to true, search may run long but with exact results.", + "default": false, + "type": "boolean" + }, + "quantization": { + "description": "Quantization params", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationSearchParams" + }, + { + "nullable": true + } + ] + } + } + }, + "QuantizationSearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "ignore": { + "description": "If true, quantized vectors are ignored. Default is false.", + "default": false, + "type": "boolean" + }, + "rescore": { + "description": "If true, use original vectors to re-score top-k results. Might require more time in case if original vectors are stored on disk. Default is false.", + "default": false, + "type": "boolean" + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "description": "`Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.", + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "LookupLocation": { + "description": "Defines a location to use for looking up the vector. Specifies collection and vector field name.", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection used for lookup", + "type": "string" + }, + "vector": { + "description": "Optional name of the vector field within the collection. If not provided, the default vector field will be used.", + "default": null, + "type": "string", + "nullable": true + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "replication_factor": { + "description": "Number of shards replicas. Default is 1 Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "init_from": { + "description": "Specify other collection to copy data from.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/InitFrom" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Quantization parameters. If none - quantization is disabled.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 1000, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 1000, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + } + } + }, + "InitFrom": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "type": "string" + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Collection base params. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionParamsDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParamsDiff": { + "type": "object", + "properties": { + "replication_factor": { + "description": "Number of replicas for each shard", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Minimal number successful responses from replicas to consider operation successful", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Assigns payload to each point that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys" + ], + "properties": { + "keys": { + "description": "List of payload keys to remove from payload", + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "message_send_failures", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + }, + "message_send_failures": { + "description": "Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MessageSendErrors" + } + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "description": "Role of the peer in the consensus", + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "MessageSendErrors": { + "description": "Message send failures for a particular peer", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "latest_error": { + "type": "string", + "nullable": true + } + } + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ReplicaState": { + "description": "State of the single shard within a replica set.", + "type": "string", + "enum": [ + "Active", + "Dead", + "Partial", + "Initializing", + "Listener" + ] + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "sync", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sync": { + "description": "If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another", + "type": "boolean" + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster", + "collections", + "id", + "requests" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "collections": { + "$ref": "#/components/schemas/CollectionsTelemetry" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterTelemetry" + }, + "requests": { + "$ref": "#/components/schemas/RequestsTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "name", + "startup", + "version" + ], + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppFeaturesTelemetry" + }, + { + "nullable": true + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + { + "nullable": true + } + ] + }, + "startup": { + "type": "string", + "format": "date-time" + } + } + }, + "AppFeaturesTelemetry": { + "type": "object", + "required": [ + "debug", + "service_debug_feature", + "web_feature" + ], + "properties": { + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "CollectionsTelemetry": { + "type": "object", + "required": [ + "number_of_collections" + ], + "properties": { + "number_of_collections": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetryEnum" + }, + "nullable": true + } + } + }, + "CollectionTelemetryEnum": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionTelemetry" + }, + { + "$ref": "#/components/schemas/CollectionsAggregatedTelemetry" + } + ] + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time_ms", + "shards", + "transfers" + ], + "properties": { + "id": { + "type": "string" + }, + "init_time_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplicaSetTelemetry" + } + }, + "transfers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "ReplicaSetTelemetry": { + "type": "object", + "required": [ + "id", + "remote", + "replicate_states" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "local": { + "anyOf": [ + { + "$ref": "#/components/schemas/LocalShardTelemetry" + }, + { + "nullable": true + } + ] + }, + "remote": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardTelemetry" + } + }, + "replicate_states": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ReplicaState" + } + } + } + }, + "LocalShardTelemetry": { + "type": "object", + "required": [ + "optimizations", + "segments" + ], + "properties": { + "variant_name": { + "type": "string", + "nullable": true + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizations": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index_searches" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index_searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorIndexSearchesTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "index", + "storage_type", + "vector_data" + ], + "properties": { + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "storage_type": { + "$ref": "#/components/schemas/StorageType" + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + }, + "quantization_config": { + "description": "Quantization parameters. If none - quantization is disabled.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "hnsw_config": { + "description": "Vector specific HNSW config that overrides collection config", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfig" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Vector specific quantization config that overrides collection config", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "Indexes": { + "description": "Vector index configuration of the segment", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "StorageType": { + "description": "Type of vector storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mmap" + ] + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexSearchesTelemetry": { + "type": "object", + "required": [ + "filtered_exact", + "filtered_large_cardinality", + "filtered_plain", + "filtered_small_cardinality", + "unfiltered_exact", + "unfiltered_hnsw", + "unfiltered_plain" + ], + "properties": { + "index_name": { + "type": "string", + "nullable": true + }, + "unfiltered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_hnsw": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_small_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_large_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "OperationDurationStatistics": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "avg_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "min_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "max_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "last_responded": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "field_name": { + "type": "string", + "nullable": true + }, + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "type": "object", + "required": [ + "optimizations", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "optimizations": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "RemoteShardTelemetry": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "searches": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "CollectionsAggregatedTelemetry": { + "type": "object", + "required": [ + "optimizers_status", + "params", + "vectors" + ], + "properties": { + "vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "optimizers_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + } + } + }, + "ClusterTelemetry": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterStatusTelemetry" + }, + { + "nullable": true + } + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatusTelemetry": { + "type": "object", + "required": [ + "commit", + "consensus_thread_status", + "is_voter", + "number_of_peers", + "pending_operations", + "term" + ], + "properties": { + "number_of_peers": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "term": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "role": { + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "type": "boolean" + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "RequestsTelemetry": { + "type": "object", + "required": [ + "grpc", + "rest" + ], + "properties": { + "rest": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc": { + "$ref": "#/components/schemas/GrpcTelemetry" + } + } + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + } + }, + "GrpcTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/ReplicateShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + }, + { + "$ref": "#/components/schemas/DropReplicaOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ReplicateShardOperation": { + "type": "object", + "required": [ + "replicate_shard" + ], + "properties": { + "replicate_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "DropReplicaOperation": { + "type": "object", + "required": [ + "drop_replica" + ], + "properties": { + "drop_replica": { + "$ref": "#/components/schemas/Replica" + } + } + }, + "Replica": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "LocksOption": { + "type": "object", + "required": [ + "write" + ], + "properties": { + "error_message": { + "type": "string", + "nullable": true + }, + "write": { + "type": "boolean" + } + } + }, + "SnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "description": "Examples: - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot` - Local path `file:///qdrant/snapshots/test_collection-2022-08-04-10-49-10.snapshot`", + "type": "string", + "format": "uri" + }, + "priority": { + "description": "Defines which data should be used as a source of truth if there are other replicas in the cluster. If set to `Snapshot`, the snapshot will be used as a source of truth, and the current state will be overwritten. If set to `Replica`, the current state will be used as a source of truth, and after recovery if will be synchronized with the snapshot.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/SnapshotPriority" + }, + { + "nullable": true + } + ] + } + } + }, + "SnapshotPriority": { + "description": "Defines source of truth for snapshot recovery `Snapshot` means - prefer snapshot data over the current state `Replica` means - prefer existing data over the snapshot", + "type": "string", + "enum": [ + "snapshot", + "replica" + ] + }, + "CollectionsAliasesResponse": { + "type": "object", + "required": [ + "aliases" + ], + "properties": { + "aliases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasDescription" + } + } + } + }, + "AliasDescription": { + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "alias_name": { + "type": "string" + }, + "collection_name": { + "type": "string" + } + } + }, + "WriteOrdering": { + "description": "Defines write ordering guarantees for collection operations\n\n* `weak` - write operations may be reordered, works faster, default\n\n* `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change\n\n* `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down", + "type": "string", + "enum": [ + "weak", + "medium", + "strong" + ] + }, + "ReadConsistency": { + "description": "Read consistency parameter\n\nDefines how many replicas should be queried to get the result\n\n* `N` - send N random request and return points, which present on all of them\n\n* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of them\n\n* `all` - send requests to all nodes and return points which present on all of them\n\nDefault value is `Factor(1)`", + "anyOf": [ + { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + { + "$ref": "#/components/schemas/ReadConsistencyType" + } + ] + }, + "ReadConsistencyType": { + "description": "* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of nodes\n\n* `all` - send requests to all nodes and return points which present on all nodes", + "type": "string", + "enum": [ + "majority", + "quorum", + "all" + ] + } + } + } +} diff --git a/docs/redoc/v1.1.2/openapi.json b/docs/redoc/v1.1.2/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..438bb875cee2b84b11107b4fa4d28d55e588ba04 --- /dev/null +++ b/docs/redoc/v1.1.2/openapi.json @@ -0,0 +1,7316 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + }, + "/metrics": { + "get": { + "summary": "Collect Prometheus metrics data", + "description": "Collect metrics data including app info, collections info, cluster info and statistics", + "operationId": "metrics", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Metrics data in Prometheus format", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "# HELP app_info information about qdrant server\n# TYPE app_info counter\napp_info{name=\"qdrant\",version=\"0.11.1\"} 1\n# HELP cluster_enabled is cluster support enabled\n# TYPE cluster_enabled gauge\ncluster_enabled 0\n# HELP collections_total number of collections\n# TYPE collections_total gauge\ncollections_total 1\n" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/locks": { + "post": { + "summary": "Set lock options", + "description": "Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options", + "operationId": "post_locks", + "tags": [ + "service" + ], + "requestBody": { + "description": "Lock options and optional error message", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + }, + "get": { + "summary": "Get lock options", + "description": "Get lock options. If write is locked, all write operations and collection creation are forbidden", + "operationId": "get_locks", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/recover": { + "post": { + "tags": [ + "cluster" + ], + "summary": "Tries to recover current peer Raft state.", + "operationId": "recover_current_peer", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "force", + "in": "query", + "description": "If true - removes peer even if it has shards/replicas on it.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List aliases for collection", + "description": "Get list of all aliases for a collection", + "operationId": "get_collection_aliases", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections aliases", + "description": "Get list of all existing collections aliases", + "operationId": "get_collections_aliases", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/upload": { + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from an uploaded snapshot", + "description": "Recover local collection data from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_uploaded_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "priority", + "in": "query", + "description": "Defines source of truth for snapshot recovery", + "required": false, + "schema": { + "$ref": "#/components/schemas/SnapshotPriority" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "snapshot": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Delete collection snapshot", + "description": "Delete snapshot for a collection", + "operationId": "delete_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "parameters": [ + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots" + ], + "summary": "Delete storage snapshot", + "description": "Delete snapshot of the whole storage", + "operationId": "delete_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the full snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload values for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Overwrite payload", + "description": "Replace full payload of points with new one", + "operationId": "overwrite_payload", + "requestBody": { + "description": "Payload and points selector", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v1.1.2" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection All vectors in collection are available for querying Calculated as `points_count x vectors_per_point` Where `vectors_per_point` is a number of named vectors in schema", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in vector index (HNSW)", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points (vectors + payloads) in collection Each point could be accessed by unique id", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection. Each segment has independent vector as payload indexes", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection. `Green` - all good. `Yellow` - optimization is running, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + }, + "quantization_config": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "replication_factor": { + "description": "Number of replicas for each shard", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Custom params for quantization. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build the index.", + "type": "integer", + "format": "uint", + "minimum": 4, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 1000, + "nullable": true + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "type": "integer", + "format": "uint", + "minimum": 1000, + "nullable": true + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, the index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for additional payload-aware HNSW links. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "QuantizationConfig": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScalarQuantization" + } + ] + }, + "ScalarQuantization": { + "type": "object", + "required": [ + "scalar" + ], + "properties": { + "scalar": { + "$ref": "#/components/schemas/ScalarQuantizationConfig" + } + } + }, + "ScalarQuantizationConfig": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/ScalarType" + }, + "quantile": { + "description": "Quantile for quantization. Expected value range in [0.5, 1.0]. If not set - use the whole range of values", + "type": "number", + "format": "float", + "maximum": 1, + "minimum": 0.5, + "nullable": true + }, + "always_ram": { + "description": "If true - quantized vectors always will be stored in RAM, ignoring the config of main storage", + "type": "boolean", + "nullable": true + } + } + }, + "ScalarType": { + "type": "string", + "enum": [ + "int8" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 4 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for hnsw graph built for payload index. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "maximum": 1, + "minimum": 0 + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 100 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads. If `default_segment_number = 0`, will be automatically selected by the number of available CPUs.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256 If not set, mmap will not be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 1000, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 1000 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type", + "points" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + }, + "points": { + "description": "Number of points indexed with this index", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unanmed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/IsNullCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + }, + { + "$ref": "#/components/schemas/MatchAny" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "MatchAny": { + "description": "Exact match on any of the given values", + "type": "object", + "required": [ + "any" + ], + "properties": { + "any": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "AnyVariants": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + ] + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "IsNullCondition": { + "description": "Select points with null payload for a specified field", + "type": "object", + "required": [ + "is_null" + ], + "properties": { + "is_null": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "exact": { + "description": "Search without approximation. If set to true, search may run long but with exact results.", + "default": false, + "type": "boolean" + }, + "quantization": { + "description": "Quantization params", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationSearchParams" + }, + { + "nullable": true + } + ] + } + } + }, + "QuantizationSearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "ignore": { + "description": "If true, quantized vectors are ignored. Default is false.", + "default": false, + "type": "boolean" + }, + "rescore": { + "description": "If true, use original vectors to re-score top-k results. Might require more time in case if original vectors are stored on disk. Default is false.", + "default": false, + "type": "boolean" + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "description": "`Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.", + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "LookupLocation": { + "description": "Defines a location to use for looking up the vector. Specifies collection and vector field name.", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection used for lookup", + "type": "string" + }, + "vector": { + "description": "Optional name of the vector field within the collection. If not provided, the default vector field will be used.", + "default": null, + "type": "string", + "nullable": true + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "replication_factor": { + "description": "Number of shards replicas. Default is 1 Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "init_from": { + "description": "Specify other collection to copy data from.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/InitFrom" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Quantization parameters. If none - quantization is disabled.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 1000, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 1000, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + } + } + }, + "InitFrom": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "type": "string" + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Collection base params. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionParamsDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParamsDiff": { + "type": "object", + "properties": { + "replication_factor": { + "description": "Number of replicas for each shard", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Minimal number successful responses from replicas to consider operation successful", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Assigns payload to each point that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys" + ], + "properties": { + "keys": { + "description": "List of payload keys to remove from payload", + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "message_send_failures", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + }, + "message_send_failures": { + "description": "Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MessageSendErrors" + } + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "description": "Role of the peer in the consensus", + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "MessageSendErrors": { + "description": "Message send failures for a particular peer", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "latest_error": { + "type": "string", + "nullable": true + } + } + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ReplicaState": { + "description": "State of the single shard within a replica set.", + "type": "string", + "enum": [ + "Active", + "Dead", + "Partial", + "Initializing", + "Listener" + ] + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "sync", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sync": { + "description": "If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another", + "type": "boolean" + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster", + "collections", + "id", + "requests" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "collections": { + "$ref": "#/components/schemas/CollectionsTelemetry" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterTelemetry" + }, + "requests": { + "$ref": "#/components/schemas/RequestsTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "name", + "startup", + "version" + ], + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppFeaturesTelemetry" + }, + { + "nullable": true + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + { + "nullable": true + } + ] + }, + "startup": { + "type": "string", + "format": "date-time" + } + } + }, + "AppFeaturesTelemetry": { + "type": "object", + "required": [ + "debug", + "service_debug_feature", + "web_feature" + ], + "properties": { + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "CollectionsTelemetry": { + "type": "object", + "required": [ + "number_of_collections" + ], + "properties": { + "number_of_collections": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetryEnum" + }, + "nullable": true + } + } + }, + "CollectionTelemetryEnum": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionTelemetry" + }, + { + "$ref": "#/components/schemas/CollectionsAggregatedTelemetry" + } + ] + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time_ms", + "shards", + "transfers" + ], + "properties": { + "id": { + "type": "string" + }, + "init_time_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplicaSetTelemetry" + } + }, + "transfers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "ReplicaSetTelemetry": { + "type": "object", + "required": [ + "id", + "remote", + "replicate_states" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "local": { + "anyOf": [ + { + "$ref": "#/components/schemas/LocalShardTelemetry" + }, + { + "nullable": true + } + ] + }, + "remote": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardTelemetry" + } + }, + "replicate_states": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ReplicaState" + } + } + } + }, + "LocalShardTelemetry": { + "type": "object", + "required": [ + "optimizations", + "segments" + ], + "properties": { + "variant_name": { + "type": "string", + "nullable": true + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizations": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index_searches" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index_searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorIndexSearchesTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "index", + "storage_type", + "vector_data" + ], + "properties": { + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "storage_type": { + "$ref": "#/components/schemas/StorageType" + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + }, + "quantization_config": { + "description": "Quantization parameters. If none - quantization is disabled.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "hnsw_config": { + "description": "Vector specific HNSW config that overrides collection config", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfig" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Vector specific quantization config that overrides collection config", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "Indexes": { + "description": "Vector index configuration of the segment", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "StorageType": { + "description": "Type of vector storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mmap" + ] + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexSearchesTelemetry": { + "type": "object", + "required": [ + "filtered_exact", + "filtered_large_cardinality", + "filtered_plain", + "filtered_small_cardinality", + "unfiltered_exact", + "unfiltered_hnsw", + "unfiltered_plain" + ], + "properties": { + "index_name": { + "type": "string", + "nullable": true + }, + "unfiltered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_hnsw": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_small_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_large_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "OperationDurationStatistics": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "avg_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "min_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "max_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "last_responded": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "field_name": { + "type": "string", + "nullable": true + }, + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "type": "object", + "required": [ + "optimizations", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "optimizations": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "RemoteShardTelemetry": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "searches": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "CollectionsAggregatedTelemetry": { + "type": "object", + "required": [ + "optimizers_status", + "params", + "vectors" + ], + "properties": { + "vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "optimizers_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + } + } + }, + "ClusterTelemetry": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterStatusTelemetry" + }, + { + "nullable": true + } + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatusTelemetry": { + "type": "object", + "required": [ + "commit", + "consensus_thread_status", + "is_voter", + "number_of_peers", + "pending_operations", + "term" + ], + "properties": { + "number_of_peers": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "term": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "role": { + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "type": "boolean" + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "RequestsTelemetry": { + "type": "object", + "required": [ + "grpc", + "rest" + ], + "properties": { + "rest": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc": { + "$ref": "#/components/schemas/GrpcTelemetry" + } + } + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + } + }, + "GrpcTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/ReplicateShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + }, + { + "$ref": "#/components/schemas/DropReplicaOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ReplicateShardOperation": { + "type": "object", + "required": [ + "replicate_shard" + ], + "properties": { + "replicate_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "DropReplicaOperation": { + "type": "object", + "required": [ + "drop_replica" + ], + "properties": { + "drop_replica": { + "$ref": "#/components/schemas/Replica" + } + } + }, + "Replica": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "LocksOption": { + "type": "object", + "required": [ + "write" + ], + "properties": { + "error_message": { + "type": "string", + "nullable": true + }, + "write": { + "type": "boolean" + } + } + }, + "SnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "description": "Examples: - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot` - Local path `file:///qdrant/snapshots/test_collection-2022-08-04-10-49-10.snapshot`", + "type": "string", + "format": "uri" + }, + "priority": { + "description": "Defines which data should be used as a source of truth if there are other replicas in the cluster. If set to `Snapshot`, the snapshot will be used as a source of truth, and the current state will be overwritten. If set to `Replica`, the current state will be used as a source of truth, and after recovery if will be synchronized with the snapshot.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/SnapshotPriority" + }, + { + "nullable": true + } + ] + } + } + }, + "SnapshotPriority": { + "description": "Defines source of truth for snapshot recovery `Snapshot` means - prefer snapshot data over the current state `Replica` means - prefer existing data over the snapshot", + "type": "string", + "enum": [ + "snapshot", + "replica" + ] + }, + "CollectionsAliasesResponse": { + "type": "object", + "required": [ + "aliases" + ], + "properties": { + "aliases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasDescription" + } + } + } + }, + "AliasDescription": { + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "alias_name": { + "type": "string" + }, + "collection_name": { + "type": "string" + } + } + }, + "WriteOrdering": { + "description": "Defines write ordering guarantees for collection operations\n\n* `weak` - write operations may be reordered, works faster, default\n\n* `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change\n\n* `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down", + "type": "string", + "enum": [ + "weak", + "medium", + "strong" + ] + }, + "ReadConsistency": { + "description": "Read consistency parameter\n\nDefines how many replicas should be queried to get the result\n\n* `N` - send N random request and return points, which present on all of them\n\n* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of them\n\n* `all` - send requests to all nodes and return points which present on all of them\n\nDefault value is `Factor(1)`", + "anyOf": [ + { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + { + "$ref": "#/components/schemas/ReadConsistencyType" + } + ] + }, + "ReadConsistencyType": { + "description": "* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of nodes\n\n* `all` - send requests to all nodes and return points which present on all nodes", + "type": "string", + "enum": [ + "majority", + "quorum", + "all" + ] + } + } + } +} diff --git a/docs/redoc/v1.1.3/openapi.json b/docs/redoc/v1.1.3/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..95e10e020f326e23ef874655dbca118a84e10605 --- /dev/null +++ b/docs/redoc/v1.1.3/openapi.json @@ -0,0 +1,7316 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + }, + "/metrics": { + "get": { + "summary": "Collect Prometheus metrics data", + "description": "Collect metrics data including app info, collections info, cluster info and statistics", + "operationId": "metrics", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Metrics data in Prometheus format", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "# HELP app_info information about qdrant server\n# TYPE app_info counter\napp_info{name=\"qdrant\",version=\"0.11.1\"} 1\n# HELP cluster_enabled is cluster support enabled\n# TYPE cluster_enabled gauge\ncluster_enabled 0\n# HELP collections_total number of collections\n# TYPE collections_total gauge\ncollections_total 1\n" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/locks": { + "post": { + "summary": "Set lock options", + "description": "Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options", + "operationId": "post_locks", + "tags": [ + "service" + ], + "requestBody": { + "description": "Lock options and optional error message", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + }, + "get": { + "summary": "Get lock options", + "description": "Get lock options. If write is locked, all write operations and collection creation are forbidden", + "operationId": "get_locks", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/recover": { + "post": { + "tags": [ + "cluster" + ], + "summary": "Tries to recover current peer Raft state.", + "operationId": "recover_current_peer", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "force", + "in": "query", + "description": "If true - removes peer even if it has shards/replicas on it.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List aliases for collection", + "description": "Get list of all aliases for a collection", + "operationId": "get_collection_aliases", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections aliases", + "description": "Get list of all existing collections aliases", + "operationId": "get_collections_aliases", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/upload": { + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from an uploaded snapshot", + "description": "Recover local collection data from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_uploaded_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "priority", + "in": "query", + "description": "Defines source of truth for snapshot recovery", + "required": false, + "schema": { + "$ref": "#/components/schemas/SnapshotPriority" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "snapshot": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Delete collection snapshot", + "description": "Delete snapshot for a collection", + "operationId": "delete_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "parameters": [ + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots" + ], + "summary": "Delete storage snapshot", + "description": "Delete snapshot of the whole storage", + "operationId": "delete_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the full snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload values for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Overwrite payload", + "description": "Replace full payload of points with new one", + "operationId": "overwrite_payload", + "requestBody": { + "description": "Payload and points selector", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v1.1.3" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection All vectors in collection are available for querying Calculated as `points_count x vectors_per_point` Where `vectors_per_point` is a number of named vectors in schema", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in vector index (HNSW)", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points (vectors + payloads) in collection Each point could be accessed by unique id", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection. Each segment has independent vector as payload indexes", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection. `Green` - all good. `Yellow` - optimization is running, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + }, + "quantization_config": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "replication_factor": { + "description": "Number of replicas for each shard", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Custom params for quantization. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build the index.", + "type": "integer", + "format": "uint", + "minimum": 4, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 1000, + "nullable": true + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "type": "integer", + "format": "uint", + "minimum": 1000, + "nullable": true + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, the index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for additional payload-aware HNSW links. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "QuantizationConfig": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScalarQuantization" + } + ] + }, + "ScalarQuantization": { + "type": "object", + "required": [ + "scalar" + ], + "properties": { + "scalar": { + "$ref": "#/components/schemas/ScalarQuantizationConfig" + } + } + }, + "ScalarQuantizationConfig": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/ScalarType" + }, + "quantile": { + "description": "Quantile for quantization. Expected value range in [0.5, 1.0]. If not set - use the whole range of values", + "type": "number", + "format": "float", + "maximum": 1, + "minimum": 0.5, + "nullable": true + }, + "always_ram": { + "description": "If true - quantized vectors always will be stored in RAM, ignoring the config of main storage", + "type": "boolean", + "nullable": true + } + } + }, + "ScalarType": { + "type": "string", + "enum": [ + "int8" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 4 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for hnsw graph built for payload index. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "indexing_threshold", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "maximum": 1, + "minimum": 0 + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 100 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads. If `default_segment_number = 0`, will be automatically selected by the number of available CPUs.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256 If not set, mmap will not be used.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 1000, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 1000 + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type", + "points" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + }, + "points": { + "description": "Number of points indexed with this index", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unanmed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/IsNullCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + }, + { + "$ref": "#/components/schemas/MatchAny" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "MatchAny": { + "description": "Exact match on any of the given values", + "type": "object", + "required": [ + "any" + ], + "properties": { + "any": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "AnyVariants": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + ] + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "IsNullCondition": { + "description": "Select points with null payload for a specified field", + "type": "object", + "required": [ + "is_null" + ], + "properties": { + "is_null": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "exact": { + "description": "Search without approximation. If set to true, search may run long but with exact results.", + "default": false, + "type": "boolean" + }, + "quantization": { + "description": "Quantization params", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationSearchParams" + }, + { + "nullable": true + } + ] + } + } + }, + "QuantizationSearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "ignore": { + "description": "If true, quantized vectors are ignored. Default is false.", + "default": false, + "type": "boolean" + }, + "rescore": { + "description": "If true, use original vectors to re-score top-k results. Might require more time in case if original vectors are stored on disk. Default is false.", + "default": false, + "type": "boolean" + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "description": "`Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.", + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "LookupLocation": { + "description": "Defines a location to use for looking up the vector. Specifies collection and vector field name.", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection used for lookup", + "type": "string" + }, + "vector": { + "description": "Optional name of the vector field within the collection. If not provided, the default vector field will be used.", + "default": null, + "type": "string", + "nullable": true + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "replication_factor": { + "description": "Number of shards replicas. Default is 1 Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "init_from": { + "description": "Specify other collection to copy data from.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/InitFrom" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Quantization parameters. If none - quantization is disabled.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in KiloBytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in KiloBytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file. To enable memmap storage, lower the threshold Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 1000, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in KiloBytes) of vectors allowed for plain index. Default value based on Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 1000, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + } + } + }, + "InitFrom": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "type": "string" + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Collection base params. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionParamsDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParamsDiff": { + "type": "object", + "properties": { + "replication_factor": { + "description": "Number of replicas for each shard", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Minimal number successful responses from replicas to consider operation successful", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Assigns payload to each point that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys" + ], + "properties": { + "keys": { + "description": "List of payload keys to remove from payload", + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "message_send_failures", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + }, + "message_send_failures": { + "description": "Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MessageSendErrors" + } + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "description": "Role of the peer in the consensus", + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "MessageSendErrors": { + "description": "Message send failures for a particular peer", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "latest_error": { + "type": "string", + "nullable": true + } + } + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ReplicaState": { + "description": "State of the single shard within a replica set.", + "type": "string", + "enum": [ + "Active", + "Dead", + "Partial", + "Initializing", + "Listener" + ] + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "sync", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sync": { + "description": "If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another", + "type": "boolean" + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster", + "collections", + "id", + "requests" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "collections": { + "$ref": "#/components/schemas/CollectionsTelemetry" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterTelemetry" + }, + "requests": { + "$ref": "#/components/schemas/RequestsTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "name", + "startup", + "version" + ], + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppFeaturesTelemetry" + }, + { + "nullable": true + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + { + "nullable": true + } + ] + }, + "startup": { + "type": "string", + "format": "date-time" + } + } + }, + "AppFeaturesTelemetry": { + "type": "object", + "required": [ + "debug", + "service_debug_feature", + "web_feature" + ], + "properties": { + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "CollectionsTelemetry": { + "type": "object", + "required": [ + "number_of_collections" + ], + "properties": { + "number_of_collections": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetryEnum" + }, + "nullable": true + } + } + }, + "CollectionTelemetryEnum": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionTelemetry" + }, + { + "$ref": "#/components/schemas/CollectionsAggregatedTelemetry" + } + ] + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time_ms", + "shards", + "transfers" + ], + "properties": { + "id": { + "type": "string" + }, + "init_time_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplicaSetTelemetry" + } + }, + "transfers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "ReplicaSetTelemetry": { + "type": "object", + "required": [ + "id", + "remote", + "replicate_states" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "local": { + "anyOf": [ + { + "$ref": "#/components/schemas/LocalShardTelemetry" + }, + { + "nullable": true + } + ] + }, + "remote": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardTelemetry" + } + }, + "replicate_states": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ReplicaState" + } + } + } + }, + "LocalShardTelemetry": { + "type": "object", + "required": [ + "optimizations", + "segments" + ], + "properties": { + "variant_name": { + "type": "string", + "nullable": true + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizations": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index_searches" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index_searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorIndexSearchesTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "index", + "storage_type", + "vector_data" + ], + "properties": { + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "storage_type": { + "$ref": "#/components/schemas/StorageType" + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + }, + "quantization_config": { + "description": "Quantization parameters. If none - quantization is disabled.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "hnsw_config": { + "description": "Vector specific HNSW config that overrides collection config", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfig" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Vector specific quantization config that overrides collection config", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "Indexes": { + "description": "Vector index configuration of the segment", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "StorageType": { + "description": "Type of vector storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mmap" + ] + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexSearchesTelemetry": { + "type": "object", + "required": [ + "filtered_exact", + "filtered_large_cardinality", + "filtered_plain", + "filtered_small_cardinality", + "unfiltered_exact", + "unfiltered_hnsw", + "unfiltered_plain" + ], + "properties": { + "index_name": { + "type": "string", + "nullable": true + }, + "unfiltered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_hnsw": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_small_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_large_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "OperationDurationStatistics": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "avg_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "min_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "max_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "last_responded": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "field_name": { + "type": "string", + "nullable": true + }, + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "type": "object", + "required": [ + "optimizations", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "optimizations": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "RemoteShardTelemetry": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "searches": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "CollectionsAggregatedTelemetry": { + "type": "object", + "required": [ + "optimizers_status", + "params", + "vectors" + ], + "properties": { + "vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "optimizers_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + } + } + }, + "ClusterTelemetry": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterStatusTelemetry" + }, + { + "nullable": true + } + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatusTelemetry": { + "type": "object", + "required": [ + "commit", + "consensus_thread_status", + "is_voter", + "number_of_peers", + "pending_operations", + "term" + ], + "properties": { + "number_of_peers": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "term": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "role": { + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "type": "boolean" + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "RequestsTelemetry": { + "type": "object", + "required": [ + "grpc", + "rest" + ], + "properties": { + "rest": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc": { + "$ref": "#/components/schemas/GrpcTelemetry" + } + } + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + } + }, + "GrpcTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/ReplicateShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + }, + { + "$ref": "#/components/schemas/DropReplicaOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ReplicateShardOperation": { + "type": "object", + "required": [ + "replicate_shard" + ], + "properties": { + "replicate_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "DropReplicaOperation": { + "type": "object", + "required": [ + "drop_replica" + ], + "properties": { + "drop_replica": { + "$ref": "#/components/schemas/Replica" + } + } + }, + "Replica": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "LocksOption": { + "type": "object", + "required": [ + "write" + ], + "properties": { + "error_message": { + "type": "string", + "nullable": true + }, + "write": { + "type": "boolean" + } + } + }, + "SnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "description": "Examples: - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot` - Local path `file:///qdrant/snapshots/test_collection-2022-08-04-10-49-10.snapshot`", + "type": "string", + "format": "uri" + }, + "priority": { + "description": "Defines which data should be used as a source of truth if there are other replicas in the cluster. If set to `Snapshot`, the snapshot will be used as a source of truth, and the current state will be overwritten. If set to `Replica`, the current state will be used as a source of truth, and after recovery if will be synchronized with the snapshot.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/SnapshotPriority" + }, + { + "nullable": true + } + ] + } + } + }, + "SnapshotPriority": { + "description": "Defines source of truth for snapshot recovery `Snapshot` means - prefer snapshot data over the current state `Replica` means - prefer existing data over the snapshot", + "type": "string", + "enum": [ + "snapshot", + "replica" + ] + }, + "CollectionsAliasesResponse": { + "type": "object", + "required": [ + "aliases" + ], + "properties": { + "aliases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasDescription" + } + } + } + }, + "AliasDescription": { + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "alias_name": { + "type": "string" + }, + "collection_name": { + "type": "string" + } + } + }, + "WriteOrdering": { + "description": "Defines write ordering guarantees for collection operations\n\n* `weak` - write operations may be reordered, works faster, default\n\n* `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change\n\n* `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down", + "type": "string", + "enum": [ + "weak", + "medium", + "strong" + ] + }, + "ReadConsistency": { + "description": "Read consistency parameter\n\nDefines how many replicas should be queried to get the result\n\n* `N` - send N random request and return points, which present on all of them\n\n* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of them\n\n* `all` - send requests to all nodes and return points which present on all of them\n\nDefault value is `Factor(1)`", + "anyOf": [ + { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + { + "$ref": "#/components/schemas/ReadConsistencyType" + } + ] + }, + "ReadConsistencyType": { + "description": "* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of nodes\n\n* `all` - send requests to all nodes and return points which present on all nodes", + "type": "string", + "enum": [ + "majority", + "quorum", + "all" + ] + } + } + } +} diff --git a/docs/redoc/v1.10.x/openapi.json b/docs/redoc/v1.10.x/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..6264de513849ef51d0c9182914b7b9361363a1b9 --- /dev/null +++ b/docs/redoc/v1.10.x/openapi.json @@ -0,0 +1,11934 @@ +{ + "paths": { + "/collections/{collection_name}/shards": { + "put": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Create shard key", + "operationId": "create_shard_key", + "requestBody": { + "description": "Shard key configuration", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateShardingKey" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to create shards for", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/delete": { + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Delete shard key", + "operationId": "delete_shard_key", + "requestBody": { + "description": "Select shard key to delete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DropShardingKey" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to create shards for", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/": { + "get": { + "summary": "Returns information about the running Qdrant instance", + "description": "Returns information about the running Qdrant instance like version and commit id", + "operationId": "root", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/VersionInfo" + } + } + } + } + } + } + } + } + }, + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + }, + "/metrics": { + "get": { + "summary": "Collect Prometheus metrics data", + "description": "Collect metrics data including app info, collections info, cluster info and statistics", + "operationId": "metrics", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Metrics data in Prometheus format", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "# HELP app_info information about qdrant server\n# TYPE app_info counter\napp_info{name=\"qdrant\",version=\"0.11.1\"} 1\n# HELP cluster_enabled is cluster support enabled\n# TYPE cluster_enabled gauge\ncluster_enabled 0\n# HELP collections_total number of collections\n# TYPE collections_total gauge\ncollections_total 1\n" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/locks": { + "post": { + "summary": "Set lock options", + "description": "Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options", + "operationId": "post_locks", + "tags": [ + "service" + ], + "requestBody": { + "description": "Lock options and optional error message", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + }, + "get": { + "summary": "Get lock options", + "description": "Get lock options. If write is locked, all write operations and collection creation are forbidden", + "operationId": "get_locks", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + } + }, + "/healthz": { + "get": { + "summary": "Kubernetes healthz endpoint", + "description": "An endpoint for health checking used in Kubernetes.", + "operationId": "healthz", + "tags": [ + "service" + ], + "responses": { + "200": { + "description": "Healthz response", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "healthz check passed" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/livez": { + "get": { + "summary": "Kubernetes livez endpoint", + "description": "An endpoint for health checking used in Kubernetes.", + "operationId": "livez", + "tags": [ + "service" + ], + "responses": { + "200": { + "description": "Healthz response", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "healthz check passed" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/readyz": { + "get": { + "summary": "Kubernetes readyz endpoint", + "description": "An endpoint for health checking used in Kubernetes.", + "operationId": "readyz", + "tags": [ + "service" + ], + "responses": { + "200": { + "description": "Healthz response", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "healthz check passed" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/issues": { + "get": { + "summary": "Get issues", + "description": "Get a report of performance issues and configuration suggestions", + "operationId": "get_issues", + "tags": [ + "beta" + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "4XX": { + "description": "error" + } + } + }, + "delete": { + "summary": "Clear issues", + "description": "Removes all issues reported so far", + "operationId": "clear_issues", + "tags": [ + "beta" + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "boolean" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/recover": { + "post": { + "tags": [ + "cluster" + ], + "summary": "Tries to recover current peer Raft state.", + "operationId": "recover_current_peer", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "force", + "in": "query", + "description": "If true - removes peer even if it has shards/replicas on it.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/exists": { + "get": { + "tags": [ + "collections" + ], + "summary": "Check the existence of a collection", + "description": "Returns \"true\" if the given collection name exists, and \"false\" otherwise", + "operationId": "collection_exists", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/CollectionExistence" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List aliases for collection", + "description": "Get list of all aliases for a collection", + "operationId": "get_collection_aliases", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections aliases", + "description": "Get list of all existing collections aliases", + "operationId": "get_collections_aliases", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/upload": { + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from an uploaded snapshot", + "description": "Recover local collection data from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_uploaded_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "priority", + "in": "query", + "description": "Defines source of truth for snapshot recovery", + "required": false, + "schema": { + "$ref": "#/components/schemas/SnapshotPriority" + } + }, + { + "name": "checksum", + "in": "query", + "description": "Optional SHA256 checksum to verify snapshot integrity before recovery.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "snapshot": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Delete collection snapshot", + "description": "Delete snapshot for a collection", + "operationId": "delete_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "parameters": [ + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots" + ], + "summary": "Delete storage snapshot", + "description": "Delete snapshot of the whole storage", + "operationId": "delete_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the full snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots/upload": { + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover shard from an uploaded snapshot", + "description": "Recover shard of a local collection from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection shard.", + "operationId": "recover_shard_from_uploaded_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard to recover", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "priority", + "in": "query", + "description": "Defines source of truth for snapshot recovery", + "required": false, + "schema": { + "$ref": "#/components/schemas/SnapshotPriority" + } + }, + { + "name": "checksum", + "in": "query", + "description": "Optional SHA256 checksum to verify snapshot integrity before recovery.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "snapshot": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover shard of a local collection data from a snapshot. This will overwrite any data, stored in this shard, for the collection.", + "operationId": "recover_shard_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard to recover", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShardSnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List shards snapshots for a collection", + "description": "Get list of snapshots for a shard of a collection", + "operationId": "list_shard_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create shard snapshot", + "description": "Create new snapshot of a shard for a collection", + "operationId": "create_shard_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Delete shard snapshot", + "description": "Delete snapshot of a shard for a collection", + "operationId": "delete_shard_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot of a shard from a collection as a file", + "operationId": "get_shard_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/vectors": { + "put": { + "tags": [ + "points" + ], + "summary": "Update vectors", + "description": "Update specified named vectors on points, keep unspecified vectors intact.", + "operationId": "update_vectors", + "requestBody": { + "description": "Update named vectors on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateVectors" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/vectors/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete vectors", + "description": "Delete named vectors from the given points.", + "operationId": "delete_vectors", + "requestBody": { + "description": "Delete named vectors from points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteVectors" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload values for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Overwrite payload", + "description": "Replace full payload of points with new one", + "operationId": "overwrite_payload", + "requestBody": { + "description": "Payload and points selector", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Batch update points", + "description": "Apply a series of update operations for points, vectors and payloads", + "operationId": "batch_update", + "requestBody": { + "description": "update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to apply operations on", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/groups": { + "post": { + "tags": [ + "points" + ], + "summary": "Search point groups", + "description": "Retrieve closest points based on vector similarity and given filtering conditions, grouped by a given payload field", + "operationId": "search_point_groups", + "requestBody": { + "description": "Search request with optional filtering, grouped by a given payload field", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchGroupsRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/GroupsResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/groups": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend point groups", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples, grouped by a given payload field.", + "operationId": "recommend_point_groups", + "requestBody": { + "description": "Request points based on positive and negative examples, grouped by a payload field.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendGroupsRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/GroupsResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/discover": { + "post": { + "tags": [ + "points" + ], + "summary": "Discover points", + "description": "Use context and a target to find the most similar points to the target, constrained by the context.\nWhen using only the context (without a target), a special search - called context search - is performed where pairs of points are used to generate a loss that guides the search towards the zone where most positive examples overlap. This means that the score minimizes the scenario of finding a point closer to a negative than to a positive part of a pair.\nSince the score of a context relates to loss, the maximum score a point can get is 0.0, and it becomes normal that many points can have a score of 0.0.\nWhen using target (with or without context), the score behaves a little different: The integer part of the score represents the rank with respect to the context, while the decimal part of the score relates to the distance to the target. The context part of the score for each pair is calculated +1 if the point is closer to a positive than to a negative part of a pair, and -1 otherwise.\n", + "operationId": "discover_points", + "requestBody": { + "description": "Request points based on {positive, negative} pairs of examples, and/or a target", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DiscoverRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/discover/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Discover batch points", + "description": "Look for points based on target and/or positive and negative example pairs, in batch.", + "operationId": "discover_batch_points", + "requestBody": { + "description": "Batch request points based on { positive, negative } pairs of examples, and/or a target.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DiscoverRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/query": { + "post": { + "tags": [ + "points" + ], + "summary": "Query points", + "description": "Universally query points. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries.", + "operationId": "query_points", + "requestBody": { + "description": "Describes the query to make to the collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/QueryResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/query/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Query points in batch", + "description": "Universally query points in batch. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries.", + "operationId": "query_batch_points", + "requestBody": { + "description": "Describes the queries to make to the collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryResponse" + } + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [ + { + "api-key": [] + }, + { + "bearerAuth": [] + }, + {} + ], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `min_should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v1.10.x" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup." + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots." + }, + { + "name": "service", + "description": "Qdrant service utilities." + }, + { + "name": "beta", + "description": "Beta features, do not depend on these yet." + } + ], + "components": { + "securitySchemes": { + "api-key": { + "type": "apiKey", + "in": "header", + "name": "api-key", + "description": "Authorization key, either read-write or read-only" + }, + "bearerAuth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "optimizer_status", + "payload_schema", + "segments_count", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "DEPRECATED: Approximate number of vectors in collection. All vectors in collection are available for querying. Calculated as `points_count x vectors_per_point`. Where `vectors_per_point` is a number of named vectors in schema.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexed_vectors_count": { + "description": "Approximate number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in a specialized vector index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "points_count": { + "description": "Approximate number of points (vectors + payloads) in collection. Each point could be accessed by unique id.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "segments_count": { + "description": "Number of segments in collection. Each segment has independent vector as payload indexes", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection. `Green` - all good. `Yellow` - optimization is running, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "grey", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + }, + "quantization_config": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParams": { + "type": "object", + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "sharding_method": { + "description": "Sharding method Default is Auto - points are distributed across all available shards Custom - points are distributed across shards according to shard key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardingMethod" + }, + { + "nullable": true + } + ] + }, + "replication_factor": { + "description": "Number of replicas for each shard", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "read_fan_out_factor": { + "description": "Defines how many additional replicas should be processing read request at the same time. Default value is Auto, which means that fan-out will be determined automatically based on the busyness of the local replica. Having more than 0 might be useful to smooth latency spikes of individual nodes.", + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + }, + "sparse_vectors": { + "description": "Configuration of the sparse vector storage", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorParams" + }, + "nullable": true + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Custom params for quantization. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + }, + "on_disk": { + "description": "If true, vectors are served from disk, improving RAM usage at the cost of latency Default: false", + "type": "boolean", + "nullable": true + }, + "datatype": { + "description": "Defines which datatype should be used to represent vectors in the storage. Choosing different datatypes allows to optimize memory usage and performance vs accuracy.\n\n- For `float32` datatype - vectors are stored as single-precision floating point numbers, 4 bytes. - For `float16` datatype - vectors are stored as half-precision floating point numbers, 2 bytes. - For `uint8` datatype - vectors are stored as unsigned 8-bit integers, 1 byte. It expects vector elements to be in range `[0, 255]`.", + "anyOf": [ + { + "$ref": "#/components/schemas/Datatype" + }, + { + "nullable": true + } + ] + }, + "multivector_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/MultiVectorConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot", + "Manhattan" + ] + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build the index.", + "type": "integer", + "format": "uint", + "minimum": 4, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in kilobytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 10, + "nullable": true + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - automatically select from 8 to 16. Best to keep between 8 and 16 to prevent likelihood of building broken/inefficient HNSW graphs. On small CPUs, less threads are used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, the index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for additional payload-aware HNSW links. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "QuantizationConfig": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScalarQuantization" + }, + { + "$ref": "#/components/schemas/ProductQuantization" + }, + { + "$ref": "#/components/schemas/BinaryQuantization" + } + ] + }, + "ScalarQuantization": { + "type": "object", + "required": [ + "scalar" + ], + "properties": { + "scalar": { + "$ref": "#/components/schemas/ScalarQuantizationConfig" + } + } + }, + "ScalarQuantizationConfig": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/ScalarType" + }, + "quantile": { + "description": "Quantile for quantization. Expected value range in [0.5, 1.0]. If not set - use the whole range of values", + "type": "number", + "format": "float", + "maximum": 1, + "minimum": 0.5, + "nullable": true + }, + "always_ram": { + "description": "If true - quantized vectors always will be stored in RAM, ignoring the config of main storage", + "type": "boolean", + "nullable": true + } + } + }, + "ScalarType": { + "type": "string", + "enum": [ + "int8" + ] + }, + "ProductQuantization": { + "type": "object", + "required": [ + "product" + ], + "properties": { + "product": { + "$ref": "#/components/schemas/ProductQuantizationConfig" + } + } + }, + "ProductQuantizationConfig": { + "type": "object", + "required": [ + "compression" + ], + "properties": { + "compression": { + "$ref": "#/components/schemas/CompressionRatio" + }, + "always_ram": { + "type": "boolean", + "nullable": true + } + } + }, + "CompressionRatio": { + "type": "string", + "enum": [ + "x4", + "x8", + "x16", + "x32", + "x64" + ] + }, + "BinaryQuantization": { + "type": "object", + "required": [ + "binary" + ], + "properties": { + "binary": { + "$ref": "#/components/schemas/BinaryQuantizationConfig" + } + } + }, + "BinaryQuantizationConfig": { + "type": "object", + "properties": { + "always_ram": { + "type": "boolean", + "nullable": true + } + } + }, + "Datatype": { + "type": "string", + "enum": [ + "float32", + "uint8", + "float16" + ] + }, + "MultiVectorConfig": { + "type": "object", + "required": [ + "comparator" + ], + "properties": { + "comparator": { + "$ref": "#/components/schemas/MultiVectorComparator" + } + } + }, + "MultiVectorComparator": { + "type": "string", + "enum": [ + "max_sim" + ] + }, + "ShardingMethod": { + "type": "string", + "enum": [ + "auto", + "custom" + ] + }, + "SparseVectorParams": { + "description": "Params of single sparse vector data storage", + "type": "object", + "properties": { + "index": { + "description": "Custom params for index. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/SparseIndexParams" + }, + { + "nullable": true + } + ] + }, + "modifier": { + "description": "Configures addition value modifications for sparse vectors. Default: none", + "anyOf": [ + { + "$ref": "#/components/schemas/Modifier" + }, + { + "nullable": true + } + ] + } + } + }, + "SparseIndexParams": { + "description": "Configuration for sparse inverted index.", + "type": "object", + "properties": { + "full_scan_threshold": { + "description": "We prefer a full scan search upto (excluding) this number of vectors.\n\nNote: this is number of vectors, not KiloBytes.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "on_disk": { + "description": "Store index on disk. If set to false, the index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "datatype": { + "description": "Defines which datatype should be used for the index. Choosing different datatypes allows to optimize memory usage and performance vs accuracy.\n\n- For `float32` datatype - vectors are stored as single-precision floating point numbers, 4 bytes. - For `float16` datatype - vectors are stored as half-precision floating point numbers, 2 bytes. - For `uint8` datatype - vectors are quantized to unsigned 8-bit integers, 1 byte. Quantization to fit byte range `[0, 255]` happens during indexing automatically, so the actual vector data does not need to conform to this range.", + "anyOf": [ + { + "$ref": "#/components/schemas/Datatype" + }, + { + "nullable": true + } + ] + } + } + }, + "Modifier": { + "description": "If used, include weight modification, which will be applied to sparse vectors at query time: None - no modification (default) Idf - inverse document frequency, based on statistics of the collection", + "type": "string", + "enum": [ + "none", + "idf" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 4 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - automatically select from 8 to 16. Best to keep between 8 and 16 to prevent likelihood of slow building or broken/inefficient HNSW graphs. On small CPUs, less threads are used.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for hnsw graph built for payload index. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "maximum": 1, + "minimum": 0 + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 100 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads. If `default_segment_number = 0`, will be automatically selected by the number of available CPUs.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexing speed is more important - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.\n\nMemmap storage is disabled by default, to enable it, set this threshold to a reasonable value.\n\nTo disable memmap storage, set this to `0`. Internally it will use the largest threshold possible.\n\nNote: 1Kb = 1 vector of size 256", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing\n\nDefault value is 20,000, based on .\n\nTo disable vector indexing, set to `0`.\n\nNote: 1kB = 1 vector of size 256.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Max number of threads (jobs) for running optimizations per shard. Note: each optimization job will also use `max_indexing_threads` threads by itself for index building. If null - have no limit and choose dynamically to saturate CPU. If 0 - no optimization threads, optimizations will be disabled.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type", + "points" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + }, + "points": { + "description": "Number of points indexed with this index", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text", + "bool", + "datetime" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + }, + { + "$ref": "#/components/schemas/IntegerIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word", + "multilingual" + ] + }, + "IntegerIndexParams": { + "type": "object", + "required": [ + "lookup", + "range", + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/IntegerIndexType" + }, + "lookup": { + "description": "If true - support direct lookups.", + "type": "boolean" + }, + "range": { + "description": "If true - support ranges filters.", + "type": "boolean" + } + } + }, + "IntegerIndexType": { + "type": "string", + "enum": [ + "integer" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is true.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ShardKeySelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardKey" + } + } + ] + }, + "ShardKey": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + ] + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "description": "Shard Key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + }, + "order_value": { + "anyOf": [ + { + "$ref": "#/components/schemas/OrderValue" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Vector" + } + } + ] + }, + "Vector": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/SparseVector" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SparseVector": { + "description": "Sparse vector structure", + "type": "object", + "required": [ + "indices", + "values" + ], + "properties": { + "indices": { + "description": "Indices must be unique", + "type": "array", + "items": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "values": { + "description": "Values and indices must be the same length", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "OrderValue": { + "anyOf": [ + { + "type": "integer", + "format": "int64" + }, + { + "type": "number", + "format": "double" + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Options for specifying which vectors to include into response. Default is false.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unnamed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + }, + { + "$ref": "#/components/schemas/NamedSparseVector" + } + ] + }, + "NamedVector": { + "description": "Dense vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "NamedSparseVector": { + "description": "Sparse vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "$ref": "#/components/schemas/SparseVector" + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/Condition" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + } + }, + { + "nullable": true + } + ] + }, + "min_should": { + "description": "At least minimum amount of given conditions should match", + "anyOf": [ + { + "$ref": "#/components/schemas/MinShould" + }, + { + "nullable": true + } + ] + }, + "must": { + "description": "All conditions must match", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/Condition" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + } + }, + { + "nullable": true + } + ] + }, + "must_not": { + "description": "All conditions must NOT match", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/Condition" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + } + }, + { + "nullable": true + } + ] + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/IsNullCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/NestedCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/RangeInterface" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "geo_polygon": { + "description": "Check if geo point is within a given polygon", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoPolygon" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + }, + { + "$ref": "#/components/schemas/MatchAny" + }, + { + "$ref": "#/components/schemas/MatchExcept" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "MatchAny": { + "description": "Exact match on any of the given values", + "type": "object", + "required": [ + "any" + ], + "properties": { + "any": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "AnyVariants": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "uniqueItems": true + } + ] + }, + "MatchExcept": { + "description": "Should have at least one value not matching the any given values", + "type": "object", + "required": [ + "except" + ], + "properties": { + "except": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "RangeInterface": { + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "$ref": "#/components/schemas/DatetimeRange" + } + ] + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "DatetimeRange": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "string", + "format": "date-time", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "string", + "format": "date-time", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "string", + "format": "date-time", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "GeoPolygon": { + "description": "Geo filter request\n\nMatches coordinates inside the polygon, defined by `exterior` and `interiors`", + "type": "object", + "required": [ + "exterior" + ], + "properties": { + "exterior": { + "$ref": "#/components/schemas/GeoLineString" + }, + "interiors": { + "description": "Interior lines (if present) bound holes within the surface each GeoLineString must consist of a minimum of 4 points, and the first and last points must be the same.", + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoLineString" + }, + "nullable": true + } + } + }, + "GeoLineString": { + "description": "Ordered sequence of GeoPoints representing the line", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoPoint" + } + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "IsNullCondition": { + "description": "Select points with null payload for a specified field", + "type": "object", + "required": [ + "is_null" + ], + "properties": { + "is_null": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "NestedCondition": { + "type": "object", + "required": [ + "nested" + ], + "properties": { + "nested": { + "$ref": "#/components/schemas/Nested" + } + } + }, + "Nested": { + "description": "Select points with payload for a specified nested field", + "type": "object", + "required": [ + "filter", + "key" + ], + "properties": { + "key": { + "type": "string" + }, + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "MinShould": { + "type": "object", + "required": [ + "conditions", + "min_count" + ], + "properties": { + "conditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + } + }, + "min_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "exact": { + "description": "Search without approximation. If set to true, search may run long but with exact results.", + "default": false, + "type": "boolean" + }, + "quantization": { + "description": "Quantization params", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationSearchParams" + }, + { + "nullable": true + } + ] + }, + "indexed_only": { + "description": "If enabled, the engine will only perform search among indexed or small segments. Using this option prevents slow searches in case of delayed index, but does not guarantee that all uploaded vectors will be included in search results", + "default": false, + "type": "boolean" + } + } + }, + "QuantizationSearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "ignore": { + "description": "If true, quantized vectors are ignored. Default is false.", + "default": false, + "type": "boolean" + }, + "rescore": { + "description": "If true, use original vectors to re-score top-k results. Might require more time in case if original vectors are stored on disk. If not set, qdrant decides automatically apply rescoring or not.", + "default": null, + "type": "boolean", + "nullable": true + }, + "oversampling": { + "description": "Oversampling factor for quantization. Default is 1.0.\n\nDefines how many extra vectors should be pre-selected using quantized index, and then re-scored using original vectors.\n\nFor example, if `oversampling` is 2.4 and `limit` is 100, then 240 vectors will be pre-selected using quantized index, and then top-100 will be returned after re-scoring.", + "default": null, + "type": "number", + "format": "double", + "minimum": 1, + "nullable": true + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "description": "Shard Key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + }, + "order_value": { + "description": "Order-by value", + "anyOf": [ + { + "$ref": "#/components/schemas/OrderValue" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "description": "`Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.", + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which can be ids of points that are already stored in the collection, raw vectors, or even ids and vectors combined.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to the `strategy` chosen.", + "type": "object", + "required": [ + "limit" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "positive": { + "description": "Look for vectors closest to those", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "strategy": { + "description": "How to use positive and negative examples to find the results", + "anyOf": [ + { + "$ref": "#/components/schemas/RecommendStrategy" + }, + { + "nullable": true + } + ] + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Options for specifying which vectors to include into response. Default is false.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "RecommendExample": { + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/SparseVector" + } + ] + }, + "RecommendStrategy": { + "description": "How to use positive and negative examples to find the results, default is `average_vector`:\n\n* `average_vector` - Average positive and negative vectors and create a single query with the formula `query = avg_pos + avg_pos - avg_neg`. Then performs normal search.\n\n* `best_score` - Uses custom search objective. Each candidate is compared against all examples, its score is then chosen from the `max(max_pos_score, max_neg_score)`. If the `max_neg_score` is chosen then it is squared and negated, otherwise it is just the `max_pos_score`.", + "type": "string", + "enum": [ + "average_vector", + "best_score" + ] + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "LookupLocation": { + "description": "Defines a location to use for looking up the vector. Specifies collection and vector field name.", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection used for lookup", + "type": "string" + }, + "vector": { + "description": "Optional name of the vector field within the collection. If not provided, the default vector field will be used.", + "default": null, + "type": "string", + "nullable": true + }, + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is true.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + }, + "order_by": { + "description": "Order the records by a payload field.", + "anyOf": [ + { + "$ref": "#/components/schemas/OrderByInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "OrderByInterface": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/OrderBy" + } + ] + }, + "OrderBy": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key to order by", + "type": "string" + }, + "direction": { + "description": "Direction of ordering: `asc` or `desc`. Default is ascending.", + "anyOf": [ + { + "$ref": "#/components/schemas/Direction" + }, + { + "nullable": true + } + ] + }, + "start_from": { + "description": "Which payload value to start scrolling from. Default is the lowest value for `asc` and the highest for `desc`", + "anyOf": [ + { + "$ref": "#/components/schemas/StartFrom" + }, + { + "nullable": true + } + ] + } + } + }, + "Direction": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "StartFrom": { + "anyOf": [ + { + "type": "integer", + "format": "int64" + }, + { + "type": "number", + "format": "double" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "For auto sharding: Number of shards in collection. - Default is 1 for standalone, otherwise equal to the number of nodes - Minimum is 1 For custom sharding: Number of shards in collection per shard group. - Default is 1, meaning that each shard key will be mapped to a single shard - Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "sharding_method": { + "description": "Sharding method Default is Auto - points are distributed across all available shards Custom - points are distributed across shards according to shard key", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/ShardingMethod" + }, + { + "nullable": true + } + ] + }, + "replication_factor": { + "description": "Number of shards replicas. Default is 1 Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "init_from": { + "description": "Specify other collection to copy data from.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/InitFrom" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Quantization parameters. If none - quantization is disabled.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + }, + "sparse_vectors": { + "description": "Sparse vector data config.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorParams" + }, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.\n\nMemmap storage is disabled by default, to enable it, set this threshold to a reasonable value.\n\nTo disable memmap storage, set this to `0`.\n\nNote: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing\n\nDefault value is 20,000, based on .\n\nTo disable vector indexing, set to `0`.\n\nNote: 1kB = 1 vector of size 256.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Max number of threads (jobs) for running optimizations per shard. Note: each optimization job will also use `max_indexing_threads` threads by itself for index building. If null - have no limit and choose dynamically to saturate CPU. If 0 - no optimization threads, optimizations will be disabled.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "InitFrom": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "type": "string" + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "vectors": { + "description": "Map of vector data parameters to update for each named vector. To update parameters in a collection having a single unnamed vector, use an empty string as name.", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorsConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - it is left unchanged. This operation is blocking, it will only proceed once all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Collection base params. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionParamsDiff" + }, + { + "nullable": true + } + ] + }, + "hnsw_config": { + "description": "HNSW parameters to update for the collection index. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Quantization parameters to update. If none - it is left unchanged.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfigDiff" + }, + { + "nullable": true + } + ] + }, + "sparse_vectors": { + "description": "Map of sparse vector data parameters to update for each sparse vector.", + "anyOf": [ + { + "$ref": "#/components/schemas/SparseVectorsConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "VectorsConfigDiff": { + "description": "Vector update params for multiple vectors\n\n{ \"vector_name\": { \"hnsw_config\": { \"m\": 8 } } }", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParamsDiff" + } + }, + "VectorParamsDiff": { + "type": "object", + "properties": { + "hnsw_config": { + "description": "Update params for HNSW index. If empty object - it will be unset.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Update params for quantization. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfigDiff" + }, + { + "nullable": true + } + ] + }, + "on_disk": { + "description": "If true, vectors are served from disk, improving RAM usage at the cost of latency", + "type": "boolean", + "nullable": true + } + } + }, + "QuantizationConfigDiff": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScalarQuantization" + }, + { + "$ref": "#/components/schemas/ProductQuantization" + }, + { + "$ref": "#/components/schemas/BinaryQuantization" + }, + { + "$ref": "#/components/schemas/Disabled" + } + ] + }, + "Disabled": { + "type": "string", + "enum": [ + "Disabled" + ] + }, + "CollectionParamsDiff": { + "type": "object", + "properties": { + "replication_factor": { + "description": "Number of replicas for each shard", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Minimal number successful responses from replicas to consider operation successful", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "read_fan_out_factor": { + "description": "Fan-out every read request to these many additional remote nodes (and return first available response)", + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + } + } + }, + "SparseVectorsConfig": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorParams" + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointInsertOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "PointsBatch": { + "type": "object", + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Vector" + } + } + } + ] + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "SetPayload": { + "description": "This data structure is used in API interface and applied across multiple shards", + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Assigns payload to each point that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "key": { + "description": "Assigns payload to each point that satisfy this path of property", + "type": "string", + "nullable": true + } + } + }, + "DeletePayload": { + "description": "This data structure is used in API interface and applied across multiple shards", + "type": "object", + "required": [ + "keys" + ], + "properties": { + "keys": { + "description": "List of payload keys to remove from payload", + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "message_send_failures", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + }, + "message_send_failures": { + "description": "Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MessageSendErrors" + } + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "description": "Role of the peer in the consensus", + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "MessageSendErrors": { + "description": "Message send failures for a particular peer", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "latest_error": { + "type": "string", + "nullable": true + }, + "latest_error_timestamp": { + "description": "Timestamp of the latest error", + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "checksum": { + "type": "string", + "nullable": true + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "shard_key": { + "description": "User-defined sharding key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ReplicaState": { + "description": "State of the single shard within a replica set.", + "type": "string", + "enum": [ + "Active", + "Dead", + "Partial", + "Initializing", + "Listener", + "PartialSnapshot", + "Recovery" + ] + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "shard_key": { + "description": "User-defined sharding key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "sync", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "description": "Source peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "description": "Destination peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sync": { + "description": "If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another", + "type": "boolean" + }, + "method": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardTransferMethod" + }, + { + "nullable": true + } + ] + }, + "comment": { + "description": "A human-readable report of the transfer progress. Available only on the source peer.", + "type": "string", + "nullable": true + } + } + }, + "ShardTransferMethod": { + "description": "Methods for transferring a shard from one node to another.", + "oneOf": [ + { + "description": "Stream all shard records in batches until the whole shard is transferred.", + "type": "string", + "enum": [ + "stream_records" + ] + }, + { + "description": "Snapshot the shard, transfer and restore it on the receiver.", + "type": "string", + "enum": [ + "snapshot" + ] + }, + { + "description": "Attempt to transfer shard difference by WAL delta.", + "type": "string", + "enum": [ + "wal_delta" + ] + } + ] + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster", + "collections", + "id", + "requests" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "collections": { + "$ref": "#/components/schemas/CollectionsTelemetry" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterTelemetry" + }, + "requests": { + "$ref": "#/components/schemas/RequestsTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "name", + "startup", + "version" + ], + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppFeaturesTelemetry" + }, + { + "nullable": true + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + { + "nullable": true + } + ] + }, + "jwt_rbac": { + "type": "boolean", + "nullable": true + }, + "startup": { + "type": "string", + "format": "date-time" + } + } + }, + "AppFeaturesTelemetry": { + "type": "object", + "required": [ + "debug", + "recovery_mode", + "service_debug_feature", + "web_feature" + ], + "properties": { + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + }, + "recovery_mode": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "CollectionsTelemetry": { + "type": "object", + "required": [ + "number_of_collections" + ], + "properties": { + "number_of_collections": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetryEnum" + }, + "nullable": true + } + } + }, + "CollectionTelemetryEnum": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionTelemetry" + }, + { + "$ref": "#/components/schemas/CollectionsAggregatedTelemetry" + } + ] + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time_ms", + "shards", + "transfers" + ], + "properties": { + "id": { + "type": "string" + }, + "init_time_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplicaSetTelemetry" + } + }, + "transfers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "ReplicaSetTelemetry": { + "type": "object", + "required": [ + "id", + "remote", + "replicate_states" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "local": { + "anyOf": [ + { + "$ref": "#/components/schemas/LocalShardTelemetry" + }, + { + "nullable": true + } + ] + }, + "remote": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardTelemetry" + } + }, + "replicate_states": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ReplicaState" + } + } + } + }, + "LocalShardTelemetry": { + "type": "object", + "required": [ + "optimizations", + "segments" + ], + "properties": { + "variant_name": { + "type": "string", + "nullable": true + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizations": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index_searches" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index_searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorIndexSearchesTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_indexed_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type", + "vector_data" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_indexed_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + }, + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "VectorDataInfo": { + "type": "object", + "required": [ + "num_deleted_vectors", + "num_indexed_vectors", + "num_vectors" + ], + "properties": { + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_indexed_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "SegmentConfig": { + "type": "object", + "required": [ + "payload_storage_type" + ], + "properties": { + "vector_data": { + "default": {}, + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "sparse_vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorDataConfig" + } + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "index", + "size", + "storage_type" + ], + "properties": { + "size": { + "description": "Size/dimensionality of the vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "storage_type": { + "$ref": "#/components/schemas/VectorStorageType" + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "quantization_config": { + "description": "Vector specific quantization config that overrides collection config", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + }, + "multivector_config": { + "description": "Vector specific configuration to enable multiple vectors per point", + "anyOf": [ + { + "$ref": "#/components/schemas/MultiVectorConfig" + }, + { + "nullable": true + } + ] + }, + "datatype": { + "description": "Vector specific configuration to set specific storage element type", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStorageDatatype" + }, + { + "nullable": true + } + ] + } + } + }, + "VectorStorageType": { + "description": "Storage types for vectors", + "oneOf": [ + { + "description": "Storage in memory (RAM)\n\nWill be very fast at the cost of consuming a lot of memory.", + "type": "string", + "enum": [ + "Memory" + ] + }, + { + "description": "Storage in mmap file, not appendable\n\nSearch performance is defined by disk speed and the fraction of vectors that fit in memory.", + "type": "string", + "enum": [ + "Mmap" + ] + }, + { + "description": "Storage in chunked mmap files, appendable\n\nSearch performance is defined by disk speed and the fraction of vectors that fit in memory.", + "type": "string", + "enum": [ + "ChunkedMmap" + ] + } + ] + }, + "Indexes": { + "description": "Vector index configuration", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "VectorStorageDatatype": { + "description": "Storage types for vectors", + "type": "string", + "enum": [ + "float32", + "float16", + "uint8" + ] + }, + "SparseVectorDataConfig": { + "description": "Config of single sparse vector data storage", + "type": "object", + "required": [ + "index" + ], + "properties": { + "index": { + "$ref": "#/components/schemas/SparseIndexConfig" + } + } + }, + "SparseIndexConfig": { + "description": "Configuration for sparse inverted index.", + "type": "object", + "required": [ + "index_type" + ], + "properties": { + "full_scan_threshold": { + "description": "We prefer a full scan search upto (excluding) this number of vectors.\n\nNote: this is number of vectors, not KiloBytes.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "index_type": { + "$ref": "#/components/schemas/SparseIndexType" + }, + "datatype": { + "description": "Datatype used to store weights in the index.", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStorageDatatype" + }, + { + "nullable": true + } + ] + } + } + }, + "SparseIndexType": { + "description": "Sparse index types", + "oneOf": [ + { + "description": "Mutable RAM sparse index", + "type": "string", + "enum": [ + "MutableRam" + ] + }, + { + "description": "Immutable RAM sparse index", + "type": "string", + "enum": [ + "ImmutableRam" + ] + }, + { + "description": "Mmap sparse index", + "type": "string", + "enum": [ + "Mmap" + ] + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexSearchesTelemetry": { + "type": "object", + "required": [ + "filtered_exact", + "filtered_large_cardinality", + "filtered_plain", + "filtered_small_cardinality", + "filtered_sparse", + "unfiltered_exact", + "unfiltered_hnsw", + "unfiltered_plain", + "unfiltered_sparse" + ], + "properties": { + "index_name": { + "type": "string", + "nullable": true + }, + "unfiltered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_hnsw": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_sparse": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_small_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_large_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_sparse": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "OperationDurationStatistics": { + "type": "object", + "required": [ + "count", + "total_duration_micros" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "avg_duration_micros": { + "description": "The average time taken by 128 latest operations, calculated as a weighted mean.", + "type": "number", + "format": "float", + "nullable": true + }, + "min_duration_micros": { + "description": "The minimum duration of the operations across all the measurements.", + "type": "number", + "format": "float", + "nullable": true + }, + "max_duration_micros": { + "description": "The maximum duration of the operations across all the measurements.", + "type": "number", + "format": "float", + "nullable": true + }, + "total_duration_micros": { + "description": "The total duration of all operations in microseconds.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "last_responded": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "field_name": { + "type": "string", + "nullable": true + }, + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "type": "object", + "required": [ + "log", + "optimizations", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "optimizations": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "log": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TrackerTelemetry" + } + } + } + }, + "TrackerTelemetry": { + "description": "Tracker object used in telemetry", + "type": "object", + "required": [ + "name", + "segment_ids", + "start_at", + "status" + ], + "properties": { + "name": { + "description": "Name of the optimizer", + "type": "string" + }, + "segment_ids": { + "description": "Segment IDs being optimized", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + }, + "status": { + "$ref": "#/components/schemas/TrackerStatus" + }, + "start_at": { + "description": "Start time of the optimizer", + "type": "string", + "format": "date-time" + }, + "end_at": { + "description": "End time of the optimizer", + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "TrackerStatus": { + "description": "Represents the current state of the optimizer being tracked", + "oneOf": [ + { + "type": "string", + "enum": [ + "optimizing", + "done" + ] + }, + { + "type": "object", + "required": [ + "cancelled" + ], + "properties": { + "cancelled": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "RemoteShardTelemetry": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "searches": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "CollectionsAggregatedTelemetry": { + "type": "object", + "required": [ + "optimizers_status", + "params", + "vectors" + ], + "properties": { + "vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "optimizers_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + } + } + }, + "ClusterTelemetry": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterStatusTelemetry" + }, + { + "nullable": true + } + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatusTelemetry": { + "type": "object", + "required": [ + "commit", + "consensus_thread_status", + "is_voter", + "number_of_peers", + "pending_operations", + "term" + ], + "properties": { + "number_of_peers": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "term": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "role": { + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "type": "boolean" + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "RequestsTelemetry": { + "type": "object", + "required": [ + "grpc", + "rest" + ], + "properties": { + "rest": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc": { + "$ref": "#/components/schemas/GrpcTelemetry" + } + } + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + } + }, + "GrpcTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/ReplicateShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + }, + { + "$ref": "#/components/schemas/DropReplicaOperation" + }, + { + "$ref": "#/components/schemas/CreateShardingKeyOperation" + }, + { + "$ref": "#/components/schemas/DropShardingKeyOperation" + }, + { + "$ref": "#/components/schemas/RestartTransferOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "method": { + "description": "Method for transferring the shard from one node to another", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardTransferMethod" + }, + { + "nullable": true + } + ] + } + } + }, + "ReplicateShardOperation": { + "type": "object", + "required": [ + "replicate_shard" + ], + "properties": { + "replicate_shard": { + "$ref": "#/components/schemas/ReplicateShard" + } + } + }, + "ReplicateShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "method": { + "description": "Method for transferring the shard from one node to another", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardTransferMethod" + }, + { + "nullable": true + } + ] + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/AbortShardTransfer" + } + } + }, + "AbortShardTransfer": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "DropReplicaOperation": { + "type": "object", + "required": [ + "drop_replica" + ], + "properties": { + "drop_replica": { + "$ref": "#/components/schemas/Replica" + } + } + }, + "Replica": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CreateShardingKeyOperation": { + "type": "object", + "required": [ + "create_sharding_key" + ], + "properties": { + "create_sharding_key": { + "$ref": "#/components/schemas/CreateShardingKey" + } + } + }, + "CreateShardingKey": { + "type": "object", + "required": [ + "shard_key" + ], + "properties": { + "shard_key": { + "$ref": "#/components/schemas/ShardKey" + }, + "shards_number": { + "description": "How many shards to create for this key If not specified, will use the default value from config", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "replication_factor": { + "description": "How many replicas to create for each shard If not specified, will use the default value from config", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "placement": { + "description": "Placement of shards for this key List of peer ids, that can be used to place shards for this key If not specified, will be randomly placed among all peers", + "type": "array", + "items": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "nullable": true + } + } + }, + "DropShardingKeyOperation": { + "type": "object", + "required": [ + "drop_sharding_key" + ], + "properties": { + "drop_sharding_key": { + "$ref": "#/components/schemas/DropShardingKey" + } + } + }, + "DropShardingKey": { + "type": "object", + "required": [ + "shard_key" + ], + "properties": { + "shard_key": { + "$ref": "#/components/schemas/ShardKey" + } + } + }, + "RestartTransferOperation": { + "type": "object", + "required": [ + "restart_transfer" + ], + "properties": { + "restart_transfer": { + "$ref": "#/components/schemas/RestartTransfer" + } + } + }, + "RestartTransfer": { + "type": "object", + "required": [ + "from_peer_id", + "method", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "method": { + "$ref": "#/components/schemas/ShardTransferMethod" + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "LocksOption": { + "type": "object", + "required": [ + "write" + ], + "properties": { + "error_message": { + "type": "string", + "nullable": true + }, + "write": { + "type": "boolean" + } + } + }, + "SnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "description": "Examples: - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot` - Local path `file:///qdrant/snapshots/test_collection-2022-08-04-10-49-10.snapshot`", + "type": "string", + "format": "uri" + }, + "priority": { + "description": "Defines which data should be used as a source of truth if there are other replicas in the cluster. If set to `Snapshot`, the snapshot will be used as a source of truth, and the current state will be overwritten. If set to `Replica`, the current state will be used as a source of truth, and after recovery if will be synchronized with the snapshot.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/SnapshotPriority" + }, + { + "nullable": true + } + ] + }, + "checksum": { + "description": "Optional SHA256 checksum to verify snapshot integrity before recovery.", + "default": null, + "type": "string", + "nullable": true + }, + "api_key": { + "description": "Optional API key used when fetching the snapshot from a remote URL.", + "default": null, + "type": "string", + "nullable": true + } + } + }, + "SnapshotPriority": { + "description": "Defines source of truth for snapshot recovery: `NoSync` means - restore snapshot without *any* additional synchronization. `Snapshot` means - prefer snapshot data over the current state. `Replica` means - prefer existing data over the snapshot.", + "type": "string", + "enum": [ + "no_sync", + "snapshot", + "replica" + ] + }, + "CollectionsAliasesResponse": { + "type": "object", + "required": [ + "aliases" + ], + "properties": { + "aliases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasDescription" + } + } + } + }, + "AliasDescription": { + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "alias_name": { + "type": "string" + }, + "collection_name": { + "type": "string" + } + } + }, + "WriteOrdering": { + "description": "Defines write ordering guarantees for collection operations\n\n* `weak` - write operations may be reordered, works faster, default\n\n* `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change\n\n* `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down", + "type": "string", + "enum": [ + "weak", + "medium", + "strong" + ] + }, + "ReadConsistency": { + "description": "Read consistency parameter\n\nDefines how many replicas should be queried to get the result\n\n* `N` - send N random request and return points, which present on all of them\n\n* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of them\n\n* `all` - send requests to all nodes and return points which present on all of them\n\nDefault value is `Factor(1)`", + "anyOf": [ + { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + { + "$ref": "#/components/schemas/ReadConsistencyType" + } + ] + }, + "ReadConsistencyType": { + "description": "* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of nodes\n\n* `all` - send requests to all nodes and return points which present on all nodes", + "type": "string", + "enum": [ + "majority", + "quorum", + "all" + ] + }, + "UpdateVectors": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "Points with named vectors", + "type": "array", + "items": { + "$ref": "#/components/schemas/PointVectors" + }, + "minItems": 1 + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointVectors": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + } + } + }, + "DeleteVectors": { + "type": "object", + "required": [ + "vector" + ], + "properties": { + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector names", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointGroup": { + "type": "object", + "required": [ + "hits", + "id" + ], + "properties": { + "hits": { + "description": "Scored points that have the same value of the group_by key", + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + }, + "id": { + "$ref": "#/components/schemas/GroupId" + }, + "lookup": { + "description": "Record that has been looked up using the group id", + "anyOf": [ + { + "$ref": "#/components/schemas/Record" + }, + { + "nullable": true + } + ] + } + } + }, + "GroupId": { + "description": "Value of the group_by key, shared across all the hits in the group", + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "integer", + "format": "int64" + } + ] + }, + "SearchGroupsRequest": { + "type": "object", + "required": [ + "group_by", + "group_size", + "limit", + "vector" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Options for specifying which vectors to include into response. Default is false.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "group_by": { + "description": "Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.", + "type": "string", + "minLength": 1 + }, + "group_size": { + "description": "Maximum amount of points to return per group", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "limit": { + "description": "Maximum amount of groups to return", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "with_lookup": { + "description": "Look for points in another collection using the group ids", + "anyOf": [ + { + "$ref": "#/components/schemas/WithLookupInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "WithLookupInterface": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/WithLookup" + } + ] + }, + "WithLookup": { + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection to use for points lookup", + "type": "string" + }, + "with_payload": { + "description": "Options for specifying which payload to include (or not)", + "default": true, + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vectors": { + "description": "Options for specifying which vectors to include (or not)", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + } + } + }, + "RecommendGroupsRequest": { + "type": "object", + "required": [ + "group_by", + "group_size", + "limit" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "positive": { + "description": "Look for vectors closest to those", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "strategy": { + "description": "How to use positive and negative examples to find the results", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/RecommendStrategy" + }, + { + "nullable": true + } + ] + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Options for specifying which vectors to include into response. Default is false.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + }, + "group_by": { + "description": "Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.", + "type": "string", + "minLength": 1 + }, + "group_size": { + "description": "Maximum amount of points to return per group", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "limit": { + "description": "Maximum amount of groups to return", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "with_lookup": { + "description": "Look for points in another collection using the group ids", + "anyOf": [ + { + "$ref": "#/components/schemas/WithLookupInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "GroupsResult": { + "type": "object", + "required": [ + "groups" + ], + "properties": { + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointGroup" + } + } + } + }, + "UpdateOperations": { + "type": "object", + "required": [ + "operations" + ], + "properties": { + "operations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateOperation" + } + } + } + }, + "UpdateOperation": { + "anyOf": [ + { + "$ref": "#/components/schemas/UpsertOperation" + }, + { + "$ref": "#/components/schemas/DeleteOperation" + }, + { + "$ref": "#/components/schemas/SetPayloadOperation" + }, + { + "$ref": "#/components/schemas/OverwritePayloadOperation" + }, + { + "$ref": "#/components/schemas/DeletePayloadOperation" + }, + { + "$ref": "#/components/schemas/ClearPayloadOperation" + }, + { + "$ref": "#/components/schemas/UpdateVectorsOperation" + }, + { + "$ref": "#/components/schemas/DeleteVectorsOperation" + } + ] + }, + "UpsertOperation": { + "type": "object", + "required": [ + "upsert" + ], + "properties": { + "upsert": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + }, + "DeleteOperation": { + "type": "object", + "required": [ + "delete" + ], + "properties": { + "delete": { + "$ref": "#/components/schemas/PointsSelector" + } + } + }, + "SetPayloadOperation": { + "type": "object", + "required": [ + "set_payload" + ], + "properties": { + "set_payload": { + "$ref": "#/components/schemas/SetPayload" + } + } + }, + "OverwritePayloadOperation": { + "type": "object", + "required": [ + "overwrite_payload" + ], + "properties": { + "overwrite_payload": { + "$ref": "#/components/schemas/SetPayload" + } + } + }, + "DeletePayloadOperation": { + "type": "object", + "required": [ + "delete_payload" + ], + "properties": { + "delete_payload": { + "$ref": "#/components/schemas/DeletePayload" + } + } + }, + "ClearPayloadOperation": { + "type": "object", + "required": [ + "clear_payload" + ], + "properties": { + "clear_payload": { + "$ref": "#/components/schemas/PointsSelector" + } + } + }, + "UpdateVectorsOperation": { + "type": "object", + "required": [ + "update_vectors" + ], + "properties": { + "update_vectors": { + "$ref": "#/components/schemas/UpdateVectors" + } + } + }, + "DeleteVectorsOperation": { + "type": "object", + "required": [ + "delete_vectors" + ], + "properties": { + "delete_vectors": { + "$ref": "#/components/schemas/DeleteVectors" + } + } + }, + "ShardSnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "$ref": "#/components/schemas/ShardSnapshotLocation" + }, + "priority": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/SnapshotPriority" + }, + { + "nullable": true + } + ] + }, + "checksum": { + "description": "Optional SHA256 checksum to verify snapshot integrity before recovery.", + "default": null, + "type": "string", + "nullable": true + }, + "api_key": { + "description": "Optional API key used when fetching the snapshot from a remote URL.", + "default": null, + "type": "string", + "nullable": true + } + } + }, + "ShardSnapshotLocation": { + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "string" + } + ] + }, + "DiscoverRequest": { + "description": "Use context and a target to find the most similar points, constrained by the context.", + "type": "object", + "required": [ + "limit" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "target": { + "description": "Look for vectors closest to this.\n\nWhen using the target (with or without context), the integer part of the score represents the rank with respect to the context, while the decimal part of the score relates to the distance to the target.", + "anyOf": [ + { + "$ref": "#/components/schemas/RecommendExample" + }, + { + "nullable": true + } + ] + }, + "context": { + "description": "Pairs of { positive, negative } examples to constrain the search.\n\nWhen using only the context (without a target), a special search - called context search - is performed where pairs of points are used to generate a loss that guides the search towards the zone where most positive examples overlap. This means that the score minimizes the scenario of finding a point closer to a negative than to a positive part of a pair.\n\nSince the score of a context relates to loss, the maximum score a point can get is 0.0, and it becomes normal that many points can have a score of 0.0.\n\nFor discovery search (when including a target), the context part of the score for each pair is calculated +1 if the point is closer to a positive than to a negative part of a pair, and -1 otherwise.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ContextExamplePair" + }, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Options for specifying which vectors to include into response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "ContextExamplePair": { + "type": "object", + "required": [ + "negative", + "positive" + ], + "properties": { + "positive": { + "$ref": "#/components/schemas/RecommendExample" + }, + "negative": { + "$ref": "#/components/schemas/RecommendExample" + } + } + }, + "DiscoverRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DiscoverRequest" + } + } + } + }, + "VersionInfo": { + "type": "object", + "required": [ + "title", + "version" + ], + "properties": { + "title": { + "type": "string" + }, + "version": { + "type": "string" + }, + "commit": { + "type": "string", + "nullable": true + } + } + }, + "CollectionExistence": { + "description": "State of existence of a collection, true = exists, false = does not exist", + "type": "object", + "required": [ + "exists" + ], + "properties": { + "exists": { + "type": "boolean" + } + } + }, + "QueryRequest": { + "type": "object", + "properties": { + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "prefetch": { + "description": "Sub-requests to perform first. If present, the query will be performed on the results of the prefetch(es).", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/Prefetch" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Prefetch" + } + }, + { + "nullable": true + } + ] + }, + "query": { + "description": "Query to perform. If missing without prefetches, returns points ordered by their IDs.", + "anyOf": [ + { + "$ref": "#/components/schemas/QueryInterface" + }, + { + "nullable": true + } + ] + }, + "using": { + "description": "Define which vector name to use for querying. If missing, the default vector is used.", + "type": "string", + "nullable": true + }, + "filter": { + "description": "Filter conditions - return only those points that satisfy the specified conditions.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Search params for when there is no prefetch", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Return points with scores better than this threshold.", + "type": "number", + "format": "float", + "nullable": true + }, + "limit": { + "description": "Max number of points to return. Default is 10.", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "offset": { + "description": "Offset of the result. Skip this many points. Default is 0", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "with_vector": { + "description": "Options for specifying which vectors to include into the response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Options for specifying which payload to include or not. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location to use for IDs lookup, if not specified - use the current collection and the 'using' vector Note: the other collection vectors should have the same vector size as the 'using' vector in the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "Prefetch": { + "type": "object", + "properties": { + "prefetch": { + "description": "Sub-requests to perform first. If present, the query will be performed on the results of the prefetches.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/Prefetch" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Prefetch" + } + }, + { + "nullable": true + } + ] + }, + "query": { + "description": "Query to perform. If missing without prefetches, returns points ordered by their IDs.", + "anyOf": [ + { + "$ref": "#/components/schemas/QueryInterface" + }, + { + "nullable": true + } + ] + }, + "using": { + "description": "Define which vector name to use for querying. If missing, the default vector is used.", + "type": "string", + "nullable": true + }, + "filter": { + "description": "Filter conditions - return only those points that satisfy the specified conditions.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Search params for when there is no prefetch", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Return points with scores better than this threshold.", + "type": "number", + "format": "float", + "nullable": true + }, + "limit": { + "description": "Max number of points to return. Default is 10.", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "lookup_from": { + "description": "The location to use for IDs lookup, if not specified - use the current collection and the 'using' vector Note: the other collection vectors should have the same vector size as the 'using' vector in the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "QueryInterface": { + "anyOf": [ + { + "$ref": "#/components/schemas/VectorInput" + }, + { + "$ref": "#/components/schemas/Query" + } + ] + }, + "VectorInput": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/SparseVector" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "$ref": "#/components/schemas/ExtendedPointId" + } + ] + }, + "Query": { + "anyOf": [ + { + "$ref": "#/components/schemas/NearestQuery" + }, + { + "$ref": "#/components/schemas/RecommendQuery" + }, + { + "$ref": "#/components/schemas/DiscoverQuery" + }, + { + "$ref": "#/components/schemas/ContextQuery" + }, + { + "$ref": "#/components/schemas/OrderByQuery" + }, + { + "$ref": "#/components/schemas/FusionQuery" + } + ] + }, + "NearestQuery": { + "type": "object", + "required": [ + "nearest" + ], + "properties": { + "nearest": { + "$ref": "#/components/schemas/VectorInput" + } + } + }, + "RecommendQuery": { + "type": "object", + "required": [ + "recommend" + ], + "properties": { + "recommend": { + "$ref": "#/components/schemas/RecommendInput" + } + } + }, + "RecommendInput": { + "type": "object", + "properties": { + "positive": { + "description": "Look for vectors closest to the vectors from these points", + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorInput" + }, + "nullable": true + }, + "negative": { + "description": "Try to avoid vectors like the vector from these points", + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorInput" + }, + "nullable": true + }, + "strategy": { + "description": "How to use the provided vectors to find the results", + "anyOf": [ + { + "$ref": "#/components/schemas/RecommendStrategy" + }, + { + "nullable": true + } + ] + } + } + }, + "DiscoverQuery": { + "type": "object", + "required": [ + "discover" + ], + "properties": { + "discover": { + "$ref": "#/components/schemas/DiscoverInput" + } + } + }, + "DiscoverInput": { + "type": "object", + "required": [ + "context", + "target" + ], + "properties": { + "target": { + "$ref": "#/components/schemas/VectorInput" + }, + "context": { + "description": "Search space will be constrained by these pairs of vectors", + "anyOf": [ + { + "$ref": "#/components/schemas/ContextPair" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContextPair" + } + }, + { + "nullable": true + } + ] + } + } + }, + "ContextPair": { + "type": "object", + "required": [ + "negative", + "positive" + ], + "properties": { + "positive": { + "$ref": "#/components/schemas/VectorInput" + }, + "negative": { + "$ref": "#/components/schemas/VectorInput" + } + } + }, + "ContextQuery": { + "type": "object", + "required": [ + "context" + ], + "properties": { + "context": { + "$ref": "#/components/schemas/ContextInput" + } + } + }, + "ContextInput": { + "anyOf": [ + { + "$ref": "#/components/schemas/ContextPair" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContextPair" + } + }, + { + "nullable": true + } + ] + }, + "OrderByQuery": { + "type": "object", + "required": [ + "order_by" + ], + "properties": { + "order_by": { + "$ref": "#/components/schemas/OrderByInterface" + } + } + }, + "FusionQuery": { + "type": "object", + "required": [ + "fusion" + ], + "properties": { + "fusion": { + "$ref": "#/components/schemas/Fusion" + } + } + }, + "Fusion": { + "description": "Fusion algorithm allows to combine results of multiple prefetches. Available fusion algorithms: * `rrf` - Rank Reciprocal Fusion", + "type": "string", + "enum": [ + "rrf" + ] + }, + "QueryRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryRequest" + } + } + } + }, + "QueryResponse": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } +} diff --git a/docs/redoc/v1.11.x/openapi.json b/docs/redoc/v1.11.x/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..287c7147961cf3d841b05b2f085d5b1134326a27 --- /dev/null +++ b/docs/redoc/v1.11.x/openapi.json @@ -0,0 +1,12648 @@ +{ + "paths": { + "/collections/{collection_name}/shards": { + "put": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Create shard key", + "operationId": "create_shard_key", + "requestBody": { + "description": "Shard key configuration", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateShardingKey" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to create shards for", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/delete": { + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Delete shard key", + "operationId": "delete_shard_key", + "requestBody": { + "description": "Select shard key to delete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DropShardingKey" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to create shards for", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/": { + "get": { + "summary": "Returns information about the running Qdrant instance", + "description": "Returns information about the running Qdrant instance like version and commit id", + "operationId": "root", + "tags": [ + "service" + ], + "responses": { + "200": { + "description": "Qdrant server version information", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionInfo" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + }, + "/metrics": { + "get": { + "summary": "Collect Prometheus metrics data", + "description": "Collect metrics data including app info, collections info, cluster info and statistics", + "operationId": "metrics", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Metrics data in Prometheus format", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "# HELP app_info information about qdrant server\n# TYPE app_info gauge\napp_info{name=\"qdrant\",version=\"0.11.1\"} 1\n# HELP cluster_enabled is cluster support enabled\n# TYPE cluster_enabled gauge\ncluster_enabled 0\n# HELP collections_total number of collections\n# TYPE collections_total gauge\ncollections_total 1\n" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/locks": { + "post": { + "summary": "Set lock options", + "description": "Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options", + "operationId": "post_locks", + "tags": [ + "service" + ], + "requestBody": { + "description": "Lock options and optional error message", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + }, + "get": { + "summary": "Get lock options", + "description": "Get lock options. If write is locked, all write operations and collection creation are forbidden", + "operationId": "get_locks", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + } + }, + "/healthz": { + "get": { + "summary": "Kubernetes healthz endpoint", + "description": "An endpoint for health checking used in Kubernetes.", + "operationId": "healthz", + "tags": [ + "service" + ], + "responses": { + "200": { + "description": "Healthz response", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "healthz check passed" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/livez": { + "get": { + "summary": "Kubernetes livez endpoint", + "description": "An endpoint for health checking used in Kubernetes.", + "operationId": "livez", + "tags": [ + "service" + ], + "responses": { + "200": { + "description": "Healthz response", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "healthz check passed" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/readyz": { + "get": { + "summary": "Kubernetes readyz endpoint", + "description": "An endpoint for health checking used in Kubernetes.", + "operationId": "readyz", + "tags": [ + "service" + ], + "responses": { + "200": { + "description": "Healthz response", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "healthz check passed" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/issues": { + "get": { + "summary": "Get issues", + "description": "Get a report of performance issues and configuration suggestions", + "operationId": "get_issues", + "tags": [ + "beta" + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "4XX": { + "description": "error" + } + } + }, + "delete": { + "summary": "Clear issues", + "description": "Removes all issues reported so far", + "operationId": "clear_issues", + "tags": [ + "beta" + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "boolean" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/recover": { + "post": { + "tags": [ + "cluster" + ], + "summary": "Tries to recover current peer Raft state.", + "operationId": "recover_current_peer", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "force", + "in": "query", + "description": "If true - removes peer even if it has shards/replicas on it.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/exists": { + "get": { + "tags": [ + "collections" + ], + "summary": "Check the existence of a collection", + "description": "Returns \"true\" if the given collection name exists, and \"false\" otherwise", + "operationId": "collection_exists", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/CollectionExistence" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List aliases for collection", + "description": "Get list of all aliases for a collection", + "operationId": "get_collection_aliases", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections aliases", + "description": "Get list of all existing collections aliases", + "operationId": "get_collections_aliases", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/upload": { + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from an uploaded snapshot", + "description": "Recover local collection data from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_uploaded_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "priority", + "in": "query", + "description": "Defines source of truth for snapshot recovery", + "required": false, + "schema": { + "$ref": "#/components/schemas/SnapshotPriority" + } + }, + { + "name": "checksum", + "in": "query", + "description": "Optional SHA256 checksum to verify snapshot integrity before recovery.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "snapshot": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Delete collection snapshot", + "description": "Delete snapshot for a collection", + "operationId": "delete_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "parameters": [ + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots" + ], + "summary": "Delete storage snapshot", + "description": "Delete snapshot of the whole storage", + "operationId": "delete_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the full snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots/upload": { + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover shard from an uploaded snapshot", + "description": "Recover shard of a local collection from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection shard.", + "operationId": "recover_shard_from_uploaded_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard to recover", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "priority", + "in": "query", + "description": "Defines source of truth for snapshot recovery", + "required": false, + "schema": { + "$ref": "#/components/schemas/SnapshotPriority" + } + }, + { + "name": "checksum", + "in": "query", + "description": "Optional SHA256 checksum to verify snapshot integrity before recovery.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "snapshot": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover shard of a local collection data from a snapshot. This will overwrite any data, stored in this shard, for the collection.", + "operationId": "recover_shard_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard to recover", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShardSnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List shards snapshots for a collection", + "description": "Get list of snapshots for a shard of a collection", + "operationId": "list_shard_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create shard snapshot", + "description": "Create new snapshot of a shard for a collection", + "operationId": "create_shard_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Delete shard snapshot", + "description": "Delete snapshot of a shard for a collection", + "operationId": "delete_shard_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot of a shard from a collection as a file", + "operationId": "get_shard_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/vectors": { + "put": { + "tags": [ + "points" + ], + "summary": "Update vectors", + "description": "Update specified named vectors on points, keep unspecified vectors intact.", + "operationId": "update_vectors", + "requestBody": { + "description": "Update named vectors on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateVectors" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/vectors/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete vectors", + "description": "Delete named vectors from the given points.", + "operationId": "delete_vectors", + "requestBody": { + "description": "Delete named vectors from points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteVectors" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload values for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Overwrite payload", + "description": "Replace full payload of points with new one", + "operationId": "overwrite_payload", + "requestBody": { + "description": "Payload and points selector", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Batch update points", + "description": "Apply a series of update operations for points, vectors and payloads", + "operationId": "batch_update", + "requestBody": { + "description": "update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to apply operations on", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/groups": { + "post": { + "tags": [ + "points" + ], + "summary": "Search point groups", + "description": "Retrieve closest points based on vector similarity and given filtering conditions, grouped by a given payload field", + "operationId": "search_point_groups", + "requestBody": { + "description": "Search request with optional filtering, grouped by a given payload field", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchGroupsRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/GroupsResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/groups": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend point groups", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples, grouped by a given payload field.", + "operationId": "recommend_point_groups", + "requestBody": { + "description": "Request points based on positive and negative examples, grouped by a payload field.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendGroupsRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/GroupsResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/discover": { + "post": { + "tags": [ + "points" + ], + "summary": "Discover points", + "description": "Use context and a target to find the most similar points to the target, constrained by the context.\nWhen using only the context (without a target), a special search - called context search - is performed where pairs of points are used to generate a loss that guides the search towards the zone where most positive examples overlap. This means that the score minimizes the scenario of finding a point closer to a negative than to a positive part of a pair.\nSince the score of a context relates to loss, the maximum score a point can get is 0.0, and it becomes normal that many points can have a score of 0.0.\nWhen using target (with or without context), the score behaves a little different: The integer part of the score represents the rank with respect to the context, while the decimal part of the score relates to the distance to the target. The context part of the score for each pair is calculated +1 if the point is closer to a positive than to a negative part of a pair, and -1 otherwise.\n", + "operationId": "discover_points", + "requestBody": { + "description": "Request points based on {positive, negative} pairs of examples, and/or a target", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DiscoverRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/discover/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Discover batch points", + "description": "Look for points based on target and/or positive and negative example pairs, in batch.", + "operationId": "discover_batch_points", + "requestBody": { + "description": "Batch request points based on { positive, negative } pairs of examples, and/or a target.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DiscoverRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/query": { + "post": { + "tags": [ + "points" + ], + "summary": "Query points", + "description": "Universally query points. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries.", + "operationId": "query_points", + "requestBody": { + "description": "Describes the query to make to the collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/QueryResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/query/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Query points in batch", + "description": "Universally query points in batch. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries.", + "operationId": "query_batch_points", + "requestBody": { + "description": "Describes the queries to make to the collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryResponse" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/query/groups": { + "post": { + "tags": [ + "points" + ], + "summary": "Query points, grouped by a given payload field", + "description": "Universally query points, grouped by a given payload field", + "operationId": "query_points_groups", + "requestBody": { + "description": "Describes the query to make to the collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryGroupsRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/GroupsResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [ + { + "api-key": [] + }, + { + "bearerAuth": [] + }, + {} + ], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `min_should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v1.11.x" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup." + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots." + }, + { + "name": "service", + "description": "Qdrant service utilities." + }, + { + "name": "beta", + "description": "Beta features, do not depend on these yet." + } + ], + "components": { + "securitySchemes": { + "api-key": { + "type": "apiKey", + "in": "header", + "name": "api-key", + "description": "Authorization key, either read-write or read-only" + }, + "bearerAuth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + }, + "example": { + "collections": [ + { + "name": "arivx-title" + }, + { + "name": "arivx-abstract" + }, + { + "name": "medium-title" + }, + { + "name": "medium-text" + } + ] + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "optimizer_status", + "payload_schema", + "segments_count", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "DEPRECATED: Approximate number of vectors in collection. All vectors in collection are available for querying. Calculated as `points_count x vectors_per_point`. Where `vectors_per_point` is a number of named vectors in schema.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexed_vectors_count": { + "description": "Approximate number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in a specialized vector index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "points_count": { + "description": "Approximate number of points (vectors + payloads) in collection. Each point could be accessed by unique id.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "segments_count": { + "description": "Number of segments in collection. Each segment has independent vector as payload indexes", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection. `Green` - all good. `Yellow` - optimization is running, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "grey", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + }, + "quantization_config": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParams": { + "type": "object", + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "sharding_method": { + "description": "Sharding method Default is Auto - points are distributed across all available shards Custom - points are distributed across shards according to shard key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardingMethod" + }, + { + "nullable": true + } + ] + }, + "replication_factor": { + "description": "Number of replicas for each shard", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "read_fan_out_factor": { + "description": "Defines how many additional replicas should be processing read request at the same time. Default value is Auto, which means that fan-out will be determined automatically based on the busyness of the local replica. Having more than 0 might be useful to smooth latency spikes of individual nodes.", + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + }, + "sparse_vectors": { + "description": "Configuration of the sparse vector storage", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorParams" + }, + "nullable": true + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Custom params for quantization. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + }, + "on_disk": { + "description": "If true, vectors are served from disk, improving RAM usage at the cost of latency Default: false", + "type": "boolean", + "nullable": true + }, + "datatype": { + "description": "Defines which datatype should be used to represent vectors in the storage. Choosing different datatypes allows to optimize memory usage and performance vs accuracy.\n\n- For `float32` datatype - vectors are stored as single-precision floating point numbers, 4 bytes. - For `float16` datatype - vectors are stored as half-precision floating point numbers, 2 bytes. - For `uint8` datatype - vectors are stored as unsigned 8-bit integers, 1 byte. It expects vector elements to be in range `[0, 255]`.", + "anyOf": [ + { + "$ref": "#/components/schemas/Datatype" + }, + { + "nullable": true + } + ] + }, + "multivector_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/MultiVectorConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot", + "Manhattan" + ] + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build the index.", + "type": "integer", + "format": "uint", + "minimum": 4, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in kilobytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 10, + "nullable": true + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - automatically select from 8 to 16. Best to keep between 8 and 16 to prevent likelihood of building broken/inefficient HNSW graphs. On small CPUs, less threads are used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, the index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for additional payload-aware HNSW links. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "QuantizationConfig": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScalarQuantization" + }, + { + "$ref": "#/components/schemas/ProductQuantization" + }, + { + "$ref": "#/components/schemas/BinaryQuantization" + } + ] + }, + "ScalarQuantization": { + "type": "object", + "required": [ + "scalar" + ], + "properties": { + "scalar": { + "$ref": "#/components/schemas/ScalarQuantizationConfig" + } + } + }, + "ScalarQuantizationConfig": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/ScalarType" + }, + "quantile": { + "description": "Quantile for quantization. Expected value range in [0.5, 1.0]. If not set - use the whole range of values", + "type": "number", + "format": "float", + "maximum": 1, + "minimum": 0.5, + "nullable": true + }, + "always_ram": { + "description": "If true - quantized vectors always will be stored in RAM, ignoring the config of main storage", + "type": "boolean", + "nullable": true + } + } + }, + "ScalarType": { + "type": "string", + "enum": [ + "int8" + ] + }, + "ProductQuantization": { + "type": "object", + "required": [ + "product" + ], + "properties": { + "product": { + "$ref": "#/components/schemas/ProductQuantizationConfig" + } + } + }, + "ProductQuantizationConfig": { + "type": "object", + "required": [ + "compression" + ], + "properties": { + "compression": { + "$ref": "#/components/schemas/CompressionRatio" + }, + "always_ram": { + "type": "boolean", + "nullable": true + } + } + }, + "CompressionRatio": { + "type": "string", + "enum": [ + "x4", + "x8", + "x16", + "x32", + "x64" + ] + }, + "BinaryQuantization": { + "type": "object", + "required": [ + "binary" + ], + "properties": { + "binary": { + "$ref": "#/components/schemas/BinaryQuantizationConfig" + } + } + }, + "BinaryQuantizationConfig": { + "type": "object", + "properties": { + "always_ram": { + "type": "boolean", + "nullable": true + } + } + }, + "Datatype": { + "type": "string", + "enum": [ + "float32", + "uint8", + "float16" + ] + }, + "MultiVectorConfig": { + "type": "object", + "required": [ + "comparator" + ], + "properties": { + "comparator": { + "$ref": "#/components/schemas/MultiVectorComparator" + } + } + }, + "MultiVectorComparator": { + "type": "string", + "enum": [ + "max_sim" + ] + }, + "ShardingMethod": { + "type": "string", + "enum": [ + "auto", + "custom" + ] + }, + "SparseVectorParams": { + "description": "Params of single sparse vector data storage", + "type": "object", + "properties": { + "index": { + "description": "Custom params for index. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/SparseIndexParams" + }, + { + "nullable": true + } + ] + }, + "modifier": { + "description": "Configures addition value modifications for sparse vectors. Default: none", + "anyOf": [ + { + "$ref": "#/components/schemas/Modifier" + }, + { + "nullable": true + } + ] + } + } + }, + "SparseIndexParams": { + "description": "Configuration for sparse inverted index.", + "type": "object", + "properties": { + "full_scan_threshold": { + "description": "We prefer a full scan search upto (excluding) this number of vectors.\n\nNote: this is number of vectors, not KiloBytes.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "on_disk": { + "description": "Store index on disk. If set to false, the index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "datatype": { + "description": "Defines which datatype should be used for the index. Choosing different datatypes allows to optimize memory usage and performance vs accuracy.\n\n- For `float32` datatype - vectors are stored as single-precision floating point numbers, 4 bytes. - For `float16` datatype - vectors are stored as half-precision floating point numbers, 2 bytes. - For `uint8` datatype - vectors are quantized to unsigned 8-bit integers, 1 byte. Quantization to fit byte range `[0, 255]` happens during indexing automatically, so the actual vector data does not need to conform to this range.", + "anyOf": [ + { + "$ref": "#/components/schemas/Datatype" + }, + { + "nullable": true + } + ] + } + } + }, + "Modifier": { + "description": "If used, include weight modification, which will be applied to sparse vectors at query time: None - no modification (default) Idf - inverse document frequency, based on statistics of the collection", + "type": "string", + "enum": [ + "none", + "idf" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 4 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - automatically select from 8 to 16. Best to keep between 8 and 16 to prevent likelihood of slow building or broken/inefficient HNSW graphs. On small CPUs, less threads are used.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for hnsw graph built for payload index. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "maximum": 1, + "minimum": 0 + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 100 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads. If `default_segment_number = 0`, will be automatically selected by the number of available CPUs.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexing speed is more important - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.\n\nMemmap storage is disabled by default, to enable it, set this threshold to a reasonable value.\n\nTo disable memmap storage, set this to `0`. Internally it will use the largest threshold possible.\n\nNote: 1Kb = 1 vector of size 256", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing\n\nDefault value is 20,000, based on .\n\nTo disable vector indexing, set to `0`.\n\nNote: 1kB = 1 vector of size 256.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Max number of threads (jobs) for running optimizations per shard. Note: each optimization job will also use `max_indexing_threads` threads by itself for index building. If null - have no limit and choose dynamically to saturate CPU. If 0 - no optimization threads, optimizations will be disabled.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type", + "points" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + }, + "points": { + "description": "Number of points indexed with this index", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text", + "bool", + "datetime", + "uuid" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/KeywordIndexParams" + }, + { + "$ref": "#/components/schemas/IntegerIndexParams" + }, + { + "$ref": "#/components/schemas/FloatIndexParams" + }, + { + "$ref": "#/components/schemas/GeoIndexParams" + }, + { + "$ref": "#/components/schemas/TextIndexParams" + }, + { + "$ref": "#/components/schemas/BoolIndexParams" + }, + { + "$ref": "#/components/schemas/DatetimeIndexParams" + }, + { + "$ref": "#/components/schemas/UuidIndexParams" + } + ] + }, + "KeywordIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/KeywordIndexType" + }, + "is_tenant": { + "description": "If true - used for tenant optimization. Default: false.", + "type": "boolean", + "nullable": true + }, + "on_disk": { + "description": "If true, store the index on disk. Default: false.", + "type": "boolean", + "nullable": true + } + } + }, + "KeywordIndexType": { + "type": "string", + "enum": [ + "keyword" + ] + }, + "IntegerIndexParams": { + "type": "object", + "required": [ + "lookup", + "range", + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/IntegerIndexType" + }, + "lookup": { + "description": "If true - support direct lookups.", + "type": "boolean" + }, + "range": { + "description": "If true - support ranges filters.", + "type": "boolean" + }, + "is_principal": { + "description": "If true - use this key to organize storage of the collection data. This option assumes that this key will be used in majority of filtered requests.", + "type": "boolean", + "nullable": true + }, + "on_disk": { + "description": "If true, store the index on disk. Default: false.", + "type": "boolean", + "nullable": true + } + } + }, + "IntegerIndexType": { + "type": "string", + "enum": [ + "integer" + ] + }, + "FloatIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/FloatIndexType" + }, + "is_principal": { + "description": "If true - use this key to organize storage of the collection data. This option assumes that this key will be used in majority of filtered requests.", + "type": "boolean", + "nullable": true + }, + "on_disk": { + "description": "If true, store the index on disk. Default: false.", + "type": "boolean", + "nullable": true + } + } + }, + "FloatIndexType": { + "type": "string", + "enum": [ + "float" + ] + }, + "GeoIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/GeoIndexType" + } + } + }, + "GeoIndexType": { + "type": "string", + "enum": [ + "geo" + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true.", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word", + "multilingual" + ] + }, + "BoolIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/BoolIndexType" + } + } + }, + "BoolIndexType": { + "type": "string", + "enum": [ + "bool" + ] + }, + "DatetimeIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/DatetimeIndexType" + }, + "is_principal": { + "description": "If true - use this key to organize storage of the collection data. This option assumes that this key will be used in majority of filtered requests.", + "type": "boolean", + "nullable": true + }, + "on_disk": { + "description": "If true, store the index on disk. Default: false.", + "type": "boolean", + "nullable": true + } + } + }, + "DatetimeIndexType": { + "type": "string", + "enum": [ + "datetime" + ] + }, + "UuidIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/UuidIndexType" + }, + "is_tenant": { + "description": "If true - used for tenant optimization.", + "type": "boolean", + "nullable": true + }, + "on_disk": { + "description": "If true, store the index on disk. Default: false.", + "type": "boolean", + "nullable": true + } + } + }, + "UuidIndexType": { + "type": "string", + "enum": [ + "uuid" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is true.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ShardKeySelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardKey" + } + } + ] + }, + "ShardKey": { + "anyOf": [ + { + "type": "string", + "example": "region_1" + }, + { + "type": "integer", + "format": "uint64", + "minimum": 0, + "example": 12 + } + ] + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0, + "example": 42 + }, + { + "type": "string", + "format": "uuid", + "example": "550e8400-e29b-41d4-a716-446655440000" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "description": "Shard Key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + }, + "order_value": { + "anyOf": [ + { + "$ref": "#/components/schemas/OrderValue" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true, + "example": { + "city": "London", + "color": "green" + } + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + }, + "example": [ + 0.875, + 0.140625, + 0.897599995136261 + ] + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "example": [ + [ + 0.875, + 0.140625, + 0.11020000278949738 + ], + [ + 0.7580000162124634, + 0.28126001358032227, + 0.9687100052833557 + ], + [ + 0.6209999918937683, + 0.42187801003456116, + 0.9375 + ] + ] + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Vector" + }, + "example": { + "image-embeddings": [ + 0.8730000257492065, + 0.140625, + 0.897599995136261 + ] + } + } + ] + }, + "Vector": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/SparseVector" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SparseVector": { + "description": "Sparse vector structure", + "type": "object", + "required": [ + "indices", + "values" + ], + "properties": { + "indices": { + "description": "Indices must be unique", + "type": "array", + "items": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "values": { + "description": "Values and indices must be the same length", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "OrderValue": { + "anyOf": [ + { + "type": "integer", + "format": "int64", + "example": 42 + }, + { + "type": "number", + "format": "double", + "example": 42.5 + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Options for specifying which vectors to include into response. Default is false.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unnamed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + }, + { + "$ref": "#/components/schemas/NamedSparseVector" + } + ] + }, + "NamedVector": { + "description": "Dense vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "NamedSparseVector": { + "description": "Sparse vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "$ref": "#/components/schemas/SparseVector" + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/Condition" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + } + }, + { + "nullable": true + } + ] + }, + "min_should": { + "description": "At least minimum amount of given conditions should match", + "anyOf": [ + { + "$ref": "#/components/schemas/MinShould" + }, + { + "nullable": true + } + ] + }, + "must": { + "description": "All conditions must match", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/Condition" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + } + }, + { + "nullable": true + } + ] + }, + "must_not": { + "description": "All conditions must NOT match", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/Condition" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + } + }, + { + "nullable": true + } + ] + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/IsNullCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/NestedCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/RangeInterface" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "geo_polygon": { + "description": "Check if geo point is within a given polygon", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoPolygon" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + }, + { + "$ref": "#/components/schemas/MatchAny" + }, + { + "$ref": "#/components/schemas/MatchExcept" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "MatchAny": { + "description": "Exact match on any of the given values", + "type": "object", + "required": [ + "any" + ], + "properties": { + "any": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "AnyVariants": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "uniqueItems": true + } + ] + }, + "MatchExcept": { + "description": "Should have at least one value not matching the any given values", + "type": "object", + "required": [ + "except" + ], + "properties": { + "except": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "RangeInterface": { + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "$ref": "#/components/schemas/DatetimeRange" + } + ] + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "DatetimeRange": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "string", + "format": "date-time", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "string", + "format": "date-time", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "string", + "format": "date-time", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "GeoPolygon": { + "description": "Geo filter request\n\nMatches coordinates inside the polygon, defined by `exterior` and `interiors`", + "type": "object", + "required": [ + "exterior" + ], + "properties": { + "exterior": { + "$ref": "#/components/schemas/GeoLineString" + }, + "interiors": { + "description": "Interior lines (if present) bound holes within the surface each GeoLineString must consist of a minimum of 4 points, and the first and last points must be the same.", + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoLineString" + }, + "nullable": true + } + } + }, + "GeoLineString": { + "description": "Ordered sequence of GeoPoints representing the line", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoPoint" + } + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "IsNullCondition": { + "description": "Select points with null payload for a specified field", + "type": "object", + "required": [ + "is_null" + ], + "properties": { + "is_null": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "NestedCondition": { + "type": "object", + "required": [ + "nested" + ], + "properties": { + "nested": { + "$ref": "#/components/schemas/Nested" + } + } + }, + "Nested": { + "description": "Select points with payload for a specified nested field", + "type": "object", + "required": [ + "filter", + "key" + ], + "properties": { + "key": { + "type": "string" + }, + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "MinShould": { + "type": "object", + "required": [ + "conditions", + "min_count" + ], + "properties": { + "conditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + } + }, + "min_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "exact": { + "description": "Search without approximation. If set to true, search may run long but with exact results.", + "default": false, + "type": "boolean" + }, + "quantization": { + "description": "Quantization params", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationSearchParams" + }, + { + "nullable": true + } + ] + }, + "indexed_only": { + "description": "If enabled, the engine will only perform search among indexed or small segments. Using this option prevents slow searches in case of delayed index, but does not guarantee that all uploaded vectors will be included in search results", + "default": false, + "type": "boolean" + } + } + }, + "QuantizationSearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "ignore": { + "description": "If true, quantized vectors are ignored. Default is false.", + "default": false, + "type": "boolean" + }, + "rescore": { + "description": "If true, use original vectors to re-score top-k results. Might require more time in case if original vectors are stored on disk. If not set, qdrant decides automatically apply rescoring or not.", + "default": null, + "type": "boolean", + "nullable": true + }, + "oversampling": { + "description": "Oversampling factor for quantization. Default is 1.0.\n\nDefines how many extra vectors should be pre-selected using quantized index, and then re-scored using original vectors.\n\nFor example, if `oversampling` is 2.4 and `limit` is 100, then 240 vectors will be pre-selected using quantized index, and then top-100 will be returned after re-scoring.", + "default": null, + "type": "number", + "format": "double", + "minimum": 1, + "nullable": true + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0, + "example": 3 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float", + "example": 0.75 + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "description": "Shard Key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + }, + "order_value": { + "description": "Order-by value", + "anyOf": [ + { + "$ref": "#/components/schemas/OrderValue" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "description": "`Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.", + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which can be ids of points that are already stored in the collection, raw vectors, or even ids and vectors combined.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to the `strategy` chosen.", + "type": "object", + "required": [ + "limit" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "positive": { + "description": "Look for vectors closest to those", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "strategy": { + "description": "How to use positive and negative examples to find the results", + "anyOf": [ + { + "$ref": "#/components/schemas/RecommendStrategy" + }, + { + "nullable": true + } + ] + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Options for specifying which vectors to include into response. Default is false.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "RecommendExample": { + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/SparseVector" + } + ] + }, + "RecommendStrategy": { + "description": "How to use positive and negative examples to find the results, default is `average_vector`:\n\n* `average_vector` - Average positive and negative vectors and create a single query with the formula `query = avg_pos + avg_pos - avg_neg`. Then performs normal search.\n\n* `best_score` - Uses custom search objective. Each candidate is compared against all examples, its score is then chosen from the `max(max_pos_score, max_neg_score)`. If the `max_neg_score` is chosen then it is squared and negated, otherwise it is just the `max_pos_score`.", + "type": "string", + "enum": [ + "average_vector", + "best_score" + ] + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "LookupLocation": { + "description": "Defines a location to use for looking up the vector. Specifies collection and vector field name.", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection used for lookup", + "type": "string" + }, + "vector": { + "description": "Optional name of the vector field within the collection. If not provided, the default vector field will be used.", + "default": null, + "type": "string", + "nullable": true + }, + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is true.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + }, + "order_by": { + "description": "Order the records by a payload field.", + "anyOf": [ + { + "$ref": "#/components/schemas/OrderByInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "OrderByInterface": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/OrderBy" + } + ] + }, + "OrderBy": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key to order by", + "type": "string" + }, + "direction": { + "description": "Direction of ordering: `asc` or `desc`. Default is ascending.", + "anyOf": [ + { + "$ref": "#/components/schemas/Direction" + }, + { + "nullable": true + } + ] + }, + "start_from": { + "description": "Which payload value to start scrolling from. Default is the lowest value for `asc` and the highest for `desc`", + "anyOf": [ + { + "$ref": "#/components/schemas/StartFrom" + }, + { + "nullable": true + } + ] + } + } + }, + "Direction": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "StartFrom": { + "anyOf": [ + { + "type": "integer", + "format": "int64" + }, + { + "type": "number", + "format": "double" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + }, + "example": [ + { + "id": 40, + "payload": { + "city": "London", + "color": "green" + }, + "vector": [ + 0.875, + 0.140625, + 0.897599995136261 + ], + "shard_key": "region_1" + }, + { + "id": 41, + "payload": { + "city": "Paris", + "color": "red" + }, + "vector": [ + 0.75, + 0.640625, + 0.8945000171661377 + ], + "shard_key": "region_1" + } + ] + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "For auto sharding: Number of shards in collection. - Default is 1 for standalone, otherwise equal to the number of nodes - Minimum is 1\n\nFor custom sharding: Number of shards in collection per shard group. - Default is 1, meaning that each shard key will be mapped to a single shard - Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "sharding_method": { + "description": "Sharding method Default is Auto - points are distributed across all available shards Custom - points are distributed across shards according to shard key", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/ShardingMethod" + }, + { + "nullable": true + } + ] + }, + "replication_factor": { + "description": "Number of shards replicas. Default is 1 Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "init_from": { + "description": "Specify other collection to copy data from.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/InitFrom" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Quantization parameters. If none - quantization is disabled.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + }, + "sparse_vectors": { + "description": "Sparse vector data config.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorParams" + }, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.\n\nMemmap storage is disabled by default, to enable it, set this threshold to a reasonable value.\n\nTo disable memmap storage, set this to `0`.\n\nNote: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing\n\nDefault value is 20,000, based on .\n\nTo disable vector indexing, set to `0`.\n\nNote: 1kB = 1 vector of size 256.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Max number of threads (jobs) for running optimizations per shard. Note: each optimization job will also use `max_indexing_threads` threads by itself for index building. If null - have no limit and choose dynamically to saturate CPU. If 0 - no optimization threads, optimizations will be disabled.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "InitFrom": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "type": "string" + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "vectors": { + "description": "Map of vector data parameters to update for each named vector. To update parameters in a collection having a single unnamed vector, use an empty string as name.", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorsConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - it is left unchanged. This operation is blocking, it will only proceed once all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Collection base params. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionParamsDiff" + }, + { + "nullable": true + } + ] + }, + "hnsw_config": { + "description": "HNSW parameters to update for the collection index. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Quantization parameters to update. If none - it is left unchanged.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfigDiff" + }, + { + "nullable": true + } + ] + }, + "sparse_vectors": { + "description": "Map of sparse vector data parameters to update for each sparse vector.", + "anyOf": [ + { + "$ref": "#/components/schemas/SparseVectorsConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "VectorsConfigDiff": { + "description": "Vector update params for multiple vectors\n\n{ \"vector_name\": { \"hnsw_config\": { \"m\": 8 } } }", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParamsDiff" + } + }, + "VectorParamsDiff": { + "type": "object", + "properties": { + "hnsw_config": { + "description": "Update params for HNSW index. If empty object - it will be unset.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Update params for quantization. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfigDiff" + }, + { + "nullable": true + } + ] + }, + "on_disk": { + "description": "If true, vectors are served from disk, improving RAM usage at the cost of latency", + "type": "boolean", + "nullable": true + } + } + }, + "QuantizationConfigDiff": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScalarQuantization" + }, + { + "$ref": "#/components/schemas/ProductQuantization" + }, + { + "$ref": "#/components/schemas/BinaryQuantization" + }, + { + "$ref": "#/components/schemas/Disabled" + } + ] + }, + "Disabled": { + "type": "string", + "enum": [ + "Disabled" + ] + }, + "CollectionParamsDiff": { + "type": "object", + "properties": { + "replication_factor": { + "description": "Number of replicas for each shard", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Minimal number successful responses from replicas to consider operation successful", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "read_fan_out_factor": { + "description": "Fan-out every read request to these many additional remote nodes (and return first available response)", + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + } + } + }, + "SparseVectorsConfig": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorParams" + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointInsertOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "PointsBatch": { + "type": "object", + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Vector" + } + } + } + ] + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "SetPayload": { + "description": "This data structure is used in API interface and applied across multiple shards", + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Assigns payload to each point that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "key": { + "description": "Assigns payload to each point that satisfy this path of property", + "type": "string", + "nullable": true + } + } + }, + "DeletePayload": { + "description": "This data structure is used in API interface and applied across multiple shards", + "type": "object", + "required": [ + "keys" + ], + "properties": { + "keys": { + "description": "List of payload keys to remove from payload", + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "message_send_failures", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + }, + "message_send_failures": { + "description": "Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MessageSendErrors" + } + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "description": "Role of the peer in the consensus", + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "MessageSendErrors": { + "description": "Message send failures for a particular peer", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "latest_error": { + "type": "string", + "nullable": true + }, + "latest_error_timestamp": { + "description": "Timestamp of the latest error", + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "checksum": { + "type": "string", + "nullable": true + } + }, + "example": { + "name": "my-collection-3766212330831337-2024-07-22-08-31-55.snapshot", + "creation_time": "2022-08-04T10:49:10", + "size": 1000000, + "checksum": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0" + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "resharding_operations", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + }, + "resharding_operations": { + "description": "Resharding operations", + "type": "array", + "items": { + "$ref": "#/components/schemas/ReshardingInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "shard_key": { + "description": "User-defined sharding key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ReplicaState": { + "description": "State of the single shard within a replica set.", + "type": "string", + "enum": [ + "Active", + "Dead", + "Partial", + "Initializing", + "Listener", + "PartialSnapshot", + "Recovery" + ] + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "shard_key": { + "description": "User-defined sharding key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "sync", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "description": "Source peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "description": "Destination peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sync": { + "description": "If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another", + "type": "boolean" + }, + "method": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardTransferMethod" + }, + { + "nullable": true + } + ] + }, + "comment": { + "description": "A human-readable report of the transfer progress. Available only on the source peer.", + "type": "string", + "nullable": true + } + } + }, + "ShardTransferMethod": { + "description": "Methods for transferring a shard from one node to another.", + "oneOf": [ + { + "description": "Stream all shard records in batches until the whole shard is transferred.", + "type": "string", + "enum": [ + "stream_records" + ] + }, + { + "description": "Snapshot the shard, transfer and restore it on the receiver.", + "type": "string", + "enum": [ + "snapshot" + ] + }, + { + "description": "Attempt to transfer shard difference by WAL delta.", + "type": "string", + "enum": [ + "wal_delta" + ] + } + ] + }, + "ReshardingInfo": { + "type": "object", + "required": [ + "direction", + "peer_id", + "shard_id" + ], + "properties": { + "direction": { + "$ref": "#/components/schemas/ReshardingDirection" + }, + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + }, + "comment": { + "description": "A human-readable report of the operation progress. Available only on the source peer.", + "type": "string", + "nullable": true + } + } + }, + "ReshardingDirection": { + "description": "Resharding direction, scale up or down in number of shards", + "oneOf": [ + { + "description": "Scale up, add a new shard", + "type": "string", + "enum": [ + "up" + ] + }, + { + "description": "Scale down, remove a shard", + "type": "string", + "enum": [ + "down" + ] + } + ] + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster", + "collections", + "id", + "requests" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "collections": { + "$ref": "#/components/schemas/CollectionsTelemetry" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterTelemetry" + }, + "requests": { + "$ref": "#/components/schemas/RequestsTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "name", + "startup", + "version" + ], + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppFeaturesTelemetry" + }, + { + "nullable": true + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + { + "nullable": true + } + ] + }, + "jwt_rbac": { + "type": "boolean", + "nullable": true + }, + "startup": { + "type": "string", + "format": "date-time" + } + } + }, + "AppFeaturesTelemetry": { + "type": "object", + "required": [ + "debug", + "recovery_mode", + "service_debug_feature", + "web_feature" + ], + "properties": { + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + }, + "recovery_mode": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "CollectionsTelemetry": { + "type": "object", + "required": [ + "number_of_collections" + ], + "properties": { + "number_of_collections": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetryEnum" + }, + "nullable": true + } + } + }, + "CollectionTelemetryEnum": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionTelemetry" + }, + { + "$ref": "#/components/schemas/CollectionsAggregatedTelemetry" + } + ] + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time_ms", + "shards", + "transfers" + ], + "properties": { + "id": { + "type": "string" + }, + "init_time_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplicaSetTelemetry" + } + }, + "transfers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "ReplicaSetTelemetry": { + "type": "object", + "required": [ + "id", + "remote", + "replicate_states" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "local": { + "anyOf": [ + { + "$ref": "#/components/schemas/LocalShardTelemetry" + }, + { + "nullable": true + } + ] + }, + "remote": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardTelemetry" + } + }, + "replicate_states": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ReplicaState" + } + } + } + }, + "LocalShardTelemetry": { + "type": "object", + "required": [ + "optimizations", + "segments" + ], + "properties": { + "variant_name": { + "type": "string", + "nullable": true + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizations": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index_searches" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index_searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorIndexSearchesTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_indexed_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type", + "vector_data" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_indexed_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + }, + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "VectorDataInfo": { + "type": "object", + "required": [ + "num_deleted_vectors", + "num_indexed_vectors", + "num_vectors" + ], + "properties": { + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_indexed_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "SegmentConfig": { + "type": "object", + "required": [ + "payload_storage_type" + ], + "properties": { + "vector_data": { + "default": {}, + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "sparse_vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorDataConfig" + } + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "index", + "size", + "storage_type" + ], + "properties": { + "size": { + "description": "Size/dimensionality of the vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "storage_type": { + "$ref": "#/components/schemas/VectorStorageType" + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "quantization_config": { + "description": "Vector specific quantization config that overrides collection config", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + }, + "multivector_config": { + "description": "Vector specific configuration to enable multiple vectors per point", + "anyOf": [ + { + "$ref": "#/components/schemas/MultiVectorConfig" + }, + { + "nullable": true + } + ] + }, + "datatype": { + "description": "Vector specific configuration to set specific storage element type", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStorageDatatype" + }, + { + "nullable": true + } + ] + } + } + }, + "VectorStorageType": { + "description": "Storage types for vectors", + "oneOf": [ + { + "description": "Storage in memory (RAM)\n\nWill be very fast at the cost of consuming a lot of memory.", + "type": "string", + "enum": [ + "Memory" + ] + }, + { + "description": "Storage in mmap file, not appendable\n\nSearch performance is defined by disk speed and the fraction of vectors that fit in memory.", + "type": "string", + "enum": [ + "Mmap" + ] + }, + { + "description": "Storage in chunked mmap files, appendable\n\nSearch performance is defined by disk speed and the fraction of vectors that fit in memory.", + "type": "string", + "enum": [ + "ChunkedMmap" + ] + }, + { + "description": "Same as `ChunkedMmap`, but vectors are forced to be locked in RAM In this way we avoid cold requests to disk, but risk to run out of memory\n\nDesigned as a replacement for `Memory`, which doesn't depend on RocksDB", + "type": "string", + "enum": [ + "InRamChunkedMmap" + ] + } + ] + }, + "Indexes": { + "description": "Vector index configuration", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "VectorStorageDatatype": { + "description": "Storage types for vectors", + "type": "string", + "enum": [ + "float32", + "float16", + "uint8" + ] + }, + "SparseVectorDataConfig": { + "description": "Config of single sparse vector data storage", + "type": "object", + "required": [ + "index" + ], + "properties": { + "index": { + "$ref": "#/components/schemas/SparseIndexConfig" + } + } + }, + "SparseIndexConfig": { + "description": "Configuration for sparse inverted index.", + "type": "object", + "required": [ + "index_type" + ], + "properties": { + "full_scan_threshold": { + "description": "We prefer a full scan search upto (excluding) this number of vectors.\n\nNote: this is number of vectors, not KiloBytes.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "index_type": { + "$ref": "#/components/schemas/SparseIndexType" + }, + "datatype": { + "description": "Datatype used to store weights in the index.", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStorageDatatype" + }, + { + "nullable": true + } + ] + } + } + }, + "SparseIndexType": { + "description": "Sparse index types", + "oneOf": [ + { + "description": "Mutable RAM sparse index", + "type": "string", + "enum": [ + "MutableRam" + ] + }, + { + "description": "Immutable RAM sparse index", + "type": "string", + "enum": [ + "ImmutableRam" + ] + }, + { + "description": "Mmap sparse index", + "type": "string", + "enum": [ + "Mmap" + ] + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexSearchesTelemetry": { + "type": "object", + "required": [ + "filtered_exact", + "filtered_large_cardinality", + "filtered_plain", + "filtered_small_cardinality", + "filtered_sparse", + "unfiltered_exact", + "unfiltered_hnsw", + "unfiltered_plain", + "unfiltered_sparse" + ], + "properties": { + "index_name": { + "type": "string", + "nullable": true + }, + "unfiltered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_hnsw": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_sparse": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_small_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_large_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_sparse": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "OperationDurationStatistics": { + "type": "object", + "required": [ + "count", + "total_duration_micros" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "avg_duration_micros": { + "description": "The average time taken by 128 latest operations, calculated as a weighted mean.", + "type": "number", + "format": "float", + "nullable": true + }, + "min_duration_micros": { + "description": "The minimum duration of the operations across all the measurements.", + "type": "number", + "format": "float", + "nullable": true + }, + "max_duration_micros": { + "description": "The maximum duration of the operations across all the measurements.", + "type": "number", + "format": "float", + "nullable": true + }, + "total_duration_micros": { + "description": "The total duration of all operations in microseconds.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "last_responded": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "field_name": { + "type": "string", + "nullable": true + }, + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "type": "object", + "required": [ + "log", + "optimizations", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "optimizations": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "log": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TrackerTelemetry" + } + } + } + }, + "TrackerTelemetry": { + "description": "Tracker object used in telemetry", + "type": "object", + "required": [ + "name", + "segment_ids", + "start_at", + "status" + ], + "properties": { + "name": { + "description": "Name of the optimizer", + "type": "string" + }, + "segment_ids": { + "description": "Segment IDs being optimized", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + }, + "status": { + "$ref": "#/components/schemas/TrackerStatus" + }, + "start_at": { + "description": "Start time of the optimizer", + "type": "string", + "format": "date-time" + }, + "end_at": { + "description": "End time of the optimizer", + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "TrackerStatus": { + "description": "Represents the current state of the optimizer being tracked", + "oneOf": [ + { + "type": "string", + "enum": [ + "optimizing", + "done" + ] + }, + { + "type": "object", + "required": [ + "cancelled" + ], + "properties": { + "cancelled": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "RemoteShardTelemetry": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "searches": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "CollectionsAggregatedTelemetry": { + "type": "object", + "required": [ + "optimizers_status", + "params", + "vectors" + ], + "properties": { + "vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "optimizers_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + } + } + }, + "ClusterTelemetry": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterStatusTelemetry" + }, + { + "nullable": true + } + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatusTelemetry": { + "type": "object", + "required": [ + "commit", + "consensus_thread_status", + "is_voter", + "number_of_peers", + "pending_operations", + "term" + ], + "properties": { + "number_of_peers": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "term": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "role": { + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "type": "boolean" + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "RequestsTelemetry": { + "type": "object", + "required": [ + "grpc", + "rest" + ], + "properties": { + "rest": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc": { + "$ref": "#/components/schemas/GrpcTelemetry" + } + } + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + } + }, + "GrpcTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/ReplicateShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + }, + { + "$ref": "#/components/schemas/DropReplicaOperation" + }, + { + "$ref": "#/components/schemas/CreateShardingKeyOperation" + }, + { + "$ref": "#/components/schemas/DropShardingKeyOperation" + }, + { + "$ref": "#/components/schemas/RestartTransferOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "method": { + "description": "Method for transferring the shard from one node to another", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardTransferMethod" + }, + { + "nullable": true + } + ] + } + } + }, + "ReplicateShardOperation": { + "type": "object", + "required": [ + "replicate_shard" + ], + "properties": { + "replicate_shard": { + "$ref": "#/components/schemas/ReplicateShard" + } + } + }, + "ReplicateShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "method": { + "description": "Method for transferring the shard from one node to another", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardTransferMethod" + }, + { + "nullable": true + } + ] + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/AbortShardTransfer" + } + } + }, + "AbortShardTransfer": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "DropReplicaOperation": { + "type": "object", + "required": [ + "drop_replica" + ], + "properties": { + "drop_replica": { + "$ref": "#/components/schemas/Replica" + } + } + }, + "Replica": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CreateShardingKeyOperation": { + "type": "object", + "required": [ + "create_sharding_key" + ], + "properties": { + "create_sharding_key": { + "$ref": "#/components/schemas/CreateShardingKey" + } + } + }, + "CreateShardingKey": { + "type": "object", + "required": [ + "shard_key" + ], + "properties": { + "shard_key": { + "$ref": "#/components/schemas/ShardKey" + }, + "shards_number": { + "description": "How many shards to create for this key If not specified, will use the default value from config", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "replication_factor": { + "description": "How many replicas to create for each shard If not specified, will use the default value from config", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "placement": { + "description": "Placement of shards for this key List of peer ids, that can be used to place shards for this key If not specified, will be randomly placed among all peers", + "type": "array", + "items": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "nullable": true + } + } + }, + "DropShardingKeyOperation": { + "type": "object", + "required": [ + "drop_sharding_key" + ], + "properties": { + "drop_sharding_key": { + "$ref": "#/components/schemas/DropShardingKey" + } + } + }, + "DropShardingKey": { + "type": "object", + "required": [ + "shard_key" + ], + "properties": { + "shard_key": { + "$ref": "#/components/schemas/ShardKey" + } + } + }, + "RestartTransferOperation": { + "type": "object", + "required": [ + "restart_transfer" + ], + "properties": { + "restart_transfer": { + "$ref": "#/components/schemas/RestartTransfer" + } + } + }, + "RestartTransfer": { + "type": "object", + "required": [ + "from_peer_id", + "method", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "method": { + "$ref": "#/components/schemas/ShardTransferMethod" + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "LocksOption": { + "type": "object", + "required": [ + "write" + ], + "properties": { + "error_message": { + "type": "string", + "nullable": true + }, + "write": { + "type": "boolean" + } + } + }, + "SnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "description": "Examples: - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot` - Local path `file:///qdrant/snapshots/test_collection-2022-08-04-10-49-10.snapshot`", + "type": "string", + "format": "uri" + }, + "priority": { + "description": "Defines which data should be used as a source of truth if there are other replicas in the cluster. If set to `Snapshot`, the snapshot will be used as a source of truth, and the current state will be overwritten. If set to `Replica`, the current state will be used as a source of truth, and after recovery if will be synchronized with the snapshot.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/SnapshotPriority" + }, + { + "nullable": true + } + ] + }, + "checksum": { + "description": "Optional SHA256 checksum to verify snapshot integrity before recovery.", + "default": null, + "type": "string", + "nullable": true + }, + "api_key": { + "description": "Optional API key used when fetching the snapshot from a remote URL.", + "default": null, + "type": "string", + "nullable": true + } + } + }, + "SnapshotPriority": { + "description": "Defines source of truth for snapshot recovery: `NoSync` means - restore snapshot without *any* additional synchronization. `Snapshot` means - prefer snapshot data over the current state. `Replica` means - prefer existing data over the snapshot.", + "type": "string", + "enum": [ + "no_sync", + "snapshot", + "replica" + ] + }, + "CollectionsAliasesResponse": { + "type": "object", + "required": [ + "aliases" + ], + "properties": { + "aliases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasDescription" + } + } + } + }, + "AliasDescription": { + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "alias_name": { + "type": "string" + }, + "collection_name": { + "type": "string" + } + }, + "example": { + "alias_name": "blogs-title", + "collection_name": "arivx-title" + } + }, + "WriteOrdering": { + "description": "Defines write ordering guarantees for collection operations\n\n* `weak` - write operations may be reordered, works faster, default\n\n* `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change\n\n* `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down", + "type": "string", + "enum": [ + "weak", + "medium", + "strong" + ] + }, + "ReadConsistency": { + "description": "Read consistency parameter\n\nDefines how many replicas should be queried to get the result\n\n* `N` - send N random request and return points, which present on all of them\n\n* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of them\n\n* `all` - send requests to all nodes and return points which present on all of them\n\nDefault value is `Factor(1)`", + "anyOf": [ + { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + { + "$ref": "#/components/schemas/ReadConsistencyType" + } + ] + }, + "ReadConsistencyType": { + "description": "* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of nodes\n\n* `all` - send requests to all nodes and return points which present on all nodes", + "type": "string", + "enum": [ + "majority", + "quorum", + "all" + ] + }, + "UpdateVectors": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "Points with named vectors", + "type": "array", + "items": { + "$ref": "#/components/schemas/PointVectors" + }, + "minItems": 1 + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointVectors": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + } + } + }, + "DeleteVectors": { + "type": "object", + "required": [ + "vector" + ], + "properties": { + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector names", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointGroup": { + "type": "object", + "required": [ + "hits", + "id" + ], + "properties": { + "hits": { + "description": "Scored points that have the same value of the group_by key", + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + }, + "id": { + "$ref": "#/components/schemas/GroupId" + }, + "lookup": { + "description": "Record that has been looked up using the group id", + "anyOf": [ + { + "$ref": "#/components/schemas/Record" + }, + { + "nullable": true + } + ] + } + } + }, + "GroupId": { + "description": "Value of the group_by key, shared across all the hits in the group", + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "integer", + "format": "int64" + } + ] + }, + "SearchGroupsRequest": { + "type": "object", + "required": [ + "group_by", + "group_size", + "limit", + "vector" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Options for specifying which vectors to include into response. Default is false.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "group_by": { + "description": "Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.", + "type": "string", + "minLength": 1 + }, + "group_size": { + "description": "Maximum amount of points to return per group", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "limit": { + "description": "Maximum amount of groups to return", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "with_lookup": { + "description": "Look for points in another collection using the group ids", + "anyOf": [ + { + "$ref": "#/components/schemas/WithLookupInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "WithLookupInterface": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/WithLookup" + } + ] + }, + "WithLookup": { + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection to use for points lookup", + "type": "string" + }, + "with_payload": { + "description": "Options for specifying which payload to include (or not)", + "default": true, + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vectors": { + "description": "Options for specifying which vectors to include (or not)", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + } + } + }, + "RecommendGroupsRequest": { + "type": "object", + "required": [ + "group_by", + "group_size", + "limit" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "positive": { + "description": "Look for vectors closest to those", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "strategy": { + "description": "How to use positive and negative examples to find the results", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/RecommendStrategy" + }, + { + "nullable": true + } + ] + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Options for specifying which vectors to include into response. Default is false.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + }, + "group_by": { + "description": "Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.", + "type": "string", + "minLength": 1 + }, + "group_size": { + "description": "Maximum amount of points to return per group", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "limit": { + "description": "Maximum amount of groups to return", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "with_lookup": { + "description": "Look for points in another collection using the group ids", + "anyOf": [ + { + "$ref": "#/components/schemas/WithLookupInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "GroupsResult": { + "type": "object", + "required": [ + "groups" + ], + "properties": { + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointGroup" + } + } + } + }, + "UpdateOperations": { + "type": "object", + "required": [ + "operations" + ], + "properties": { + "operations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateOperation" + } + } + } + }, + "UpdateOperation": { + "anyOf": [ + { + "$ref": "#/components/schemas/UpsertOperation" + }, + { + "$ref": "#/components/schemas/DeleteOperation" + }, + { + "$ref": "#/components/schemas/SetPayloadOperation" + }, + { + "$ref": "#/components/schemas/OverwritePayloadOperation" + }, + { + "$ref": "#/components/schemas/DeletePayloadOperation" + }, + { + "$ref": "#/components/schemas/ClearPayloadOperation" + }, + { + "$ref": "#/components/schemas/UpdateVectorsOperation" + }, + { + "$ref": "#/components/schemas/DeleteVectorsOperation" + } + ] + }, + "UpsertOperation": { + "type": "object", + "required": [ + "upsert" + ], + "properties": { + "upsert": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + }, + "DeleteOperation": { + "type": "object", + "required": [ + "delete" + ], + "properties": { + "delete": { + "$ref": "#/components/schemas/PointsSelector" + } + } + }, + "SetPayloadOperation": { + "type": "object", + "required": [ + "set_payload" + ], + "properties": { + "set_payload": { + "$ref": "#/components/schemas/SetPayload" + } + } + }, + "OverwritePayloadOperation": { + "type": "object", + "required": [ + "overwrite_payload" + ], + "properties": { + "overwrite_payload": { + "$ref": "#/components/schemas/SetPayload" + } + } + }, + "DeletePayloadOperation": { + "type": "object", + "required": [ + "delete_payload" + ], + "properties": { + "delete_payload": { + "$ref": "#/components/schemas/DeletePayload" + } + } + }, + "ClearPayloadOperation": { + "type": "object", + "required": [ + "clear_payload" + ], + "properties": { + "clear_payload": { + "$ref": "#/components/schemas/PointsSelector" + } + } + }, + "UpdateVectorsOperation": { + "type": "object", + "required": [ + "update_vectors" + ], + "properties": { + "update_vectors": { + "$ref": "#/components/schemas/UpdateVectors" + } + } + }, + "DeleteVectorsOperation": { + "type": "object", + "required": [ + "delete_vectors" + ], + "properties": { + "delete_vectors": { + "$ref": "#/components/schemas/DeleteVectors" + } + } + }, + "ShardSnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "$ref": "#/components/schemas/ShardSnapshotLocation" + }, + "priority": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/SnapshotPriority" + }, + { + "nullable": true + } + ] + }, + "checksum": { + "description": "Optional SHA256 checksum to verify snapshot integrity before recovery.", + "default": null, + "type": "string", + "nullable": true + }, + "api_key": { + "description": "Optional API key used when fetching the snapshot from a remote URL.", + "default": null, + "type": "string", + "nullable": true + } + } + }, + "ShardSnapshotLocation": { + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "string" + } + ] + }, + "DiscoverRequest": { + "description": "Use context and a target to find the most similar points, constrained by the context.", + "type": "object", + "required": [ + "limit" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "target": { + "description": "Look for vectors closest to this.\n\nWhen using the target (with or without context), the integer part of the score represents the rank with respect to the context, while the decimal part of the score relates to the distance to the target.", + "anyOf": [ + { + "$ref": "#/components/schemas/RecommendExample" + }, + { + "nullable": true + } + ] + }, + "context": { + "description": "Pairs of { positive, negative } examples to constrain the search.\n\nWhen using only the context (without a target), a special search - called context search - is performed where pairs of points are used to generate a loss that guides the search towards the zone where most positive examples overlap. This means that the score minimizes the scenario of finding a point closer to a negative than to a positive part of a pair.\n\nSince the score of a context relates to loss, the maximum score a point can get is 0.0, and it becomes normal that many points can have a score of 0.0.\n\nFor discovery search (when including a target), the context part of the score for each pair is calculated +1 if the point is closer to a positive than to a negative part of a pair, and -1 otherwise.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ContextExamplePair" + }, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Options for specifying which vectors to include into response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "ContextExamplePair": { + "type": "object", + "required": [ + "negative", + "positive" + ], + "properties": { + "positive": { + "$ref": "#/components/schemas/RecommendExample" + }, + "negative": { + "$ref": "#/components/schemas/RecommendExample" + } + } + }, + "DiscoverRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DiscoverRequest" + } + } + } + }, + "VersionInfo": { + "type": "object", + "required": [ + "title", + "version" + ], + "properties": { + "title": { + "type": "string" + }, + "version": { + "type": "string" + }, + "commit": { + "type": "string", + "nullable": true + } + } + }, + "CollectionExistence": { + "description": "State of existence of a collection, true = exists, false = does not exist", + "type": "object", + "required": [ + "exists" + ], + "properties": { + "exists": { + "type": "boolean" + } + } + }, + "QueryRequest": { + "type": "object", + "properties": { + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "prefetch": { + "description": "Sub-requests to perform first. If present, the query will be performed on the results of the prefetch(es).", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/Prefetch" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Prefetch" + } + }, + { + "nullable": true + } + ] + }, + "query": { + "description": "Query to perform. If missing without prefetches, returns points ordered by their IDs.", + "anyOf": [ + { + "$ref": "#/components/schemas/QueryInterface" + }, + { + "nullable": true + } + ] + }, + "using": { + "description": "Define which vector name to use for querying. If missing, the default vector is used.", + "type": "string", + "nullable": true + }, + "filter": { + "description": "Filter conditions - return only those points that satisfy the specified conditions.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Search params for when there is no prefetch", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Return points with scores better than this threshold.", + "type": "number", + "format": "float", + "nullable": true + }, + "limit": { + "description": "Max number of points to return. Default is 10.", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "offset": { + "description": "Offset of the result. Skip this many points. Default is 0", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "with_vector": { + "description": "Options for specifying which vectors to include into the response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Options for specifying which payload to include or not. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location to use for IDs lookup, if not specified - use the current collection and the 'using' vector Note: the other collection vectors should have the same vector size as the 'using' vector in the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "Prefetch": { + "type": "object", + "properties": { + "prefetch": { + "description": "Sub-requests to perform first. If present, the query will be performed on the results of the prefetches.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/Prefetch" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Prefetch" + } + }, + { + "nullable": true + } + ] + }, + "query": { + "description": "Query to perform. If missing without prefetches, returns points ordered by their IDs.", + "anyOf": [ + { + "$ref": "#/components/schemas/QueryInterface" + }, + { + "nullable": true + } + ] + }, + "using": { + "description": "Define which vector name to use for querying. If missing, the default vector is used.", + "type": "string", + "nullable": true + }, + "filter": { + "description": "Filter conditions - return only those points that satisfy the specified conditions.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Search params for when there is no prefetch", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Return points with scores better than this threshold.", + "type": "number", + "format": "float", + "nullable": true + }, + "limit": { + "description": "Max number of points to return. Default is 10.", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "lookup_from": { + "description": "The location to use for IDs lookup, if not specified - use the current collection and the 'using' vector Note: the other collection vectors should have the same vector size as the 'using' vector in the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "QueryInterface": { + "anyOf": [ + { + "$ref": "#/components/schemas/VectorInput" + }, + { + "$ref": "#/components/schemas/Query" + } + ] + }, + "VectorInput": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/SparseVector" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "$ref": "#/components/schemas/ExtendedPointId" + } + ] + }, + "Query": { + "anyOf": [ + { + "$ref": "#/components/schemas/NearestQuery" + }, + { + "$ref": "#/components/schemas/RecommendQuery" + }, + { + "$ref": "#/components/schemas/DiscoverQuery" + }, + { + "$ref": "#/components/schemas/ContextQuery" + }, + { + "$ref": "#/components/schemas/OrderByQuery" + }, + { + "$ref": "#/components/schemas/FusionQuery" + }, + { + "$ref": "#/components/schemas/SampleQuery" + } + ] + }, + "NearestQuery": { + "type": "object", + "required": [ + "nearest" + ], + "properties": { + "nearest": { + "$ref": "#/components/schemas/VectorInput" + } + } + }, + "RecommendQuery": { + "type": "object", + "required": [ + "recommend" + ], + "properties": { + "recommend": { + "$ref": "#/components/schemas/RecommendInput" + } + } + }, + "RecommendInput": { + "type": "object", + "properties": { + "positive": { + "description": "Look for vectors closest to the vectors from these points", + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorInput" + }, + "nullable": true + }, + "negative": { + "description": "Try to avoid vectors like the vector from these points", + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorInput" + }, + "nullable": true + }, + "strategy": { + "description": "How to use the provided vectors to find the results", + "anyOf": [ + { + "$ref": "#/components/schemas/RecommendStrategy" + }, + { + "nullable": true + } + ] + } + } + }, + "DiscoverQuery": { + "type": "object", + "required": [ + "discover" + ], + "properties": { + "discover": { + "$ref": "#/components/schemas/DiscoverInput" + } + } + }, + "DiscoverInput": { + "type": "object", + "required": [ + "context", + "target" + ], + "properties": { + "target": { + "$ref": "#/components/schemas/VectorInput" + }, + "context": { + "description": "Search space will be constrained by these pairs of vectors", + "anyOf": [ + { + "$ref": "#/components/schemas/ContextPair" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContextPair" + } + }, + { + "nullable": true + } + ] + } + } + }, + "ContextPair": { + "type": "object", + "required": [ + "negative", + "positive" + ], + "properties": { + "positive": { + "$ref": "#/components/schemas/VectorInput" + }, + "negative": { + "$ref": "#/components/schemas/VectorInput" + } + } + }, + "ContextQuery": { + "type": "object", + "required": [ + "context" + ], + "properties": { + "context": { + "$ref": "#/components/schemas/ContextInput" + } + } + }, + "ContextInput": { + "anyOf": [ + { + "$ref": "#/components/schemas/ContextPair" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContextPair" + } + }, + { + "nullable": true + } + ] + }, + "OrderByQuery": { + "type": "object", + "required": [ + "order_by" + ], + "properties": { + "order_by": { + "$ref": "#/components/schemas/OrderByInterface" + } + } + }, + "FusionQuery": { + "type": "object", + "required": [ + "fusion" + ], + "properties": { + "fusion": { + "$ref": "#/components/schemas/Fusion" + } + } + }, + "Fusion": { + "description": "Fusion algorithm allows to combine results of multiple prefetches.\n\nAvailable fusion algorithms:\n\n* `rrf` - Reciprocal Rank Fusion * `dbsf` - Distribution-Based Score Fusion", + "type": "string", + "enum": [ + "rrf", + "dbsf" + ] + }, + "SampleQuery": { + "type": "object", + "required": [ + "sample" + ], + "properties": { + "sample": { + "$ref": "#/components/schemas/Sample" + } + } + }, + "Sample": { + "type": "string", + "enum": [ + "random" + ] + }, + "QueryRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryRequest" + } + } + } + }, + "QueryResponse": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + }, + "QueryGroupsRequest": { + "type": "object", + "required": [ + "group_by" + ], + "properties": { + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "prefetch": { + "description": "Sub-requests to perform first. If present, the query will be performed on the results of the prefetch(es).", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/Prefetch" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Prefetch" + } + }, + { + "nullable": true + } + ] + }, + "query": { + "description": "Query to perform. If missing without prefetches, returns points ordered by their IDs.", + "anyOf": [ + { + "$ref": "#/components/schemas/QueryInterface" + }, + { + "nullable": true + } + ] + }, + "using": { + "description": "Define which vector name to use for querying. If missing, the default vector is used.", + "type": "string", + "nullable": true + }, + "filter": { + "description": "Filter conditions - return only those points that satisfy the specified conditions.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Search params for when there is no prefetch", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Return points with scores better than this threshold.", + "type": "number", + "format": "float", + "nullable": true + }, + "with_vector": { + "description": "Options for specifying which vectors to include into the response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Options for specifying which payload to include or not. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location to use for IDs lookup, if not specified - use the current collection and the 'using' vector Note: the other collection vectors should have the same vector size as the 'using' vector in the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + }, + "group_by": { + "description": "Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.", + "type": "string", + "minLength": 1 + }, + "group_size": { + "description": "Maximum amount of points to return per group. Default is 3.", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "limit": { + "description": "Maximum amount of groups to return. Default is 10.", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "with_lookup": { + "description": "Look for points in another collection using the group ids", + "anyOf": [ + { + "$ref": "#/components/schemas/WithLookupInterface" + }, + { + "nullable": true + } + ] + } + } + } + } + } +} diff --git a/docs/redoc/v1.12.x/openapi.json b/docs/redoc/v1.12.x/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..d155246562f57eff6d81d51b21f2012ecf2fe8ff --- /dev/null +++ b/docs/redoc/v1.12.x/openapi.json @@ -0,0 +1,13250 @@ +{ + "paths": { + "/collections/{collection_name}/shards": { + "put": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Create shard key", + "operationId": "create_shard_key", + "requestBody": { + "description": "Shard key configuration", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateShardingKey" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to create shards for", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/delete": { + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Delete shard key", + "operationId": "delete_shard_key", + "requestBody": { + "description": "Select shard key to delete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DropShardingKey" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to create shards for", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/": { + "get": { + "summary": "Returns information about the running Qdrant instance", + "description": "Returns information about the running Qdrant instance like version and commit id", + "operationId": "root", + "tags": [ + "service" + ], + "responses": { + "200": { + "description": "Qdrant server version information", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionInfo" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + }, + "/metrics": { + "get": { + "summary": "Collect Prometheus metrics data", + "description": "Collect metrics data including app info, collections info, cluster info and statistics", + "operationId": "metrics", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Metrics data in Prometheus format", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "# HELP app_info information about qdrant server\n# TYPE app_info gauge\napp_info{name=\"qdrant\",version=\"0.11.1\"} 1\n# HELP cluster_enabled is cluster support enabled\n# TYPE cluster_enabled gauge\ncluster_enabled 0\n# HELP collections_total number of collections\n# TYPE collections_total gauge\ncollections_total 1\n" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/locks": { + "post": { + "summary": "Set lock options", + "description": "Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options", + "operationId": "post_locks", + "tags": [ + "service" + ], + "requestBody": { + "description": "Lock options and optional error message", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + }, + "get": { + "summary": "Get lock options", + "description": "Get lock options. If write is locked, all write operations and collection creation are forbidden", + "operationId": "get_locks", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + } + }, + "/healthz": { + "get": { + "summary": "Kubernetes healthz endpoint", + "description": "An endpoint for health checking used in Kubernetes.", + "operationId": "healthz", + "tags": [ + "service" + ], + "responses": { + "200": { + "description": "Healthz response", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "healthz check passed" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/livez": { + "get": { + "summary": "Kubernetes livez endpoint", + "description": "An endpoint for health checking used in Kubernetes.", + "operationId": "livez", + "tags": [ + "service" + ], + "responses": { + "200": { + "description": "Healthz response", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "healthz check passed" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/readyz": { + "get": { + "summary": "Kubernetes readyz endpoint", + "description": "An endpoint for health checking used in Kubernetes.", + "operationId": "readyz", + "tags": [ + "service" + ], + "responses": { + "200": { + "description": "Healthz response", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "healthz check passed" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/issues": { + "get": { + "summary": "Get issues", + "description": "Get a report of performance issues and configuration suggestions", + "operationId": "get_issues", + "tags": [ + "beta" + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "4XX": { + "description": "error" + } + } + }, + "delete": { + "summary": "Clear issues", + "description": "Removes all issues reported so far", + "operationId": "clear_issues", + "tags": [ + "beta" + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "boolean" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/recover": { + "post": { + "tags": [ + "cluster" + ], + "summary": "Tries to recover current peer Raft state.", + "operationId": "recover_current_peer", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "force", + "in": "query", + "description": "If true - removes peer even if it has shards/replicas on it.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/exists": { + "get": { + "tags": [ + "collections" + ], + "summary": "Check the existence of a collection", + "description": "Returns \"true\" if the given collection name exists, and \"false\" otherwise", + "operationId": "collection_exists", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/CollectionExistence" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List aliases for collection", + "description": "Get list of all aliases for a collection", + "operationId": "get_collection_aliases", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections aliases", + "description": "Get list of all existing collections aliases", + "operationId": "get_collections_aliases", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/upload": { + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from an uploaded snapshot", + "description": "Recover local collection data from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_uploaded_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "priority", + "in": "query", + "description": "Defines source of truth for snapshot recovery", + "required": false, + "schema": { + "$ref": "#/components/schemas/SnapshotPriority" + } + }, + { + "name": "checksum", + "in": "query", + "description": "Optional SHA256 checksum to verify snapshot integrity before recovery.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "snapshot": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Delete collection snapshot", + "description": "Delete snapshot for a collection", + "operationId": "delete_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "parameters": [ + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots" + ], + "summary": "Delete storage snapshot", + "description": "Delete snapshot of the whole storage", + "operationId": "delete_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the full snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots/upload": { + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover shard from an uploaded snapshot", + "description": "Recover shard of a local collection from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection shard.", + "operationId": "recover_shard_from_uploaded_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard to recover", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "priority", + "in": "query", + "description": "Defines source of truth for snapshot recovery", + "required": false, + "schema": { + "$ref": "#/components/schemas/SnapshotPriority" + } + }, + { + "name": "checksum", + "in": "query", + "description": "Optional SHA256 checksum to verify snapshot integrity before recovery.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "snapshot": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover shard of a local collection data from a snapshot. This will overwrite any data, stored in this shard, for the collection.", + "operationId": "recover_shard_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard to recover", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShardSnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List shards snapshots for a collection", + "description": "Get list of snapshots for a shard of a collection", + "operationId": "list_shard_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create shard snapshot", + "description": "Create new snapshot of a shard for a collection", + "operationId": "create_shard_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Delete shard snapshot", + "description": "Delete snapshot of a shard for a collection", + "operationId": "delete_shard_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot of a shard from a collection as a file", + "operationId": "get_shard_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/vectors": { + "put": { + "tags": [ + "points" + ], + "summary": "Update vectors", + "description": "Update specified named vectors on points, keep unspecified vectors intact.", + "operationId": "update_vectors", + "requestBody": { + "description": "Update named vectors on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateVectors" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/vectors/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete vectors", + "description": "Delete named vectors from the given points.", + "operationId": "delete_vectors", + "requestBody": { + "description": "Delete named vectors from points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteVectors" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload values for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Overwrite payload", + "description": "Replace full payload of points with new one", + "operationId": "overwrite_payload", + "requestBody": { + "description": "Payload and points selector", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Batch update points", + "description": "Apply a series of update operations for points, vectors and payloads", + "operationId": "batch_update", + "requestBody": { + "description": "update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to apply operations on", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/groups": { + "post": { + "tags": [ + "points" + ], + "summary": "Search point groups", + "description": "Retrieve closest points based on vector similarity and given filtering conditions, grouped by a given payload field", + "operationId": "search_point_groups", + "requestBody": { + "description": "Search request with optional filtering, grouped by a given payload field", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchGroupsRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/GroupsResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/groups": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend point groups", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples, grouped by a given payload field.", + "operationId": "recommend_point_groups", + "requestBody": { + "description": "Request points based on positive and negative examples, grouped by a payload field.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendGroupsRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/GroupsResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/discover": { + "post": { + "tags": [ + "points" + ], + "summary": "Discover points", + "description": "Use context and a target to find the most similar points to the target, constrained by the context.\nWhen using only the context (without a target), a special search - called context search - is performed where pairs of points are used to generate a loss that guides the search towards the zone where most positive examples overlap. This means that the score minimizes the scenario of finding a point closer to a negative than to a positive part of a pair.\nSince the score of a context relates to loss, the maximum score a point can get is 0.0, and it becomes normal that many points can have a score of 0.0.\nWhen using target (with or without context), the score behaves a little different: The integer part of the score represents the rank with respect to the context, while the decimal part of the score relates to the distance to the target. The context part of the score for each pair is calculated +1 if the point is closer to a positive than to a negative part of a pair, and -1 otherwise.\n", + "operationId": "discover_points", + "requestBody": { + "description": "Request points based on {positive, negative} pairs of examples, and/or a target", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DiscoverRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/discover/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Discover batch points", + "description": "Look for points based on target and/or positive and negative example pairs, in batch.", + "operationId": "discover_batch_points", + "requestBody": { + "description": "Batch request points based on { positive, negative } pairs of examples, and/or a target.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DiscoverRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/facet": { + "post": { + "tags": [ + "points" + ], + "summary": "Facet a payload key with a given filter.", + "description": "Count points that satisfy the given filter for each unique value of a payload key.", + "operationId": "facet", + "requestBody": { + "description": "Request counts of points for each unique value of a payload key", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FacetRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to facet in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/FacetResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/query": { + "post": { + "tags": [ + "points" + ], + "summary": "Query points", + "description": "Universally query points. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries.", + "operationId": "query_points", + "requestBody": { + "description": "Describes the query to make to the collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/QueryResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/query/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Query points in batch", + "description": "Universally query points in batch. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries.", + "operationId": "query_batch_points", + "requestBody": { + "description": "Describes the queries to make to the collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryResponse" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/query/groups": { + "post": { + "tags": [ + "points" + ], + "summary": "Query points, grouped by a given payload field", + "description": "Universally query points, grouped by a given payload field", + "operationId": "query_points_groups", + "requestBody": { + "description": "Describes the query to make to the collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryGroupsRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/GroupsResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/matrix/pairs": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points matrix distance pairs", + "description": "Compute distance matrix for sampled points with a pair based output format", + "operationId": "search_matrix_pairs", + "requestBody": { + "description": "Search matrix request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchMatrixRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/SearchMatrixPairsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/matrix/offsets": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points matrix distance offsets", + "description": "Compute distance matrix for sampled points with an offset based output format", + "operationId": "search_matrix_offsets", + "requestBody": { + "description": "Search matrix request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchMatrixRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request", + "example": 0.002 + }, + "status": { + "type": "string", + "example": "ok" + }, + "result": { + "$ref": "#/components/schemas/SearchMatrixOffsetsResponse" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [ + { + "api-key": [] + }, + { + "bearerAuth": [] + }, + {} + ], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `min_should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"default_segment_number\": 2,\n \"max_segment_size\": null,\n \"memmap_threshold\": null,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 5,\n \"max_optimization_threads\": null\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v1.12.x" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup." + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots." + }, + { + "name": "service", + "description": "Qdrant service utilities." + }, + { + "name": "beta", + "description": "Beta features, do not depend on these yet." + } + ], + "components": { + "securitySchemes": { + "api-key": { + "type": "apiKey", + "in": "header", + "name": "api-key", + "description": "Authorization key, either read-write or read-only" + }, + "bearerAuth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + }, + "example": { + "collections": [ + { + "name": "arivx-title" + }, + { + "name": "arivx-abstract" + }, + { + "name": "medium-title" + }, + { + "name": "medium-text" + } + ] + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "optimizer_status", + "payload_schema", + "segments_count", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "DEPRECATED: Approximate number of vectors in collection. All vectors in collection are available for querying. Calculated as `points_count x vectors_per_point`. Where `vectors_per_point` is a number of named vectors in schema.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexed_vectors_count": { + "description": "Approximate number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in a specialized vector index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "points_count": { + "description": "Approximate number of points (vectors + payloads) in collection. Each point could be accessed by unique id.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "segments_count": { + "description": "Number of segments in collection. Each segment has independent vector as payload indexes", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection. `Green` - all good. `Yellow` - optimization is running, 'Grey' - optimizations are possible but not triggered, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "grey", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + }, + "quantization_config": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParams": { + "type": "object", + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "sharding_method": { + "description": "Sharding method Default is Auto - points are distributed across all available shards Custom - points are distributed across shards according to shard key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardingMethod" + }, + { + "nullable": true + } + ] + }, + "replication_factor": { + "description": "Number of replicas for each shard", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "read_fan_out_factor": { + "description": "Defines how many additional replicas should be processing read request at the same time. Default value is Auto, which means that fan-out will be determined automatically based on the busyness of the local replica. Having more than 0 might be useful to smooth latency spikes of individual nodes.", + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + }, + "sparse_vectors": { + "description": "Configuration of the sparse vector storage", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorParams" + }, + "nullable": true + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Custom params for quantization. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + }, + "on_disk": { + "description": "If true, vectors are served from disk, improving RAM usage at the cost of latency Default: false", + "type": "boolean", + "nullable": true + }, + "datatype": { + "description": "Defines which datatype should be used to represent vectors in the storage. Choosing different datatypes allows to optimize memory usage and performance vs accuracy.\n\n- For `float32` datatype - vectors are stored as single-precision floating point numbers, 4 bytes. - For `float16` datatype - vectors are stored as half-precision floating point numbers, 2 bytes. - For `uint8` datatype - vectors are stored as unsigned 8-bit integers, 1 byte. It expects vector elements to be in range `[0, 255]`.", + "anyOf": [ + { + "$ref": "#/components/schemas/Datatype" + }, + { + "nullable": true + } + ] + }, + "multivector_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/MultiVectorConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot", + "Manhattan" + ] + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build the index.", + "type": "integer", + "format": "uint", + "minimum": 4, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in kilobytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 10, + "nullable": true + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - automatically select from 8 to 16. Best to keep between 8 and 16 to prevent likelihood of building broken/inefficient HNSW graphs. On small CPUs, less threads are used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, the index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for additional payload-aware HNSW links. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "QuantizationConfig": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScalarQuantization" + }, + { + "$ref": "#/components/schemas/ProductQuantization" + }, + { + "$ref": "#/components/schemas/BinaryQuantization" + } + ] + }, + "ScalarQuantization": { + "type": "object", + "required": [ + "scalar" + ], + "properties": { + "scalar": { + "$ref": "#/components/schemas/ScalarQuantizationConfig" + } + } + }, + "ScalarQuantizationConfig": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/ScalarType" + }, + "quantile": { + "description": "Quantile for quantization. Expected value range in [0.5, 1.0]. If not set - use the whole range of values", + "type": "number", + "format": "float", + "maximum": 1, + "minimum": 0.5, + "nullable": true + }, + "always_ram": { + "description": "If true - quantized vectors always will be stored in RAM, ignoring the config of main storage", + "type": "boolean", + "nullable": true + } + } + }, + "ScalarType": { + "type": "string", + "enum": [ + "int8" + ] + }, + "ProductQuantization": { + "type": "object", + "required": [ + "product" + ], + "properties": { + "product": { + "$ref": "#/components/schemas/ProductQuantizationConfig" + } + } + }, + "ProductQuantizationConfig": { + "type": "object", + "required": [ + "compression" + ], + "properties": { + "compression": { + "$ref": "#/components/schemas/CompressionRatio" + }, + "always_ram": { + "type": "boolean", + "nullable": true + } + } + }, + "CompressionRatio": { + "type": "string", + "enum": [ + "x4", + "x8", + "x16", + "x32", + "x64" + ] + }, + "BinaryQuantization": { + "type": "object", + "required": [ + "binary" + ], + "properties": { + "binary": { + "$ref": "#/components/schemas/BinaryQuantizationConfig" + } + } + }, + "BinaryQuantizationConfig": { + "type": "object", + "properties": { + "always_ram": { + "type": "boolean", + "nullable": true + } + } + }, + "Datatype": { + "type": "string", + "enum": [ + "float32", + "uint8", + "float16" + ] + }, + "MultiVectorConfig": { + "type": "object", + "required": [ + "comparator" + ], + "properties": { + "comparator": { + "$ref": "#/components/schemas/MultiVectorComparator" + } + } + }, + "MultiVectorComparator": { + "type": "string", + "enum": [ + "max_sim" + ] + }, + "ShardingMethod": { + "type": "string", + "enum": [ + "auto", + "custom" + ] + }, + "SparseVectorParams": { + "description": "Params of single sparse vector data storage", + "type": "object", + "properties": { + "index": { + "description": "Custom params for index. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/SparseIndexParams" + }, + { + "nullable": true + } + ] + }, + "modifier": { + "description": "Configures addition value modifications for sparse vectors. Default: none", + "anyOf": [ + { + "$ref": "#/components/schemas/Modifier" + }, + { + "nullable": true + } + ] + } + } + }, + "SparseIndexParams": { + "description": "Configuration for sparse inverted index.", + "type": "object", + "properties": { + "full_scan_threshold": { + "description": "We prefer a full scan search upto (excluding) this number of vectors.\n\nNote: this is number of vectors, not KiloBytes.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "on_disk": { + "description": "Store index on disk. If set to false, the index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "datatype": { + "description": "Defines which datatype should be used for the index. Choosing different datatypes allows to optimize memory usage and performance vs accuracy.\n\n- For `float32` datatype - vectors are stored as single-precision floating point numbers, 4 bytes. - For `float16` datatype - vectors are stored as half-precision floating point numbers, 2 bytes. - For `uint8` datatype - vectors are quantized to unsigned 8-bit integers, 1 byte. Quantization to fit byte range `[0, 255]` happens during indexing automatically, so the actual vector data does not need to conform to this range.", + "anyOf": [ + { + "$ref": "#/components/schemas/Datatype" + }, + { + "nullable": true + } + ] + } + } + }, + "Modifier": { + "description": "If used, include weight modification, which will be applied to sparse vectors at query time: None - no modification (default) Idf - inverse document frequency, based on statistics of the collection", + "type": "string", + "enum": [ + "none", + "idf" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 4 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - automatically select from 8 to 16. Best to keep between 8 and 16 to prevent likelihood of slow building or broken/inefficient HNSW graphs. On small CPUs, less threads are used.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for hnsw graph built for payload index. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "maximum": 1, + "minimum": 0 + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 100 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads. If `default_segment_number = 0`, will be automatically selected by the number of available CPUs.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexing speed is more important - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.\n\nMemmap storage is disabled by default, to enable it, set this threshold to a reasonable value.\n\nTo disable memmap storage, set this to `0`. Internally it will use the largest threshold possible.\n\nNote: 1Kb = 1 vector of size 256", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing\n\nDefault value is 20,000, based on .\n\nTo disable vector indexing, set to `0`.\n\nNote: 1kB = 1 vector of size 256.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Max number of threads (jobs) for running optimizations per shard. Note: each optimization job will also use `max_indexing_threads` threads by itself for index building. If null - have no limit and choose dynamically to saturate CPU. If 0 - no optimization threads, optimizations will be disabled.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type", + "points" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + }, + "points": { + "description": "Number of points indexed with this index", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text", + "bool", + "datetime", + "uuid" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/KeywordIndexParams" + }, + { + "$ref": "#/components/schemas/IntegerIndexParams" + }, + { + "$ref": "#/components/schemas/FloatIndexParams" + }, + { + "$ref": "#/components/schemas/GeoIndexParams" + }, + { + "$ref": "#/components/schemas/TextIndexParams" + }, + { + "$ref": "#/components/schemas/BoolIndexParams" + }, + { + "$ref": "#/components/schemas/DatetimeIndexParams" + }, + { + "$ref": "#/components/schemas/UuidIndexParams" + } + ] + }, + "KeywordIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/KeywordIndexType" + }, + "is_tenant": { + "description": "If true - used for tenant optimization. Default: false.", + "type": "boolean", + "nullable": true + }, + "on_disk": { + "description": "If true, store the index on disk. Default: false.", + "type": "boolean", + "nullable": true + } + } + }, + "KeywordIndexType": { + "type": "string", + "enum": [ + "keyword" + ] + }, + "IntegerIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/IntegerIndexType" + }, + "lookup": { + "description": "If true - support direct lookups.", + "type": "boolean", + "nullable": true + }, + "range": { + "description": "If true - support ranges filters.", + "type": "boolean", + "nullable": true + }, + "is_principal": { + "description": "If true - use this key to organize storage of the collection data. This option assumes that this key will be used in majority of filtered requests.", + "type": "boolean", + "nullable": true + }, + "on_disk": { + "description": "If true, store the index on disk. Default: false.", + "type": "boolean", + "nullable": true + } + } + }, + "IntegerIndexType": { + "type": "string", + "enum": [ + "integer" + ] + }, + "FloatIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/FloatIndexType" + }, + "is_principal": { + "description": "If true - use this key to organize storage of the collection data. This option assumes that this key will be used in majority of filtered requests.", + "type": "boolean", + "nullable": true + }, + "on_disk": { + "description": "If true, store the index on disk. Default: false.", + "type": "boolean", + "nullable": true + } + } + }, + "FloatIndexType": { + "type": "string", + "enum": [ + "float" + ] + }, + "GeoIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/GeoIndexType" + }, + "on_disk": { + "description": "If true, store the index on disk. Default: false.", + "type": "boolean", + "nullable": true + } + } + }, + "GeoIndexType": { + "type": "string", + "enum": [ + "geo" + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "description": "Minimum characters to be tokenized.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "description": "Maximum characters to be tokenized.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true.", + "type": "boolean", + "nullable": true + }, + "on_disk": { + "description": "If true, store the index on disk. Default: false.", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word", + "multilingual" + ] + }, + "BoolIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/BoolIndexType" + } + } + }, + "BoolIndexType": { + "type": "string", + "enum": [ + "bool" + ] + }, + "DatetimeIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/DatetimeIndexType" + }, + "is_principal": { + "description": "If true - use this key to organize storage of the collection data. This option assumes that this key will be used in majority of filtered requests.", + "type": "boolean", + "nullable": true + }, + "on_disk": { + "description": "If true, store the index on disk. Default: false.", + "type": "boolean", + "nullable": true + } + } + }, + "DatetimeIndexType": { + "type": "string", + "enum": [ + "datetime" + ] + }, + "UuidIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/UuidIndexType" + }, + "is_tenant": { + "description": "If true - used for tenant optimization.", + "type": "boolean", + "nullable": true + }, + "on_disk": { + "description": "If true, store the index on disk. Default: false.", + "type": "boolean", + "nullable": true + } + } + }, + "UuidIndexType": { + "type": "string", + "enum": [ + "uuid" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is true.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ShardKeySelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardKey" + } + } + ] + }, + "ShardKey": { + "anyOf": [ + { + "type": "string", + "example": "region_1" + }, + { + "type": "integer", + "format": "uint64", + "minimum": 0, + "example": 12 + } + ] + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0, + "example": 42 + }, + { + "type": "string", + "format": "uuid", + "example": "550e8400-e29b-41d4-a716-446655440000" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "description": "Shard Key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + }, + "order_value": { + "anyOf": [ + { + "$ref": "#/components/schemas/OrderValue" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true, + "example": { + "city": "London", + "color": "green" + } + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + }, + "example": [ + 0.875, + 0.140625, + 0.897599995136261 + ] + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "example": [ + [ + 0.875, + 0.140625, + 0.11020000278949738 + ], + [ + 0.7580000162124634, + 0.28126001358032227, + 0.9687100052833557 + ], + [ + 0.6209999918937683, + 0.42187801003456116, + 0.9375 + ] + ] + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Vector" + }, + "example": { + "image-embeddings": [ + 0.8730000257492065, + 0.140625, + 0.897599995136261 + ] + } + }, + { + "$ref": "#/components/schemas/Document" + } + ] + }, + "Vector": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/SparseVector" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "$ref": "#/components/schemas/Document" + } + ] + }, + "SparseVector": { + "description": "Sparse vector structure", + "type": "object", + "required": [ + "indices", + "values" + ], + "properties": { + "indices": { + "description": "Indices must be unique", + "type": "array", + "items": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "values": { + "description": "Values and indices must be the same length", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "Document": { + "description": "WARN: Work-in-progress, unimplemented\n\nText document for embedding. Requires inference infrastructure, unimplemented.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "description": "Text of the document This field will be used as input for the embedding model", + "type": "string" + }, + "model": { + "description": "Name of the model used to generate the vector List of available models depends on a provider", + "type": "string", + "nullable": true + } + } + }, + "OrderValue": { + "anyOf": [ + { + "type": "integer", + "format": "int64", + "example": 42 + }, + { + "type": "number", + "format": "double", + "example": 42.5 + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Options for specifying which vectors to include into response. Default is false.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unnamed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + }, + { + "$ref": "#/components/schemas/NamedSparseVector" + } + ] + }, + "NamedVector": { + "description": "Dense vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "NamedSparseVector": { + "description": "Sparse vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "$ref": "#/components/schemas/SparseVector" + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/Condition" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + } + }, + { + "nullable": true + } + ] + }, + "min_should": { + "description": "At least minimum amount of given conditions should match", + "anyOf": [ + { + "$ref": "#/components/schemas/MinShould" + }, + { + "nullable": true + } + ] + }, + "must": { + "description": "All conditions must match", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/Condition" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + } + }, + { + "nullable": true + } + ] + }, + "must_not": { + "description": "All conditions must NOT match", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/Condition" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + } + }, + { + "nullable": true + } + ] + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/IsNullCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/NestedCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/RangeInterface" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "geo_polygon": { + "description": "Check if geo point is within a given polygon", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoPolygon" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + }, + { + "$ref": "#/components/schemas/MatchAny" + }, + { + "$ref": "#/components/schemas/MatchExcept" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "MatchAny": { + "description": "Exact match on any of the given values", + "type": "object", + "required": [ + "any" + ], + "properties": { + "any": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "AnyVariants": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "uniqueItems": true + } + ] + }, + "MatchExcept": { + "description": "Should have at least one value not matching the any given values", + "type": "object", + "required": [ + "except" + ], + "properties": { + "except": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "RangeInterface": { + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "$ref": "#/components/schemas/DatetimeRange" + } + ] + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "DatetimeRange": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "string", + "format": "date-time", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "string", + "format": "date-time", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "string", + "format": "date-time", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "GeoPolygon": { + "description": "Geo filter request\n\nMatches coordinates inside the polygon, defined by `exterior` and `interiors`", + "type": "object", + "required": [ + "exterior" + ], + "properties": { + "exterior": { + "$ref": "#/components/schemas/GeoLineString" + }, + "interiors": { + "description": "Interior lines (if present) bound holes within the surface each GeoLineString must consist of a minimum of 4 points, and the first and last points must be the same.", + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoLineString" + }, + "nullable": true + } + } + }, + "GeoLineString": { + "description": "Ordered sequence of GeoPoints representing the line", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoPoint" + } + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "IsNullCondition": { + "description": "Select points with null payload for a specified field", + "type": "object", + "required": [ + "is_null" + ], + "properties": { + "is_null": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "NestedCondition": { + "type": "object", + "required": [ + "nested" + ], + "properties": { + "nested": { + "$ref": "#/components/schemas/Nested" + } + } + }, + "Nested": { + "description": "Select points with payload for a specified nested field", + "type": "object", + "required": [ + "filter", + "key" + ], + "properties": { + "key": { + "type": "string" + }, + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "MinShould": { + "type": "object", + "required": [ + "conditions", + "min_count" + ], + "properties": { + "conditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + } + }, + "min_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "exact": { + "description": "Search without approximation. If set to true, search may run long but with exact results.", + "default": false, + "type": "boolean" + }, + "quantization": { + "description": "Quantization params", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationSearchParams" + }, + { + "nullable": true + } + ] + }, + "indexed_only": { + "description": "If enabled, the engine will only perform search among indexed or small segments. Using this option prevents slow searches in case of delayed index, but does not guarantee that all uploaded vectors will be included in search results", + "default": false, + "type": "boolean" + } + } + }, + "QuantizationSearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "ignore": { + "description": "If true, quantized vectors are ignored. Default is false.", + "default": false, + "type": "boolean" + }, + "rescore": { + "description": "If true, use original vectors to re-score top-k results. Might require more time in case if original vectors are stored on disk. If not set, qdrant decides automatically apply rescoring or not.", + "default": null, + "type": "boolean", + "nullable": true + }, + "oversampling": { + "description": "Oversampling factor for quantization. Default is 1.0.\n\nDefines how many extra vectors should be pre-selected using quantized index, and then re-scored using original vectors.\n\nFor example, if `oversampling` is 2.4 and `limit` is 100, then 240 vectors will be pre-selected using quantized index, and then top-100 will be returned after re-scoring.", + "default": null, + "type": "number", + "format": "double", + "minimum": 1, + "nullable": true + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0, + "example": 3 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float", + "example": 0.75 + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "description": "Shard Key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + }, + "order_value": { + "description": "Order-by value", + "anyOf": [ + { + "$ref": "#/components/schemas/OrderValue" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "description": "`Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.", + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which can be ids of points that are already stored in the collection, raw vectors, or even ids and vectors combined.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to the `strategy` chosen.", + "type": "object", + "required": [ + "limit" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "positive": { + "description": "Look for vectors closest to those", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "strategy": { + "description": "How to use positive and negative examples to find the results", + "anyOf": [ + { + "$ref": "#/components/schemas/RecommendStrategy" + }, + { + "nullable": true + } + ] + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Options for specifying which vectors to include into response. Default is false.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "RecommendExample": { + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/SparseVector" + } + ] + }, + "RecommendStrategy": { + "description": "How to use positive and negative examples to find the results, default is `average_vector`:\n\n* `average_vector` - Average positive and negative vectors and create a single query with the formula `query = avg_pos + avg_pos - avg_neg`. Then performs normal search.\n\n* `best_score` - Uses custom search objective. Each candidate is compared against all examples, its score is then chosen from the `max(max_pos_score, max_neg_score)`. If the `max_neg_score` is chosen then it is squared and negated, otherwise it is just the `max_pos_score`.", + "type": "string", + "enum": [ + "average_vector", + "best_score" + ] + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "LookupLocation": { + "description": "Defines a location to use for looking up the vector. Specifies collection and vector field name.", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection used for lookup", + "type": "string" + }, + "vector": { + "description": "Optional name of the vector field within the collection. If not provided, the default vector field will be used.", + "default": null, + "type": "string", + "nullable": true + }, + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is true.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + }, + "order_by": { + "description": "Order the records by a payload field.", + "anyOf": [ + { + "$ref": "#/components/schemas/OrderByInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "OrderByInterface": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/OrderBy" + } + ] + }, + "OrderBy": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key to order by", + "type": "string" + }, + "direction": { + "description": "Direction of ordering: `asc` or `desc`. Default is ascending.", + "anyOf": [ + { + "$ref": "#/components/schemas/Direction" + }, + { + "nullable": true + } + ] + }, + "start_from": { + "description": "Which payload value to start scrolling from. Default is the lowest value for `asc` and the highest for `desc`", + "anyOf": [ + { + "$ref": "#/components/schemas/StartFrom" + }, + { + "nullable": true + } + ] + } + } + }, + "Direction": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "StartFrom": { + "anyOf": [ + { + "type": "integer", + "format": "int64" + }, + { + "type": "number", + "format": "double" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + }, + "example": [ + { + "id": 40, + "payload": { + "city": "London", + "color": "green" + }, + "vector": [ + 0.875, + 0.140625, + 0.897599995136261 + ], + "shard_key": "region_1" + }, + { + "id": 41, + "payload": { + "city": "Paris", + "color": "red" + }, + "vector": [ + 0.75, + 0.640625, + 0.8945000171661377 + ], + "shard_key": "region_1" + } + ] + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "For auto sharding: Number of shards in collection. - Default is 1 for standalone, otherwise equal to the number of nodes - Minimum is 1\n\nFor custom sharding: Number of shards in collection per shard group. - Default is 1, meaning that each shard key will be mapped to a single shard - Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "sharding_method": { + "description": "Sharding method Default is Auto - points are distributed across all available shards Custom - points are distributed across shards according to shard key", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/ShardingMethod" + }, + { + "nullable": true + } + ] + }, + "replication_factor": { + "description": "Number of shards replicas. Default is 1 Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "init_from": { + "description": "Specify other collection to copy data from.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/InitFrom" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Quantization parameters. If none - quantization is disabled.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + }, + "sparse_vectors": { + "description": "Sparse vector data config.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorParams" + }, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.\n\nMemmap storage is disabled by default, to enable it, set this threshold to a reasonable value.\n\nTo disable memmap storage, set this to `0`.\n\nNote: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing\n\nDefault value is 20,000, based on .\n\nTo disable vector indexing, set to `0`.\n\nNote: 1kB = 1 vector of size 256.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Max number of threads (jobs) for running optimizations per shard. Note: each optimization job will also use `max_indexing_threads` threads by itself for index building. If null - have no limit and choose dynamically to saturate CPU. If 0 - no optimization threads, optimizations will be disabled.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "InitFrom": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "type": "string" + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "vectors": { + "description": "Map of vector data parameters to update for each named vector. To update parameters in a collection having a single unnamed vector, use an empty string as name.", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorsConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - it is left unchanged. This operation is blocking, it will only proceed once all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Collection base params. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionParamsDiff" + }, + { + "nullable": true + } + ] + }, + "hnsw_config": { + "description": "HNSW parameters to update for the collection index. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Quantization parameters to update. If none - it is left unchanged.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfigDiff" + }, + { + "nullable": true + } + ] + }, + "sparse_vectors": { + "description": "Map of sparse vector data parameters to update for each sparse vector.", + "anyOf": [ + { + "$ref": "#/components/schemas/SparseVectorsConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "VectorsConfigDiff": { + "description": "Vector update params for multiple vectors\n\n{ \"vector_name\": { \"hnsw_config\": { \"m\": 8 } } }", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParamsDiff" + } + }, + "VectorParamsDiff": { + "type": "object", + "properties": { + "hnsw_config": { + "description": "Update params for HNSW index. If empty object - it will be unset.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Update params for quantization. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfigDiff" + }, + { + "nullable": true + } + ] + }, + "on_disk": { + "description": "If true, vectors are served from disk, improving RAM usage at the cost of latency", + "type": "boolean", + "nullable": true + } + } + }, + "QuantizationConfigDiff": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScalarQuantization" + }, + { + "$ref": "#/components/schemas/ProductQuantization" + }, + { + "$ref": "#/components/schemas/BinaryQuantization" + }, + { + "$ref": "#/components/schemas/Disabled" + } + ] + }, + "Disabled": { + "type": "string", + "enum": [ + "Disabled" + ] + }, + "CollectionParamsDiff": { + "type": "object", + "properties": { + "replication_factor": { + "description": "Number of replicas for each shard", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Minimal number successful responses from replicas to consider operation successful", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "read_fan_out_factor": { + "description": "Fan-out every read request to these many additional remote nodes (and return first available response)", + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + } + } + }, + "SparseVectorsConfig": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorParams" + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointInsertOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "PointsBatch": { + "type": "object", + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Vector" + } + } + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Document" + } + } + ] + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "SetPayload": { + "description": "This data structure is used in API interface and applied across multiple shards", + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Assigns payload to each point that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "key": { + "description": "Assigns payload to each point that satisfy this path of property", + "type": "string", + "nullable": true + } + } + }, + "DeletePayload": { + "description": "This data structure is used in API interface and applied across multiple shards", + "type": "object", + "required": [ + "keys" + ], + "properties": { + "keys": { + "description": "List of payload keys to remove from payload", + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "message_send_failures", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + }, + "message_send_failures": { + "description": "Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MessageSendErrors" + } + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "description": "Role of the peer in the consensus", + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "MessageSendErrors": { + "description": "Message send failures for a particular peer", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "latest_error": { + "type": "string", + "nullable": true + }, + "latest_error_timestamp": { + "description": "Timestamp of the latest error", + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "checksum": { + "type": "string", + "nullable": true + } + }, + "example": { + "name": "my-collection-3766212330831337-2024-07-22-08-31-55.snapshot", + "creation_time": "2022-08-04T10:49:10", + "size": 1000000, + "checksum": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0" + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + }, + "resharding_operations": { + "description": "Resharding operations", + "type": "array", + "items": { + "$ref": "#/components/schemas/ReshardingInfo" + }, + "nullable": true + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "shard_key": { + "description": "User-defined sharding key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ReplicaState": { + "description": "State of the single shard within a replica set.", + "type": "string", + "enum": [ + "Active", + "Dead", + "Partial", + "Initializing", + "Listener", + "PartialSnapshot", + "Recovery" + ] + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "shard_key": { + "description": "User-defined sharding key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "sync", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "description": "Source peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "description": "Destination peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sync": { + "description": "If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another", + "type": "boolean" + }, + "method": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardTransferMethod" + }, + { + "nullable": true + } + ] + }, + "comment": { + "description": "A human-readable report of the transfer progress. Available only on the source peer.", + "type": "string", + "nullable": true + } + } + }, + "ShardTransferMethod": { + "description": "Methods for transferring a shard from one node to another.", + "oneOf": [ + { + "description": "Stream all shard records in batches until the whole shard is transferred.", + "type": "string", + "enum": [ + "stream_records" + ] + }, + { + "description": "Snapshot the shard, transfer and restore it on the receiver.", + "type": "string", + "enum": [ + "snapshot" + ] + }, + { + "description": "Attempt to transfer shard difference by WAL delta.", + "type": "string", + "enum": [ + "wal_delta" + ] + } + ] + }, + "ReshardingInfo": { + "type": "object", + "required": [ + "direction", + "peer_id", + "shard_id" + ], + "properties": { + "direction": { + "$ref": "#/components/schemas/ReshardingDirection" + }, + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + }, + "comment": { + "description": "A human-readable report of the operation progress. Available only on the source peer.", + "type": "string", + "nullable": true + } + } + }, + "ReshardingDirection": { + "description": "Resharding direction, scale up or down in number of shards", + "oneOf": [ + { + "description": "Scale up, add a new shard", + "type": "string", + "enum": [ + "up" + ] + }, + { + "description": "Scale down, remove a shard", + "type": "string", + "enum": [ + "down" + ] + } + ] + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster", + "collections", + "id", + "requests" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "collections": { + "$ref": "#/components/schemas/CollectionsTelemetry" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterTelemetry" + }, + "requests": { + "$ref": "#/components/schemas/RequestsTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "name", + "startup", + "version" + ], + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppFeaturesTelemetry" + }, + { + "nullable": true + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + { + "nullable": true + } + ] + }, + "jwt_rbac": { + "type": "boolean", + "nullable": true + }, + "hide_jwt_dashboard": { + "type": "boolean", + "nullable": true + }, + "startup": { + "type": "string", + "format": "date-time" + } + } + }, + "AppFeaturesTelemetry": { + "type": "object", + "required": [ + "debug", + "recovery_mode", + "service_debug_feature", + "web_feature" + ], + "properties": { + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + }, + "recovery_mode": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "CollectionsTelemetry": { + "type": "object", + "required": [ + "number_of_collections" + ], + "properties": { + "number_of_collections": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetryEnum" + }, + "nullable": true + } + } + }, + "CollectionTelemetryEnum": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionTelemetry" + }, + { + "$ref": "#/components/schemas/CollectionsAggregatedTelemetry" + } + ] + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time_ms", + "resharding", + "shards", + "transfers" + ], + "properties": { + "id": { + "type": "string" + }, + "init_time_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplicaSetTelemetry" + } + }, + "transfers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + }, + "resharding": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReshardingInfo" + } + } + } + }, + "ReplicaSetTelemetry": { + "type": "object", + "required": [ + "id", + "remote", + "replicate_states" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "local": { + "anyOf": [ + { + "$ref": "#/components/schemas/LocalShardTelemetry" + }, + { + "nullable": true + } + ] + }, + "remote": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardTelemetry" + } + }, + "replicate_states": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ReplicaState" + } + } + } + }, + "LocalShardTelemetry": { + "type": "object", + "required": [ + "optimizations", + "segments", + "total_optimized_points" + ], + "properties": { + "variant_name": { + "type": "string", + "nullable": true + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardStatus" + }, + { + "nullable": true + } + ] + }, + "total_optimized_points": { + "description": "Total number of optimized points since the last start.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizations": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + }, + "ShardStatus": { + "description": "Current state of the shard (supports same states as the collection) `Green` - all good. `Yellow` - optimization is running, 'Grey' - optimizations are possible but not triggered, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "grey", + "red" + ] + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index_searches" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index_searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorIndexSearchesTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_indexed_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type", + "vector_data" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_indexed_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + }, + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "VectorDataInfo": { + "type": "object", + "required": [ + "num_deleted_vectors", + "num_indexed_vectors", + "num_vectors" + ], + "properties": { + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_indexed_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "SegmentConfig": { + "type": "object", + "required": [ + "payload_storage_type" + ], + "properties": { + "vector_data": { + "default": {}, + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "sparse_vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorDataConfig" + } + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "index", + "size", + "storage_type" + ], + "properties": { + "size": { + "description": "Size/dimensionality of the vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "storage_type": { + "$ref": "#/components/schemas/VectorStorageType" + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "quantization_config": { + "description": "Vector specific quantization config that overrides collection config", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + }, + "multivector_config": { + "description": "Vector specific configuration to enable multiple vectors per point", + "anyOf": [ + { + "$ref": "#/components/schemas/MultiVectorConfig" + }, + { + "nullable": true + } + ] + }, + "datatype": { + "description": "Vector specific configuration to set specific storage element type", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStorageDatatype" + }, + { + "nullable": true + } + ] + } + } + }, + "VectorStorageType": { + "description": "Storage types for vectors", + "oneOf": [ + { + "description": "Storage in memory (RAM)\n\nWill be very fast at the cost of consuming a lot of memory.", + "type": "string", + "enum": [ + "Memory" + ] + }, + { + "description": "Storage in mmap file, not appendable\n\nSearch performance is defined by disk speed and the fraction of vectors that fit in memory.", + "type": "string", + "enum": [ + "Mmap" + ] + }, + { + "description": "Storage in chunked mmap files, appendable\n\nSearch performance is defined by disk speed and the fraction of vectors that fit in memory.", + "type": "string", + "enum": [ + "ChunkedMmap" + ] + }, + { + "description": "Same as `ChunkedMmap`, but vectors are forced to be locked in RAM In this way we avoid cold requests to disk, but risk to run out of memory\n\nDesigned as a replacement for `Memory`, which doesn't depend on RocksDB", + "type": "string", + "enum": [ + "InRamChunkedMmap" + ] + } + ] + }, + "Indexes": { + "description": "Vector index configuration", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "VectorStorageDatatype": { + "description": "Storage types for vectors", + "type": "string", + "enum": [ + "float32", + "float16", + "uint8" + ] + }, + "SparseVectorDataConfig": { + "description": "Config of single sparse vector data storage", + "type": "object", + "required": [ + "index" + ], + "properties": { + "index": { + "$ref": "#/components/schemas/SparseIndexConfig" + } + } + }, + "SparseIndexConfig": { + "description": "Configuration for sparse inverted index.", + "type": "object", + "required": [ + "index_type" + ], + "properties": { + "full_scan_threshold": { + "description": "We prefer a full scan search upto (excluding) this number of vectors.\n\nNote: this is number of vectors, not KiloBytes.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "index_type": { + "$ref": "#/components/schemas/SparseIndexType" + }, + "datatype": { + "description": "Datatype used to store weights in the index.", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStorageDatatype" + }, + { + "nullable": true + } + ] + } + } + }, + "SparseIndexType": { + "description": "Sparse index types", + "oneOf": [ + { + "description": "Mutable RAM sparse index", + "type": "string", + "enum": [ + "MutableRam" + ] + }, + { + "description": "Immutable RAM sparse index", + "type": "string", + "enum": [ + "ImmutableRam" + ] + }, + { + "description": "Mmap sparse index", + "type": "string", + "enum": [ + "Mmap" + ] + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexSearchesTelemetry": { + "type": "object", + "required": [ + "filtered_exact", + "filtered_large_cardinality", + "filtered_plain", + "filtered_small_cardinality", + "filtered_sparse", + "unfiltered_exact", + "unfiltered_hnsw", + "unfiltered_plain", + "unfiltered_sparse" + ], + "properties": { + "index_name": { + "type": "string", + "nullable": true + }, + "unfiltered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_hnsw": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_sparse": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_small_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_large_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_sparse": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "OperationDurationStatistics": { + "type": "object", + "required": [ + "count", + "total_duration_micros" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "avg_duration_micros": { + "description": "The average time taken by 128 latest operations, calculated as a weighted mean.", + "type": "number", + "format": "float", + "nullable": true + }, + "min_duration_micros": { + "description": "The minimum duration of the operations across all the measurements.", + "type": "number", + "format": "float", + "nullable": true + }, + "max_duration_micros": { + "description": "The maximum duration of the operations across all the measurements.", + "type": "number", + "format": "float", + "nullable": true + }, + "total_duration_micros": { + "description": "The total duration of all operations in microseconds.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "last_responded": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "field_name": { + "type": "string", + "nullable": true + }, + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "type": "object", + "required": [ + "log", + "optimizations", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "optimizations": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "log": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TrackerTelemetry" + } + } + } + }, + "TrackerTelemetry": { + "description": "Tracker object used in telemetry", + "type": "object", + "required": [ + "name", + "segment_ids", + "start_at", + "status" + ], + "properties": { + "name": { + "description": "Name of the optimizer", + "type": "string" + }, + "segment_ids": { + "description": "Segment IDs being optimized", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + }, + "status": { + "$ref": "#/components/schemas/TrackerStatus" + }, + "start_at": { + "description": "Start time of the optimizer", + "type": "string", + "format": "date-time" + }, + "end_at": { + "description": "End time of the optimizer", + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "TrackerStatus": { + "description": "Represents the current state of the optimizer being tracked", + "oneOf": [ + { + "type": "string", + "enum": [ + "optimizing", + "done" + ] + }, + { + "type": "object", + "required": [ + "cancelled" + ], + "properties": { + "cancelled": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "RemoteShardTelemetry": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "searches": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "CollectionsAggregatedTelemetry": { + "type": "object", + "required": [ + "optimizers_status", + "params", + "vectors" + ], + "properties": { + "vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "optimizers_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + } + } + }, + "ClusterTelemetry": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterStatusTelemetry" + }, + { + "nullable": true + } + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + }, + { + "nullable": true + } + ] + }, + "peers": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + }, + "nullable": true + }, + "metadata": { + "type": "object", + "additionalProperties": true, + "nullable": true + } + } + }, + "ClusterStatusTelemetry": { + "type": "object", + "required": [ + "commit", + "consensus_thread_status", + "is_voter", + "number_of_peers", + "pending_operations", + "term" + ], + "properties": { + "number_of_peers": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "term": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "role": { + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "type": "boolean" + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "RequestsTelemetry": { + "type": "object", + "required": [ + "grpc", + "rest" + ], + "properties": { + "rest": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc": { + "$ref": "#/components/schemas/GrpcTelemetry" + } + } + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + } + }, + "GrpcTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/ReplicateShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + }, + { + "$ref": "#/components/schemas/DropReplicaOperation" + }, + { + "$ref": "#/components/schemas/CreateShardingKeyOperation" + }, + { + "$ref": "#/components/schemas/DropShardingKeyOperation" + }, + { + "$ref": "#/components/schemas/RestartTransferOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "method": { + "description": "Method for transferring the shard from one node to another", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardTransferMethod" + }, + { + "nullable": true + } + ] + } + } + }, + "ReplicateShardOperation": { + "type": "object", + "required": [ + "replicate_shard" + ], + "properties": { + "replicate_shard": { + "$ref": "#/components/schemas/ReplicateShard" + } + } + }, + "ReplicateShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "method": { + "description": "Method for transferring the shard from one node to another", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardTransferMethod" + }, + { + "nullable": true + } + ] + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/AbortShardTransfer" + } + } + }, + "AbortShardTransfer": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "DropReplicaOperation": { + "type": "object", + "required": [ + "drop_replica" + ], + "properties": { + "drop_replica": { + "$ref": "#/components/schemas/Replica" + } + } + }, + "Replica": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CreateShardingKeyOperation": { + "type": "object", + "required": [ + "create_sharding_key" + ], + "properties": { + "create_sharding_key": { + "$ref": "#/components/schemas/CreateShardingKey" + } + } + }, + "CreateShardingKey": { + "type": "object", + "required": [ + "shard_key" + ], + "properties": { + "shard_key": { + "$ref": "#/components/schemas/ShardKey" + }, + "shards_number": { + "description": "How many shards to create for this key If not specified, will use the default value from config", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "replication_factor": { + "description": "How many replicas to create for each shard If not specified, will use the default value from config", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "placement": { + "description": "Placement of shards for this key List of peer ids, that can be used to place shards for this key If not specified, will be randomly placed among all peers", + "type": "array", + "items": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "nullable": true + } + } + }, + "DropShardingKeyOperation": { + "type": "object", + "required": [ + "drop_sharding_key" + ], + "properties": { + "drop_sharding_key": { + "$ref": "#/components/schemas/DropShardingKey" + } + } + }, + "DropShardingKey": { + "type": "object", + "required": [ + "shard_key" + ], + "properties": { + "shard_key": { + "$ref": "#/components/schemas/ShardKey" + } + } + }, + "RestartTransferOperation": { + "type": "object", + "required": [ + "restart_transfer" + ], + "properties": { + "restart_transfer": { + "$ref": "#/components/schemas/RestartTransfer" + } + } + }, + "RestartTransfer": { + "type": "object", + "required": [ + "from_peer_id", + "method", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "method": { + "$ref": "#/components/schemas/ShardTransferMethod" + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "LocksOption": { + "type": "object", + "required": [ + "write" + ], + "properties": { + "error_message": { + "type": "string", + "nullable": true + }, + "write": { + "type": "boolean" + } + } + }, + "SnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "description": "Examples: - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot` - Local path `file:///qdrant/snapshots/test_collection-2022-08-04-10-49-10.snapshot`", + "type": "string", + "format": "uri" + }, + "priority": { + "description": "Defines which data should be used as a source of truth if there are other replicas in the cluster. If set to `Snapshot`, the snapshot will be used as a source of truth, and the current state will be overwritten. If set to `Replica`, the current state will be used as a source of truth, and after recovery if will be synchronized with the snapshot.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/SnapshotPriority" + }, + { + "nullable": true + } + ] + }, + "checksum": { + "description": "Optional SHA256 checksum to verify snapshot integrity before recovery.", + "default": null, + "type": "string", + "nullable": true + }, + "api_key": { + "description": "Optional API key used when fetching the snapshot from a remote URL.", + "default": null, + "type": "string", + "nullable": true + } + } + }, + "SnapshotPriority": { + "description": "Defines source of truth for snapshot recovery: `NoSync` means - restore snapshot without *any* additional synchronization. `Snapshot` means - prefer snapshot data over the current state. `Replica` means - prefer existing data over the snapshot.", + "type": "string", + "enum": [ + "no_sync", + "snapshot", + "replica" + ] + }, + "CollectionsAliasesResponse": { + "type": "object", + "required": [ + "aliases" + ], + "properties": { + "aliases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasDescription" + } + } + } + }, + "AliasDescription": { + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "alias_name": { + "type": "string" + }, + "collection_name": { + "type": "string" + } + }, + "example": { + "alias_name": "blogs-title", + "collection_name": "arivx-title" + } + }, + "WriteOrdering": { + "description": "Defines write ordering guarantees for collection operations\n\n* `weak` - write operations may be reordered, works faster, default\n\n* `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change\n\n* `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down", + "type": "string", + "enum": [ + "weak", + "medium", + "strong" + ] + }, + "ReadConsistency": { + "description": "Read consistency parameter\n\nDefines how many replicas should be queried to get the result\n\n* `N` - send N random request and return points, which present on all of them\n\n* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of them\n\n* `all` - send requests to all nodes and return points which present on all of them\n\nDefault value is `Factor(1)`", + "anyOf": [ + { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + { + "$ref": "#/components/schemas/ReadConsistencyType" + } + ] + }, + "ReadConsistencyType": { + "description": "* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of nodes\n\n* `all` - send requests to all nodes and return points which present on all nodes", + "type": "string", + "enum": [ + "majority", + "quorum", + "all" + ] + }, + "UpdateVectors": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "Points with named vectors", + "type": "array", + "items": { + "$ref": "#/components/schemas/PointVectors" + }, + "minItems": 1 + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointVectors": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + } + } + }, + "DeleteVectors": { + "type": "object", + "required": [ + "vector" + ], + "properties": { + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector names", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointGroup": { + "type": "object", + "required": [ + "hits", + "id" + ], + "properties": { + "hits": { + "description": "Scored points that have the same value of the group_by key", + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + }, + "id": { + "$ref": "#/components/schemas/GroupId" + }, + "lookup": { + "description": "Record that has been looked up using the group id", + "anyOf": [ + { + "$ref": "#/components/schemas/Record" + }, + { + "nullable": true + } + ] + } + } + }, + "GroupId": { + "description": "Value of the group_by key, shared across all the hits in the group", + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "integer", + "format": "int64" + } + ] + }, + "SearchGroupsRequest": { + "type": "object", + "required": [ + "group_by", + "group_size", + "limit", + "vector" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Options for specifying which vectors to include into response. Default is false.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "group_by": { + "description": "Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.", + "type": "string", + "minLength": 1 + }, + "group_size": { + "description": "Maximum amount of points to return per group", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "limit": { + "description": "Maximum amount of groups to return", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "with_lookup": { + "description": "Look for points in another collection using the group ids", + "anyOf": [ + { + "$ref": "#/components/schemas/WithLookupInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "WithLookupInterface": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/WithLookup" + } + ] + }, + "WithLookup": { + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection to use for points lookup", + "type": "string" + }, + "with_payload": { + "description": "Options for specifying which payload to include (or not)", + "default": true, + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vectors": { + "description": "Options for specifying which vectors to include (or not)", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + } + } + }, + "RecommendGroupsRequest": { + "type": "object", + "required": [ + "group_by", + "group_size", + "limit" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "positive": { + "description": "Look for vectors closest to those", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "strategy": { + "description": "How to use positive and negative examples to find the results", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/RecommendStrategy" + }, + { + "nullable": true + } + ] + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Options for specifying which vectors to include into response. Default is false.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + }, + "group_by": { + "description": "Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.", + "type": "string", + "minLength": 1 + }, + "group_size": { + "description": "Maximum amount of points to return per group", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "limit": { + "description": "Maximum amount of groups to return", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "with_lookup": { + "description": "Look for points in another collection using the group ids", + "anyOf": [ + { + "$ref": "#/components/schemas/WithLookupInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "GroupsResult": { + "type": "object", + "required": [ + "groups" + ], + "properties": { + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointGroup" + } + } + } + }, + "UpdateOperations": { + "type": "object", + "required": [ + "operations" + ], + "properties": { + "operations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateOperation" + } + } + } + }, + "UpdateOperation": { + "anyOf": [ + { + "$ref": "#/components/schemas/UpsertOperation" + }, + { + "$ref": "#/components/schemas/DeleteOperation" + }, + { + "$ref": "#/components/schemas/SetPayloadOperation" + }, + { + "$ref": "#/components/schemas/OverwritePayloadOperation" + }, + { + "$ref": "#/components/schemas/DeletePayloadOperation" + }, + { + "$ref": "#/components/schemas/ClearPayloadOperation" + }, + { + "$ref": "#/components/schemas/UpdateVectorsOperation" + }, + { + "$ref": "#/components/schemas/DeleteVectorsOperation" + } + ] + }, + "UpsertOperation": { + "type": "object", + "required": [ + "upsert" + ], + "properties": { + "upsert": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + }, + "DeleteOperation": { + "type": "object", + "required": [ + "delete" + ], + "properties": { + "delete": { + "$ref": "#/components/schemas/PointsSelector" + } + } + }, + "SetPayloadOperation": { + "type": "object", + "required": [ + "set_payload" + ], + "properties": { + "set_payload": { + "$ref": "#/components/schemas/SetPayload" + } + } + }, + "OverwritePayloadOperation": { + "type": "object", + "required": [ + "overwrite_payload" + ], + "properties": { + "overwrite_payload": { + "$ref": "#/components/schemas/SetPayload" + } + } + }, + "DeletePayloadOperation": { + "type": "object", + "required": [ + "delete_payload" + ], + "properties": { + "delete_payload": { + "$ref": "#/components/schemas/DeletePayload" + } + } + }, + "ClearPayloadOperation": { + "type": "object", + "required": [ + "clear_payload" + ], + "properties": { + "clear_payload": { + "$ref": "#/components/schemas/PointsSelector" + } + } + }, + "UpdateVectorsOperation": { + "type": "object", + "required": [ + "update_vectors" + ], + "properties": { + "update_vectors": { + "$ref": "#/components/schemas/UpdateVectors" + } + } + }, + "DeleteVectorsOperation": { + "type": "object", + "required": [ + "delete_vectors" + ], + "properties": { + "delete_vectors": { + "$ref": "#/components/schemas/DeleteVectors" + } + } + }, + "ShardSnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "$ref": "#/components/schemas/ShardSnapshotLocation" + }, + "priority": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/SnapshotPriority" + }, + { + "nullable": true + } + ] + }, + "checksum": { + "description": "Optional SHA256 checksum to verify snapshot integrity before recovery.", + "default": null, + "type": "string", + "nullable": true + }, + "api_key": { + "description": "Optional API key used when fetching the snapshot from a remote URL.", + "default": null, + "type": "string", + "nullable": true + } + } + }, + "ShardSnapshotLocation": { + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "string" + } + ] + }, + "DiscoverRequest": { + "description": "Use context and a target to find the most similar points, constrained by the context.", + "type": "object", + "required": [ + "limit" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "target": { + "description": "Look for vectors closest to this.\n\nWhen using the target (with or without context), the integer part of the score represents the rank with respect to the context, while the decimal part of the score relates to the distance to the target.", + "anyOf": [ + { + "$ref": "#/components/schemas/RecommendExample" + }, + { + "nullable": true + } + ] + }, + "context": { + "description": "Pairs of { positive, negative } examples to constrain the search.\n\nWhen using only the context (without a target), a special search - called context search - is performed where pairs of points are used to generate a loss that guides the search towards the zone where most positive examples overlap. This means that the score minimizes the scenario of finding a point closer to a negative than to a positive part of a pair.\n\nSince the score of a context relates to loss, the maximum score a point can get is 0.0, and it becomes normal that many points can have a score of 0.0.\n\nFor discovery search (when including a target), the context part of the score for each pair is calculated +1 if the point is closer to a positive than to a negative part of a pair, and -1 otherwise.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ContextExamplePair" + }, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "with_payload": { + "description": "Select which payload to return with the response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Options for specifying which vectors to include into response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "ContextExamplePair": { + "type": "object", + "required": [ + "negative", + "positive" + ], + "properties": { + "positive": { + "$ref": "#/components/schemas/RecommendExample" + }, + "negative": { + "$ref": "#/components/schemas/RecommendExample" + } + } + }, + "DiscoverRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DiscoverRequest" + } + } + } + }, + "VersionInfo": { + "type": "object", + "required": [ + "title", + "version" + ], + "properties": { + "title": { + "type": "string" + }, + "version": { + "type": "string" + }, + "commit": { + "type": "string", + "nullable": true + } + } + }, + "CollectionExistence": { + "description": "State of existence of a collection, true = exists, false = does not exist", + "type": "object", + "required": [ + "exists" + ], + "properties": { + "exists": { + "type": "boolean" + } + } + }, + "QueryRequest": { + "type": "object", + "properties": { + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "prefetch": { + "description": "Sub-requests to perform first. If present, the query will be performed on the results of the prefetch(es).", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/Prefetch" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Prefetch" + } + }, + { + "nullable": true + } + ] + }, + "query": { + "description": "Query to perform. If missing without prefetches, returns points ordered by their IDs.", + "anyOf": [ + { + "$ref": "#/components/schemas/QueryInterface" + }, + { + "nullable": true + } + ] + }, + "using": { + "description": "Define which vector name to use for querying. If missing, the default vector is used.", + "type": "string", + "nullable": true + }, + "filter": { + "description": "Filter conditions - return only those points that satisfy the specified conditions.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Search params for when there is no prefetch", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Return points with scores better than this threshold.", + "type": "number", + "format": "float", + "nullable": true + }, + "limit": { + "description": "Max number of points to return. Default is 10.", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "offset": { + "description": "Offset of the result. Skip this many points. Default is 0", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "with_vector": { + "description": "Options for specifying which vectors to include into the response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Options for specifying which payload to include or not. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location to use for IDs lookup, if not specified - use the current collection and the 'using' vector Note: the other collection vectors should have the same vector size as the 'using' vector in the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "Prefetch": { + "type": "object", + "properties": { + "prefetch": { + "description": "Sub-requests to perform first. If present, the query will be performed on the results of the prefetches.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/Prefetch" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Prefetch" + } + }, + { + "nullable": true + } + ] + }, + "query": { + "description": "Query to perform. If missing without prefetches, returns points ordered by their IDs.", + "anyOf": [ + { + "$ref": "#/components/schemas/QueryInterface" + }, + { + "nullable": true + } + ] + }, + "using": { + "description": "Define which vector name to use for querying. If missing, the default vector is used.", + "type": "string", + "nullable": true + }, + "filter": { + "description": "Filter conditions - return only those points that satisfy the specified conditions.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Search params for when there is no prefetch", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Return points with scores better than this threshold.", + "type": "number", + "format": "float", + "nullable": true + }, + "limit": { + "description": "Max number of points to return. Default is 10.", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "lookup_from": { + "description": "The location to use for IDs lookup, if not specified - use the current collection and the 'using' vector Note: the other collection vectors should have the same vector size as the 'using' vector in the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "QueryInterface": { + "anyOf": [ + { + "$ref": "#/components/schemas/VectorInput" + }, + { + "$ref": "#/components/schemas/Query" + } + ] + }, + "VectorInput": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/SparseVector" + }, + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "$ref": "#/components/schemas/Document" + } + ] + }, + "Query": { + "anyOf": [ + { + "$ref": "#/components/schemas/NearestQuery" + }, + { + "$ref": "#/components/schemas/RecommendQuery" + }, + { + "$ref": "#/components/schemas/DiscoverQuery" + }, + { + "$ref": "#/components/schemas/ContextQuery" + }, + { + "$ref": "#/components/schemas/OrderByQuery" + }, + { + "$ref": "#/components/schemas/FusionQuery" + }, + { + "$ref": "#/components/schemas/SampleQuery" + } + ] + }, + "NearestQuery": { + "type": "object", + "required": [ + "nearest" + ], + "properties": { + "nearest": { + "$ref": "#/components/schemas/VectorInput" + } + } + }, + "RecommendQuery": { + "type": "object", + "required": [ + "recommend" + ], + "properties": { + "recommend": { + "$ref": "#/components/schemas/RecommendInput" + } + } + }, + "RecommendInput": { + "type": "object", + "properties": { + "positive": { + "description": "Look for vectors closest to the vectors from these points", + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorInput" + }, + "nullable": true + }, + "negative": { + "description": "Try to avoid vectors like the vector from these points", + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorInput" + }, + "nullable": true + }, + "strategy": { + "description": "How to use the provided vectors to find the results", + "anyOf": [ + { + "$ref": "#/components/schemas/RecommendStrategy" + }, + { + "nullable": true + } + ] + } + } + }, + "DiscoverQuery": { + "type": "object", + "required": [ + "discover" + ], + "properties": { + "discover": { + "$ref": "#/components/schemas/DiscoverInput" + } + } + }, + "DiscoverInput": { + "type": "object", + "required": [ + "context", + "target" + ], + "properties": { + "target": { + "$ref": "#/components/schemas/VectorInput" + }, + "context": { + "description": "Search space will be constrained by these pairs of vectors", + "anyOf": [ + { + "$ref": "#/components/schemas/ContextPair" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContextPair" + } + }, + { + "nullable": true + } + ] + } + } + }, + "ContextPair": { + "type": "object", + "required": [ + "negative", + "positive" + ], + "properties": { + "positive": { + "$ref": "#/components/schemas/VectorInput" + }, + "negative": { + "$ref": "#/components/schemas/VectorInput" + } + } + }, + "ContextQuery": { + "type": "object", + "required": [ + "context" + ], + "properties": { + "context": { + "$ref": "#/components/schemas/ContextInput" + } + } + }, + "ContextInput": { + "anyOf": [ + { + "$ref": "#/components/schemas/ContextPair" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContextPair" + } + }, + { + "nullable": true + } + ] + }, + "OrderByQuery": { + "type": "object", + "required": [ + "order_by" + ], + "properties": { + "order_by": { + "$ref": "#/components/schemas/OrderByInterface" + } + } + }, + "FusionQuery": { + "type": "object", + "required": [ + "fusion" + ], + "properties": { + "fusion": { + "$ref": "#/components/schemas/Fusion" + } + } + }, + "Fusion": { + "description": "Fusion algorithm allows to combine results of multiple prefetches.\n\nAvailable fusion algorithms:\n\n* `rrf` - Reciprocal Rank Fusion * `dbsf` - Distribution-Based Score Fusion", + "type": "string", + "enum": [ + "rrf", + "dbsf" + ] + }, + "SampleQuery": { + "type": "object", + "required": [ + "sample" + ], + "properties": { + "sample": { + "$ref": "#/components/schemas/Sample" + } + } + }, + "Sample": { + "type": "string", + "enum": [ + "random" + ] + }, + "QueryRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueryRequest" + } + } + } + }, + "QueryResponse": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + }, + "QueryGroupsRequest": { + "type": "object", + "required": [ + "group_by" + ], + "properties": { + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "prefetch": { + "description": "Sub-requests to perform first. If present, the query will be performed on the results of the prefetch(es).", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/Prefetch" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Prefetch" + } + }, + { + "nullable": true + } + ] + }, + "query": { + "description": "Query to perform. If missing without prefetches, returns points ordered by their IDs.", + "anyOf": [ + { + "$ref": "#/components/schemas/QueryInterface" + }, + { + "nullable": true + } + ] + }, + "using": { + "description": "Define which vector name to use for querying. If missing, the default vector is used.", + "type": "string", + "nullable": true + }, + "filter": { + "description": "Filter conditions - return only those points that satisfy the specified conditions.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Search params for when there is no prefetch", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Return points with scores better than this threshold.", + "type": "number", + "format": "float", + "nullable": true + }, + "with_vector": { + "description": "Options for specifying which vectors to include into the response. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Options for specifying which payload to include or not. Default is false.", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location to use for IDs lookup, if not specified - use the current collection and the 'using' vector Note: the other collection vectors should have the same vector size as the 'using' vector in the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + }, + "group_by": { + "description": "Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.", + "type": "string", + "minLength": 1 + }, + "group_size": { + "description": "Maximum amount of points to return per group. Default is 3.", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "limit": { + "description": "Maximum amount of groups to return. Default is 10.", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "with_lookup": { + "description": "Look for points in another collection using the group ids", + "anyOf": [ + { + "$ref": "#/components/schemas/WithLookupInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "SearchMatrixRequest": { + "type": "object", + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "sample": { + "description": "How many points to select and search within. Default is 10.", + "type": "integer", + "format": "uint", + "minimum": 2, + "nullable": true + }, + "limit": { + "description": "How many neighbours per sample to find. Default is 3.", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "using": { + "description": "Define which vector name to use for querying. If missing, the default vector is used.", + "type": "string", + "nullable": true + } + } + }, + "SearchMatrixOffsetsResponse": { + "type": "object", + "required": [ + "ids", + "offsets_col", + "offsets_row", + "scores" + ], + "properties": { + "offsets_row": { + "description": "Row indices of the matrix", + "type": "array", + "items": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "offsets_col": { + "description": "Column indices of the matrix", + "type": "array", + "items": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + }, + "scores": { + "description": "Scores associated with matrix coordinates", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "ids": { + "description": "Ids of the points in order", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "SearchMatrixPairsResponse": { + "type": "object", + "required": [ + "pairs" + ], + "properties": { + "pairs": { + "description": "List of pairs of points with scores", + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchMatrixPair" + } + } + } + }, + "SearchMatrixPair": { + "description": "Pair of points (a, b) with score", + "type": "object", + "required": [ + "a", + "b", + "score" + ], + "properties": { + "a": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "b": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "score": { + "type": "number", + "format": "float" + } + } + }, + "FacetRequest": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "key": { + "description": "Payload key to use for faceting.", + "type": "string" + }, + "limit": { + "description": "Max number of hits to return. Default is 10.", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "filter": { + "description": "Filter conditions - only consider points that satisfy these conditions.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "Whether to do a more expensive exact count for each of the values in the facet. Default is false.", + "type": "boolean", + "nullable": true + } + } + }, + "FacetResponse": { + "type": "object", + "required": [ + "hits" + ], + "properties": { + "hits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FacetValueHit" + } + } + } + }, + "FacetValueHit": { + "type": "object", + "required": [ + "count", + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/FacetValue" + }, + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "FacetValue": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + } + } + } +} diff --git a/docs/redoc/v1.2.x/openapi.json b/docs/redoc/v1.2.x/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..342bc845e609dde253da1c2f19e737b685d5b86e --- /dev/null +++ b/docs/redoc/v1.2.x/openapi.json @@ -0,0 +1,8061 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + }, + "/metrics": { + "get": { + "summary": "Collect Prometheus metrics data", + "description": "Collect metrics data including app info, collections info, cluster info and statistics", + "operationId": "metrics", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Metrics data in Prometheus format", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "# HELP app_info information about qdrant server\n# TYPE app_info counter\napp_info{name=\"qdrant\",version=\"0.11.1\"} 1\n# HELP cluster_enabled is cluster support enabled\n# TYPE cluster_enabled gauge\ncluster_enabled 0\n# HELP collections_total number of collections\n# TYPE collections_total gauge\ncollections_total 1\n" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/locks": { + "post": { + "summary": "Set lock options", + "description": "Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options", + "operationId": "post_locks", + "tags": [ + "service" + ], + "requestBody": { + "description": "Lock options and optional error message", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + }, + "get": { + "summary": "Get lock options", + "description": "Get lock options. If write is locked, all write operations and collection creation are forbidden", + "operationId": "get_locks", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/recover": { + "post": { + "tags": [ + "cluster" + ], + "summary": "Tries to recover current peer Raft state.", + "operationId": "recover_current_peer", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "force", + "in": "query", + "description": "If true - removes peer even if it has shards/replicas on it.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List aliases for collection", + "description": "Get list of all aliases for a collection", + "operationId": "get_collection_aliases", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections aliases", + "description": "Get list of all existing collections aliases", + "operationId": "get_collections_aliases", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/upload": { + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from an uploaded snapshot", + "description": "Recover local collection data from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_uploaded_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "priority", + "in": "query", + "description": "Defines source of truth for snapshot recovery", + "required": false, + "schema": { + "$ref": "#/components/schemas/SnapshotPriority" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "snapshot": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Delete collection snapshot", + "description": "Delete snapshot for a collection", + "operationId": "delete_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "parameters": [ + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots" + ], + "summary": "Delete storage snapshot", + "description": "Delete snapshot of the whole storage", + "operationId": "delete_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the full snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/vectors": { + "put": { + "tags": [ + "points" + ], + "summary": "Update vectors", + "description": "Update specified named vectors on points, keep unspecified vectors intact.", + "operationId": "update_vectors", + "requestBody": { + "description": "Update named vectors on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateVectors" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/vectors/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete vectors", + "description": "Delete named vectors from the given points.", + "operationId": "delete_vectors", + "requestBody": { + "description": "Delete named vectors from points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteVectors" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload values for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Overwrite payload", + "description": "Replace full payload of points with new one", + "operationId": "overwrite_payload", + "requestBody": { + "description": "Payload and points selector", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/groups": { + "post": { + "tags": [ + "points" + ], + "summary": "Search point groups", + "description": "Retrieve closest points based on vector similarity and given filtering conditions, grouped by a given payload field", + "operationId": "search_point_groups", + "requestBody": { + "description": "Search request with optional filtering, grouped by a given payload field", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchGroupsRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/GroupsResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/groups": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend point groups", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples, grouped by a given payload field.", + "operationId": "recommend_point_groups", + "requestBody": { + "description": "Request points based on positive and negative examples, grouped by a payload field.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendGroupsRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/GroupsResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v1.2.x" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection All vectors in collection are available for querying Calculated as `points_count x vectors_per_point` Where `vectors_per_point` is a number of named vectors in schema", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in vector index (HNSW)", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points (vectors + payloads) in collection Each point could be accessed by unique id", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection. Each segment has independent vector as payload indexes", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection. `Green` - all good. `Yellow` - optimization is running, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + }, + "quantization_config": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "replication_factor": { + "description": "Number of replicas for each shard", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Custom params for quantization. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + }, + "on_disk": { + "description": "If true, vectors are served from disk, improving RAM usage at the cost of latency Default: false", + "type": "boolean", + "nullable": true + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build the index.", + "type": "integer", + "format": "uint", + "minimum": 4, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in kilobytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 1000, + "nullable": true + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "type": "integer", + "format": "uint", + "minimum": 1000, + "nullable": true + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, the index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for additional payload-aware HNSW links. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "QuantizationConfig": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScalarQuantization" + }, + { + "$ref": "#/components/schemas/ProductQuantization" + } + ] + }, + "ScalarQuantization": { + "type": "object", + "required": [ + "scalar" + ], + "properties": { + "scalar": { + "$ref": "#/components/schemas/ScalarQuantizationConfig" + } + } + }, + "ScalarQuantizationConfig": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/ScalarType" + }, + "quantile": { + "description": "Quantile for quantization. Expected value range in [0.5, 1.0]. If not set - use the whole range of values", + "type": "number", + "format": "float", + "maximum": 1, + "minimum": 0.5, + "nullable": true + }, + "always_ram": { + "description": "If true - quantized vectors always will be stored in RAM, ignoring the config of main storage", + "type": "boolean", + "nullable": true + } + } + }, + "ScalarType": { + "type": "string", + "enum": [ + "int8" + ] + }, + "ProductQuantization": { + "type": "object", + "required": [ + "product" + ], + "properties": { + "product": { + "$ref": "#/components/schemas/ProductQuantizationConfig" + } + } + }, + "ProductQuantizationConfig": { + "type": "object", + "required": [ + "compression" + ], + "properties": { + "compression": { + "$ref": "#/components/schemas/CompressionRatio" + }, + "always_ram": { + "type": "boolean", + "nullable": true + } + } + }, + "CompressionRatio": { + "type": "string", + "enum": [ + "x4", + "x8", + "x16", + "x32", + "x64" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 4 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for hnsw graph built for payload index. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "maximum": 1, + "minimum": 0 + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 100 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads. If `default_segment_number = 0`, will be automatically selected by the number of available CPUs.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexing speed is more important - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.\n\nMemmap storage is disabled by default, to enable it, set this threshold to a reasonable value.\n\nTo disable memmap storage, set this to `0`. Internally it will use the largest threshold possible.\n\nNote: 1Kb = 1 vector of size 256", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing\n\nDefault value is 20,000, based on .\n\nTo disable vector indexing, set to `0`.\n\nNote: 1kB = 1 vector of size 256.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type", + "points" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + }, + "points": { + "description": "Number of points indexed with this index", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unanmed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/IsNullCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/NestedCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + }, + { + "$ref": "#/components/schemas/MatchAny" + }, + { + "$ref": "#/components/schemas/MatchExcept" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "MatchAny": { + "description": "Exact match on any of the given values", + "type": "object", + "required": [ + "any" + ], + "properties": { + "any": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "AnyVariants": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + ] + }, + "MatchExcept": { + "description": "Should have at least one value not matching the any given values", + "type": "object", + "required": [ + "except" + ], + "properties": { + "except": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "IsNullCondition": { + "description": "Select points with null payload for a specified field", + "type": "object", + "required": [ + "is_null" + ], + "properties": { + "is_null": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "NestedCondition": { + "type": "object", + "required": [ + "nested" + ], + "properties": { + "nested": { + "$ref": "#/components/schemas/Nested" + } + } + }, + "Nested": { + "description": "Select points with payload for a specified nested field", + "type": "object", + "required": [ + "filter", + "key" + ], + "properties": { + "key": { + "type": "string" + }, + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "exact": { + "description": "Search without approximation. If set to true, search may run long but with exact results.", + "default": false, + "type": "boolean" + }, + "quantization": { + "description": "Quantization params", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationSearchParams" + }, + { + "nullable": true + } + ] + } + } + }, + "QuantizationSearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "ignore": { + "description": "If true, quantized vectors are ignored. Default is false.", + "default": false, + "type": "boolean" + }, + "rescore": { + "description": "If true, use original vectors to re-score top-k results. Might require more time in case if original vectors are stored on disk. Default is false.", + "default": false, + "type": "boolean" + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "description": "`Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.", + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "LookupLocation": { + "description": "Defines a location to use for looking up the vector. Specifies collection and vector field name.", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection used for lookup", + "type": "string" + }, + "vector": { + "description": "Optional name of the vector field within the collection. If not provided, the default vector field will be used.", + "default": null, + "type": "string", + "nullable": true + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "replication_factor": { + "description": "Number of shards replicas. Default is 1 Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "init_from": { + "description": "Specify other collection to copy data from.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/InitFrom" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Quantization parameters. If none - quantization is disabled.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.\n\nMemmap storage is disabled by default, to enable it, set this threshold to a reasonable value.\n\nTo disable memmap storage, set this to `0`.\n\nNote: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing\n\nDefault value is 20,000, based on .\n\nTo disable vector indexing, set to `0`.\n\nNote: 1kB = 1 vector of size 256.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "InitFrom": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "type": "string" + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Collection base params. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionParamsDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParamsDiff": { + "type": "object", + "properties": { + "replication_factor": { + "description": "Number of replicas for each shard", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Minimal number successful responses from replicas to consider operation successful", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Assigns payload to each point that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys" + ], + "properties": { + "keys": { + "description": "List of payload keys to remove from payload", + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "message_send_failures", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + }, + "message_send_failures": { + "description": "Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MessageSendErrors" + } + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "description": "Role of the peer in the consensus", + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "MessageSendErrors": { + "description": "Message send failures for a particular peer", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "latest_error": { + "type": "string", + "nullable": true + } + } + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ReplicaState": { + "description": "State of the single shard within a replica set.", + "type": "string", + "enum": [ + "Active", + "Dead", + "Partial", + "Initializing", + "Listener" + ] + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "sync", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sync": { + "description": "If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another", + "type": "boolean" + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster", + "collections", + "id", + "requests" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "collections": { + "$ref": "#/components/schemas/CollectionsTelemetry" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterTelemetry" + }, + "requests": { + "$ref": "#/components/schemas/RequestsTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "name", + "startup", + "version" + ], + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppFeaturesTelemetry" + }, + { + "nullable": true + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + { + "nullable": true + } + ] + }, + "startup": { + "type": "string", + "format": "date-time" + } + } + }, + "AppFeaturesTelemetry": { + "type": "object", + "required": [ + "debug", + "service_debug_feature", + "web_feature" + ], + "properties": { + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "CollectionsTelemetry": { + "type": "object", + "required": [ + "number_of_collections" + ], + "properties": { + "number_of_collections": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetryEnum" + }, + "nullable": true + } + } + }, + "CollectionTelemetryEnum": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionTelemetry" + }, + { + "$ref": "#/components/schemas/CollectionsAggregatedTelemetry" + } + ] + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time_ms", + "shards", + "transfers" + ], + "properties": { + "id": { + "type": "string" + }, + "init_time_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplicaSetTelemetry" + } + }, + "transfers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "ReplicaSetTelemetry": { + "type": "object", + "required": [ + "id", + "remote", + "replicate_states" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "local": { + "anyOf": [ + { + "$ref": "#/components/schemas/LocalShardTelemetry" + }, + { + "nullable": true + } + ] + }, + "remote": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardTelemetry" + } + }, + "replicate_states": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ReplicaState" + } + } + } + }, + "LocalShardTelemetry": { + "type": "object", + "required": [ + "optimizations", + "segments" + ], + "properties": { + "variant_name": { + "type": "string", + "nullable": true + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizations": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index_searches" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index_searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorIndexSearchesTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "payload_storage_type", + "vector_data" + ], + "properties": { + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "index", + "size", + "storage_type" + ], + "properties": { + "size": { + "description": "Size/dimensionality of the vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "storage_type": { + "$ref": "#/components/schemas/VectorStorageType" + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "quantization_config": { + "description": "Vector specific quantization config that overrides collection config", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "VectorStorageType": { + "description": "Storage types for vectors", + "oneOf": [ + { + "description": "Storage in memory (RAM)\n\nWill be very fast at the cost of consuming a lot of memory.", + "type": "string", + "enum": [ + "Memory" + ] + }, + { + "description": "Storage in mmap file, not appendable\n\nSearch performance is defined by disk speed and the fraction of vectors that fit in memory.", + "type": "string", + "enum": [ + "Mmap" + ] + }, + { + "description": "Storage in chunked mmap files, appendable\n\nSearch performance is defined by disk speed and the fraction of vectors that fit in memory.", + "type": "string", + "enum": [ + "ChunkedMmap" + ] + } + ] + }, + "Indexes": { + "description": "Vector index configuration", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexSearchesTelemetry": { + "type": "object", + "required": [ + "filtered_exact", + "filtered_large_cardinality", + "filtered_plain", + "filtered_small_cardinality", + "unfiltered_exact", + "unfiltered_hnsw", + "unfiltered_plain" + ], + "properties": { + "index_name": { + "type": "string", + "nullable": true + }, + "unfiltered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_hnsw": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_small_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_large_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "OperationDurationStatistics": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "avg_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "min_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "max_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "last_responded": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "field_name": { + "type": "string", + "nullable": true + }, + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "type": "object", + "required": [ + "optimizations", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "optimizations": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "RemoteShardTelemetry": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "searches": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "CollectionsAggregatedTelemetry": { + "type": "object", + "required": [ + "optimizers_status", + "params", + "vectors" + ], + "properties": { + "vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "optimizers_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + } + } + }, + "ClusterTelemetry": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterStatusTelemetry" + }, + { + "nullable": true + } + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatusTelemetry": { + "type": "object", + "required": [ + "commit", + "consensus_thread_status", + "is_voter", + "number_of_peers", + "pending_operations", + "term" + ], + "properties": { + "number_of_peers": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "term": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "role": { + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "type": "boolean" + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "RequestsTelemetry": { + "type": "object", + "required": [ + "grpc", + "rest" + ], + "properties": { + "rest": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc": { + "$ref": "#/components/schemas/GrpcTelemetry" + } + } + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + } + }, + "GrpcTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/ReplicateShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + }, + { + "$ref": "#/components/schemas/DropReplicaOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ReplicateShardOperation": { + "type": "object", + "required": [ + "replicate_shard" + ], + "properties": { + "replicate_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "DropReplicaOperation": { + "type": "object", + "required": [ + "drop_replica" + ], + "properties": { + "drop_replica": { + "$ref": "#/components/schemas/Replica" + } + } + }, + "Replica": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "LocksOption": { + "type": "object", + "required": [ + "write" + ], + "properties": { + "error_message": { + "type": "string", + "nullable": true + }, + "write": { + "type": "boolean" + } + } + }, + "SnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "description": "Examples: - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot` - Local path `file:///qdrant/snapshots/test_collection-2022-08-04-10-49-10.snapshot`", + "type": "string", + "format": "uri" + }, + "priority": { + "description": "Defines which data should be used as a source of truth if there are other replicas in the cluster. If set to `Snapshot`, the snapshot will be used as a source of truth, and the current state will be overwritten. If set to `Replica`, the current state will be used as a source of truth, and after recovery if will be synchronized with the snapshot.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/SnapshotPriority" + }, + { + "nullable": true + } + ] + } + } + }, + "SnapshotPriority": { + "description": "Defines source of truth for snapshot recovery `Snapshot` means - prefer snapshot data over the current state `Replica` means - prefer existing data over the snapshot", + "type": "string", + "enum": [ + "snapshot", + "replica" + ] + }, + "CollectionsAliasesResponse": { + "type": "object", + "required": [ + "aliases" + ], + "properties": { + "aliases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasDescription" + } + } + } + }, + "AliasDescription": { + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "alias_name": { + "type": "string" + }, + "collection_name": { + "type": "string" + } + } + }, + "WriteOrdering": { + "description": "Defines write ordering guarantees for collection operations\n\n* `weak` - write operations may be reordered, works faster, default\n\n* `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change\n\n* `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down", + "type": "string", + "enum": [ + "weak", + "medium", + "strong" + ] + }, + "ReadConsistency": { + "description": "Read consistency parameter\n\nDefines how many replicas should be queried to get the result\n\n* `N` - send N random request and return points, which present on all of them\n\n* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of them\n\n* `all` - send requests to all nodes and return points which present on all of them\n\nDefault value is `Factor(1)`", + "anyOf": [ + { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + { + "$ref": "#/components/schemas/ReadConsistencyType" + } + ] + }, + "ReadConsistencyType": { + "description": "* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of nodes\n\n* `all` - send requests to all nodes and return points which present on all nodes", + "type": "string", + "enum": [ + "majority", + "quorum", + "all" + ] + }, + "UpdateVectors": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "Points with named vectors", + "type": "array", + "items": { + "$ref": "#/components/schemas/PointVectors" + }, + "minItems": 1 + } + } + }, + "PointVectors": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + } + } + }, + "DeleteVectors": { + "type": "object", + "required": [ + "vector" + ], + "properties": { + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector names", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + } + } + }, + "PointGroup": { + "type": "object", + "required": [ + "hits", + "id" + ], + "properties": { + "hits": { + "description": "Scored points that have the same value of the group_by key", + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + }, + "id": { + "$ref": "#/components/schemas/GroupId" + } + } + }, + "GroupId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "integer", + "format": "int64" + } + ] + }, + "SearchGroupsRequest": { + "type": "object", + "required": [ + "group_by", + "group_size", + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "group_by": { + "description": "Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.", + "type": "string", + "minLength": 1 + }, + "group_size": { + "description": "Maximum amount of points to return per group", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "limit": { + "description": "Maximum amount of groups to return", + "type": "integer", + "format": "uint32", + "minimum": 1 + } + } + }, + "RecommendGroupsRequest": { + "type": "object", + "required": [ + "group_by", + "group_size", + "limit", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + }, + "group_by": { + "description": "Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.", + "type": "string", + "minLength": 1 + }, + "group_size": { + "description": "Maximum amount of points to return per group", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "limit": { + "description": "Maximum amount of groups to return", + "type": "integer", + "format": "uint32", + "minimum": 1 + } + } + }, + "GroupsResult": { + "type": "object", + "required": [ + "groups" + ], + "properties": { + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointGroup" + } + } + } + } + } + } +} diff --git a/docs/redoc/v1.3.x/openapi.json b/docs/redoc/v1.3.x/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..c409057cb00caadca64f110e8a72135b00036e0c --- /dev/null +++ b/docs/redoc/v1.3.x/openapi.json @@ -0,0 +1,8152 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + }, + "/metrics": { + "get": { + "summary": "Collect Prometheus metrics data", + "description": "Collect metrics data including app info, collections info, cluster info and statistics", + "operationId": "metrics", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Metrics data in Prometheus format", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "# HELP app_info information about qdrant server\n# TYPE app_info counter\napp_info{name=\"qdrant\",version=\"0.11.1\"} 1\n# HELP cluster_enabled is cluster support enabled\n# TYPE cluster_enabled gauge\ncluster_enabled 0\n# HELP collections_total number of collections\n# TYPE collections_total gauge\ncollections_total 1\n" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/locks": { + "post": { + "summary": "Set lock options", + "description": "Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options", + "operationId": "post_locks", + "tags": [ + "service" + ], + "requestBody": { + "description": "Lock options and optional error message", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + }, + "get": { + "summary": "Get lock options", + "description": "Get lock options. If write is locked, all write operations and collection creation are forbidden", + "operationId": "get_locks", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/recover": { + "post": { + "tags": [ + "cluster" + ], + "summary": "Tries to recover current peer Raft state.", + "operationId": "recover_current_peer", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "force", + "in": "query", + "description": "If true - removes peer even if it has shards/replicas on it.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List aliases for collection", + "description": "Get list of all aliases for a collection", + "operationId": "get_collection_aliases", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections aliases", + "description": "Get list of all existing collections aliases", + "operationId": "get_collections_aliases", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/upload": { + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from an uploaded snapshot", + "description": "Recover local collection data from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_uploaded_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "priority", + "in": "query", + "description": "Defines source of truth for snapshot recovery", + "required": false, + "schema": { + "$ref": "#/components/schemas/SnapshotPriority" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "snapshot": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Delete collection snapshot", + "description": "Delete snapshot for a collection", + "operationId": "delete_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "parameters": [ + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots" + ], + "summary": "Delete storage snapshot", + "description": "Delete snapshot of the whole storage", + "operationId": "delete_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the full snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/vectors": { + "put": { + "tags": [ + "points" + ], + "summary": "Update vectors", + "description": "Update specified named vectors on points, keep unspecified vectors intact.", + "operationId": "update_vectors", + "requestBody": { + "description": "Update named vectors on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateVectors" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/vectors/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete vectors", + "description": "Delete named vectors from the given points.", + "operationId": "delete_vectors", + "requestBody": { + "description": "Delete named vectors from points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteVectors" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload values for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Overwrite payload", + "description": "Replace full payload of points with new one", + "operationId": "overwrite_payload", + "requestBody": { + "description": "Payload and points selector", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/groups": { + "post": { + "tags": [ + "points" + ], + "summary": "Search point groups", + "description": "Retrieve closest points based on vector similarity and given filtering conditions, grouped by a given payload field", + "operationId": "search_point_groups", + "requestBody": { + "description": "Search request with optional filtering, grouped by a given payload field", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchGroupsRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/GroupsResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/groups": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend point groups", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples, grouped by a given payload field.", + "operationId": "recommend_point_groups", + "requestBody": { + "description": "Request points based on positive and negative examples, grouped by a payload field.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendGroupsRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/GroupsResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v1.3.x" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection All vectors in collection are available for querying Calculated as `points_count x vectors_per_point` Where `vectors_per_point` is a number of named vectors in schema", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in vector index (HNSW)", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points (vectors + payloads) in collection Each point could be accessed by unique id", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection. Each segment has independent vector as payload indexes", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection. `Green` - all good. `Yellow` - optimization is running, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + }, + "quantization_config": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "replication_factor": { + "description": "Number of replicas for each shard", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Custom params for quantization. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + }, + "on_disk": { + "description": "If true, vectors are served from disk, improving RAM usage at the cost of latency Default: false", + "type": "boolean", + "nullable": true + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build the index.", + "type": "integer", + "format": "uint", + "minimum": 4, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in kilobytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 10, + "nullable": true + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, the index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for additional payload-aware HNSW links. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "QuantizationConfig": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScalarQuantization" + }, + { + "$ref": "#/components/schemas/ProductQuantization" + } + ] + }, + "ScalarQuantization": { + "type": "object", + "required": [ + "scalar" + ], + "properties": { + "scalar": { + "$ref": "#/components/schemas/ScalarQuantizationConfig" + } + } + }, + "ScalarQuantizationConfig": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/ScalarType" + }, + "quantile": { + "description": "Quantile for quantization. Expected value range in [0.5, 1.0]. If not set - use the whole range of values", + "type": "number", + "format": "float", + "maximum": 1, + "minimum": 0.5, + "nullable": true + }, + "always_ram": { + "description": "If true - quantized vectors always will be stored in RAM, ignoring the config of main storage", + "type": "boolean", + "nullable": true + } + } + }, + "ScalarType": { + "type": "string", + "enum": [ + "int8" + ] + }, + "ProductQuantization": { + "type": "object", + "required": [ + "product" + ], + "properties": { + "product": { + "$ref": "#/components/schemas/ProductQuantizationConfig" + } + } + }, + "ProductQuantizationConfig": { + "type": "object", + "required": [ + "compression" + ], + "properties": { + "compression": { + "$ref": "#/components/schemas/CompressionRatio" + }, + "always_ram": { + "type": "boolean", + "nullable": true + } + } + }, + "CompressionRatio": { + "type": "string", + "enum": [ + "x4", + "x8", + "x16", + "x32", + "x64" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 4 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for hnsw graph built for payload index. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "maximum": 1, + "minimum": 0 + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 100 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads. If `default_segment_number = 0`, will be automatically selected by the number of available CPUs.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexing speed is more important - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.\n\nMemmap storage is disabled by default, to enable it, set this threshold to a reasonable value.\n\nTo disable memmap storage, set this to `0`. Internally it will use the largest threshold possible.\n\nNote: 1Kb = 1 vector of size 256", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing\n\nDefault value is 20,000, based on .\n\nTo disable vector indexing, set to `0`.\n\nNote: 1kB = 1 vector of size 256.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type", + "points" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + }, + "points": { + "description": "Number of points indexed with this index", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unanmed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/IsNullCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/NestedCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + }, + { + "$ref": "#/components/schemas/MatchAny" + }, + { + "$ref": "#/components/schemas/MatchExcept" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "MatchAny": { + "description": "Exact match on any of the given values", + "type": "object", + "required": [ + "any" + ], + "properties": { + "any": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "AnyVariants": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + ] + }, + "MatchExcept": { + "description": "Should have at least one value not matching the any given values", + "type": "object", + "required": [ + "except" + ], + "properties": { + "except": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "IsNullCondition": { + "description": "Select points with null payload for a specified field", + "type": "object", + "required": [ + "is_null" + ], + "properties": { + "is_null": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "NestedCondition": { + "type": "object", + "required": [ + "nested" + ], + "properties": { + "nested": { + "$ref": "#/components/schemas/Nested" + } + } + }, + "Nested": { + "description": "Select points with payload for a specified nested field", + "type": "object", + "required": [ + "filter", + "key" + ], + "properties": { + "key": { + "type": "string" + }, + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "exact": { + "description": "Search without approximation. If set to true, search may run long but with exact results.", + "default": false, + "type": "boolean" + }, + "quantization": { + "description": "Quantization params", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationSearchParams" + }, + { + "nullable": true + } + ] + } + } + }, + "QuantizationSearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "ignore": { + "description": "If true, quantized vectors are ignored. Default is false.", + "default": false, + "type": "boolean" + }, + "rescore": { + "description": "If true, use original vectors to re-score top-k results. Might require more time in case if original vectors are stored on disk. Default is false.", + "default": false, + "type": "boolean" + }, + "oversampling": { + "description": "Oversampling factor for quantization. Default is 1.0.\n\nDefines how many extra vectors should be pre-selected using quantized index, and then re-scored using original vectors.\n\nFor example, if `oversampling` is 2.4 and `limit` is 100, then 240 vectors will be pre-selected using quantized index, and then top-100 will be returned after re-scoring.", + "default": null, + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "description": "`Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.", + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "LookupLocation": { + "description": "Defines a location to use for looking up the vector. Specifies collection and vector field name.", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection used for lookup", + "type": "string" + }, + "vector": { + "description": "Optional name of the vector field within the collection. If not provided, the default vector field will be used.", + "default": null, + "type": "string", + "nullable": true + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "replication_factor": { + "description": "Number of shards replicas. Default is 1 Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "init_from": { + "description": "Specify other collection to copy data from.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/InitFrom" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Quantization parameters. If none - quantization is disabled.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.\n\nMemmap storage is disabled by default, to enable it, set this threshold to a reasonable value.\n\nTo disable memmap storage, set this to `0`.\n\nNote: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing\n\nDefault value is 20,000, based on .\n\nTo disable vector indexing, set to `0`.\n\nNote: 1kB = 1 vector of size 256.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "InitFrom": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "type": "string" + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Collection base params. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionParamsDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParamsDiff": { + "type": "object", + "properties": { + "replication_factor": { + "description": "Number of replicas for each shard", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Minimal number successful responses from replicas to consider operation successful", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Assigns payload to each point that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys" + ], + "properties": { + "keys": { + "description": "List of payload keys to remove from payload", + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "message_send_failures", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + }, + "message_send_failures": { + "description": "Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MessageSendErrors" + } + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "description": "Role of the peer in the consensus", + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "MessageSendErrors": { + "description": "Message send failures for a particular peer", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "latest_error": { + "type": "string", + "nullable": true + } + } + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ReplicaState": { + "description": "State of the single shard within a replica set.", + "type": "string", + "enum": [ + "Active", + "Dead", + "Partial", + "Initializing", + "Listener" + ] + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "sync", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sync": { + "description": "If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another", + "type": "boolean" + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster", + "collections", + "id", + "requests" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "collections": { + "$ref": "#/components/schemas/CollectionsTelemetry" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterTelemetry" + }, + "requests": { + "$ref": "#/components/schemas/RequestsTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "name", + "startup", + "version" + ], + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppFeaturesTelemetry" + }, + { + "nullable": true + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + { + "nullable": true + } + ] + }, + "startup": { + "type": "string", + "format": "date-time" + } + } + }, + "AppFeaturesTelemetry": { + "type": "object", + "required": [ + "debug", + "recovery_mode", + "service_debug_feature", + "web_feature" + ], + "properties": { + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + }, + "recovery_mode": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "CollectionsTelemetry": { + "type": "object", + "required": [ + "number_of_collections" + ], + "properties": { + "number_of_collections": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetryEnum" + }, + "nullable": true + } + } + }, + "CollectionTelemetryEnum": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionTelemetry" + }, + { + "$ref": "#/components/schemas/CollectionsAggregatedTelemetry" + } + ] + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time_ms", + "shards", + "transfers" + ], + "properties": { + "id": { + "type": "string" + }, + "init_time_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplicaSetTelemetry" + } + }, + "transfers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "ReplicaSetTelemetry": { + "type": "object", + "required": [ + "id", + "remote", + "replicate_states" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "local": { + "anyOf": [ + { + "$ref": "#/components/schemas/LocalShardTelemetry" + }, + { + "nullable": true + } + ] + }, + "remote": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardTelemetry" + } + }, + "replicate_states": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ReplicaState" + } + } + } + }, + "LocalShardTelemetry": { + "type": "object", + "required": [ + "optimizations", + "segments" + ], + "properties": { + "variant_name": { + "type": "string", + "nullable": true + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizations": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index_searches" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index_searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorIndexSearchesTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "payload_storage_type", + "vector_data" + ], + "properties": { + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "index", + "size", + "storage_type" + ], + "properties": { + "size": { + "description": "Size/dimensionality of the vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "storage_type": { + "$ref": "#/components/schemas/VectorStorageType" + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "quantization_config": { + "description": "Vector specific quantization config that overrides collection config", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "VectorStorageType": { + "description": "Storage types for vectors", + "oneOf": [ + { + "description": "Storage in memory (RAM)\n\nWill be very fast at the cost of consuming a lot of memory.", + "type": "string", + "enum": [ + "Memory" + ] + }, + { + "description": "Storage in mmap file, not appendable\n\nSearch performance is defined by disk speed and the fraction of vectors that fit in memory.", + "type": "string", + "enum": [ + "Mmap" + ] + }, + { + "description": "Storage in chunked mmap files, appendable\n\nSearch performance is defined by disk speed and the fraction of vectors that fit in memory.", + "type": "string", + "enum": [ + "ChunkedMmap" + ] + } + ] + }, + "Indexes": { + "description": "Vector index configuration", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexSearchesTelemetry": { + "type": "object", + "required": [ + "filtered_exact", + "filtered_large_cardinality", + "filtered_plain", + "filtered_small_cardinality", + "unfiltered_exact", + "unfiltered_hnsw", + "unfiltered_plain" + ], + "properties": { + "index_name": { + "type": "string", + "nullable": true + }, + "unfiltered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_hnsw": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_small_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_large_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "OperationDurationStatistics": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "avg_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "min_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "max_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "last_responded": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "field_name": { + "type": "string", + "nullable": true + }, + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "type": "object", + "required": [ + "optimizations", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "optimizations": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "RemoteShardTelemetry": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "searches": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "CollectionsAggregatedTelemetry": { + "type": "object", + "required": [ + "optimizers_status", + "params", + "vectors" + ], + "properties": { + "vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "optimizers_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + } + } + }, + "ClusterTelemetry": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterStatusTelemetry" + }, + { + "nullable": true + } + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatusTelemetry": { + "type": "object", + "required": [ + "commit", + "consensus_thread_status", + "is_voter", + "number_of_peers", + "pending_operations", + "term" + ], + "properties": { + "number_of_peers": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "term": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "role": { + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "type": "boolean" + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "RequestsTelemetry": { + "type": "object", + "required": [ + "grpc", + "rest" + ], + "properties": { + "rest": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc": { + "$ref": "#/components/schemas/GrpcTelemetry" + } + } + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + } + }, + "GrpcTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/ReplicateShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + }, + { + "$ref": "#/components/schemas/DropReplicaOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ReplicateShardOperation": { + "type": "object", + "required": [ + "replicate_shard" + ], + "properties": { + "replicate_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "DropReplicaOperation": { + "type": "object", + "required": [ + "drop_replica" + ], + "properties": { + "drop_replica": { + "$ref": "#/components/schemas/Replica" + } + } + }, + "Replica": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "LocksOption": { + "type": "object", + "required": [ + "write" + ], + "properties": { + "error_message": { + "type": "string", + "nullable": true + }, + "write": { + "type": "boolean" + } + } + }, + "SnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "description": "Examples: - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot` - Local path `file:///qdrant/snapshots/test_collection-2022-08-04-10-49-10.snapshot`", + "type": "string", + "format": "uri" + }, + "priority": { + "description": "Defines which data should be used as a source of truth if there are other replicas in the cluster. If set to `Snapshot`, the snapshot will be used as a source of truth, and the current state will be overwritten. If set to `Replica`, the current state will be used as a source of truth, and after recovery if will be synchronized with the snapshot.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/SnapshotPriority" + }, + { + "nullable": true + } + ] + } + } + }, + "SnapshotPriority": { + "description": "Defines source of truth for snapshot recovery `Snapshot` means - prefer snapshot data over the current state `Replica` means - prefer existing data over the snapshot", + "type": "string", + "enum": [ + "snapshot", + "replica" + ] + }, + "CollectionsAliasesResponse": { + "type": "object", + "required": [ + "aliases" + ], + "properties": { + "aliases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasDescription" + } + } + } + }, + "AliasDescription": { + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "alias_name": { + "type": "string" + }, + "collection_name": { + "type": "string" + } + } + }, + "WriteOrdering": { + "description": "Defines write ordering guarantees for collection operations\n\n* `weak` - write operations may be reordered, works faster, default\n\n* `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change\n\n* `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down", + "type": "string", + "enum": [ + "weak", + "medium", + "strong" + ] + }, + "ReadConsistency": { + "description": "Read consistency parameter\n\nDefines how many replicas should be queried to get the result\n\n* `N` - send N random request and return points, which present on all of them\n\n* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of them\n\n* `all` - send requests to all nodes and return points which present on all of them\n\nDefault value is `Factor(1)`", + "anyOf": [ + { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + { + "$ref": "#/components/schemas/ReadConsistencyType" + } + ] + }, + "ReadConsistencyType": { + "description": "* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of nodes\n\n* `all` - send requests to all nodes and return points which present on all nodes", + "type": "string", + "enum": [ + "majority", + "quorum", + "all" + ] + }, + "UpdateVectors": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "Points with named vectors", + "type": "array", + "items": { + "$ref": "#/components/schemas/PointVectors" + }, + "minItems": 1 + } + } + }, + "PointVectors": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + } + } + }, + "DeleteVectors": { + "type": "object", + "required": [ + "vector" + ], + "properties": { + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector names", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + } + } + }, + "PointGroup": { + "type": "object", + "required": [ + "hits", + "id" + ], + "properties": { + "hits": { + "description": "Scored points that have the same value of the group_by key", + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + }, + "id": { + "$ref": "#/components/schemas/GroupId" + }, + "lookup": { + "description": "Record that has been looked up using the group id", + "anyOf": [ + { + "$ref": "#/components/schemas/Record" + }, + { + "nullable": true + } + ] + } + } + }, + "GroupId": { + "description": "Value of the group_by key, shared across all the hits in the group", + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "integer", + "format": "int64" + } + ] + }, + "SearchGroupsRequest": { + "type": "object", + "required": [ + "group_by", + "group_size", + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "group_by": { + "description": "Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.", + "type": "string", + "minLength": 1 + }, + "group_size": { + "description": "Maximum amount of points to return per group", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "limit": { + "description": "Maximum amount of groups to return", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "with_lookup": { + "description": "Look for points in another collection using the group ids", + "anyOf": [ + { + "$ref": "#/components/schemas/WithLookupInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "WithLookupInterface": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/WithLookup" + } + ] + }, + "WithLookup": { + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection to use for points lookup", + "type": "string" + }, + "with_payload": { + "description": "Options for specifying which payload to include (or not)", + "default": true, + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vectors": { + "description": "Options for specifying which vectors to include (or not)", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + } + } + }, + "RecommendGroupsRequest": { + "type": "object", + "required": [ + "group_by", + "group_size", + "limit", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + }, + "group_by": { + "description": "Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.", + "type": "string", + "minLength": 1 + }, + "group_size": { + "description": "Maximum amount of points to return per group", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "limit": { + "description": "Maximum amount of groups to return", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "with_lookup": { + "description": "Look for points in another collection using the group ids", + "anyOf": [ + { + "$ref": "#/components/schemas/WithLookupInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "GroupsResult": { + "type": "object", + "required": [ + "groups" + ], + "properties": { + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointGroup" + } + } + } + } + } + } +} diff --git a/docs/redoc/v1.4.x/openapi.json b/docs/redoc/v1.4.x/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..71daf9fbc28c7777fc82de1b9581213c26246587 --- /dev/null +++ b/docs/redoc/v1.4.x/openapi.json @@ -0,0 +1,8253 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + }, + "/metrics": { + "get": { + "summary": "Collect Prometheus metrics data", + "description": "Collect metrics data including app info, collections info, cluster info and statistics", + "operationId": "metrics", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Metrics data in Prometheus format", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "# HELP app_info information about qdrant server\n# TYPE app_info counter\napp_info{name=\"qdrant\",version=\"0.11.1\"} 1\n# HELP cluster_enabled is cluster support enabled\n# TYPE cluster_enabled gauge\ncluster_enabled 0\n# HELP collections_total number of collections\n# TYPE collections_total gauge\ncollections_total 1\n" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/locks": { + "post": { + "summary": "Set lock options", + "description": "Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options", + "operationId": "post_locks", + "tags": [ + "service" + ], + "requestBody": { + "description": "Lock options and optional error message", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + }, + "get": { + "summary": "Get lock options", + "description": "Get lock options. If write is locked, all write operations and collection creation are forbidden", + "operationId": "get_locks", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/recover": { + "post": { + "tags": [ + "cluster" + ], + "summary": "Tries to recover current peer Raft state.", + "operationId": "recover_current_peer", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "force", + "in": "query", + "description": "If true - removes peer even if it has shards/replicas on it.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List aliases for collection", + "description": "Get list of all aliases for a collection", + "operationId": "get_collection_aliases", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections aliases", + "description": "Get list of all existing collections aliases", + "operationId": "get_collections_aliases", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/upload": { + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from an uploaded snapshot", + "description": "Recover local collection data from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_uploaded_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "priority", + "in": "query", + "description": "Defines source of truth for snapshot recovery", + "required": false, + "schema": { + "$ref": "#/components/schemas/SnapshotPriority" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "snapshot": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Delete collection snapshot", + "description": "Delete snapshot for a collection", + "operationId": "delete_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "parameters": [ + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots" + ], + "summary": "Delete storage snapshot", + "description": "Delete snapshot of the whole storage", + "operationId": "delete_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the full snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/vectors": { + "put": { + "tags": [ + "points" + ], + "summary": "Update vectors", + "description": "Update specified named vectors on points, keep unspecified vectors intact.", + "operationId": "update_vectors", + "requestBody": { + "description": "Update named vectors on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateVectors" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/vectors/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete vectors", + "description": "Delete named vectors from the given points.", + "operationId": "delete_vectors", + "requestBody": { + "description": "Delete named vectors from points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteVectors" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload values for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Overwrite payload", + "description": "Replace full payload of points with new one", + "operationId": "overwrite_payload", + "requestBody": { + "description": "Payload and points selector", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/groups": { + "post": { + "tags": [ + "points" + ], + "summary": "Search point groups", + "description": "Retrieve closest points based on vector similarity and given filtering conditions, grouped by a given payload field", + "operationId": "search_point_groups", + "requestBody": { + "description": "Search request with optional filtering, grouped by a given payload field", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchGroupsRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/GroupsResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/groups": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend point groups", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples, grouped by a given payload field.", + "operationId": "recommend_point_groups", + "requestBody": { + "description": "Request points based on positive and negative examples, grouped by a payload field.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendGroupsRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/GroupsResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v1.4.x" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection All vectors in collection are available for querying Calculated as `points_count x vectors_per_point` Where `vectors_per_point` is a number of named vectors in schema", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in vector index (HNSW)", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points (vectors + payloads) in collection Each point could be accessed by unique id", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection. Each segment has independent vector as payload indexes", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection. `Green` - all good. `Yellow` - optimization is running, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + }, + "quantization_config": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "replication_factor": { + "description": "Number of replicas for each shard", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Custom params for quantization. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + }, + "on_disk": { + "description": "If true, vectors are served from disk, improving RAM usage at the cost of latency Default: false", + "type": "boolean", + "nullable": true + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build the index.", + "type": "integer", + "format": "uint", + "minimum": 4, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in kilobytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 10, + "nullable": true + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, the index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for additional payload-aware HNSW links. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "QuantizationConfig": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScalarQuantization" + }, + { + "$ref": "#/components/schemas/ProductQuantization" + } + ] + }, + "ScalarQuantization": { + "type": "object", + "required": [ + "scalar" + ], + "properties": { + "scalar": { + "$ref": "#/components/schemas/ScalarQuantizationConfig" + } + } + }, + "ScalarQuantizationConfig": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/ScalarType" + }, + "quantile": { + "description": "Quantile for quantization. Expected value range in [0.5, 1.0]. If not set - use the whole range of values", + "type": "number", + "format": "float", + "maximum": 1, + "minimum": 0.5, + "nullable": true + }, + "always_ram": { + "description": "If true - quantized vectors always will be stored in RAM, ignoring the config of main storage", + "type": "boolean", + "nullable": true + } + } + }, + "ScalarType": { + "type": "string", + "enum": [ + "int8" + ] + }, + "ProductQuantization": { + "type": "object", + "required": [ + "product" + ], + "properties": { + "product": { + "$ref": "#/components/schemas/ProductQuantizationConfig" + } + } + }, + "ProductQuantizationConfig": { + "type": "object", + "required": [ + "compression" + ], + "properties": { + "compression": { + "$ref": "#/components/schemas/CompressionRatio" + }, + "always_ram": { + "type": "boolean", + "nullable": true + } + } + }, + "CompressionRatio": { + "type": "string", + "enum": [ + "x4", + "x8", + "x16", + "x32", + "x64" + ] + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 4 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for hnsw graph built for payload index. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "maximum": 1, + "minimum": 0 + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 100 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads. If `default_segment_number = 0`, will be automatically selected by the number of available CPUs.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexing speed is more important - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.\n\nMemmap storage is disabled by default, to enable it, set this threshold to a reasonable value.\n\nTo disable memmap storage, set this to `0`. Internally it will use the largest threshold possible.\n\nNote: 1Kb = 1 vector of size 256", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing\n\nDefault value is 20,000, based on .\n\nTo disable vector indexing, set to `0`.\n\nNote: 1kB = 1 vector of size 256.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type", + "points" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + }, + "points": { + "description": "Number of points indexed with this index", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text", + "bool" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word", + "multilingual" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unanmed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/IsNullCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/NestedCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + }, + { + "$ref": "#/components/schemas/MatchAny" + }, + { + "$ref": "#/components/schemas/MatchExcept" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "MatchAny": { + "description": "Exact match on any of the given values", + "type": "object", + "required": [ + "any" + ], + "properties": { + "any": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "AnyVariants": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + ] + }, + "MatchExcept": { + "description": "Should have at least one value not matching the any given values", + "type": "object", + "required": [ + "except" + ], + "properties": { + "except": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "IsNullCondition": { + "description": "Select points with null payload for a specified field", + "type": "object", + "required": [ + "is_null" + ], + "properties": { + "is_null": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "NestedCondition": { + "type": "object", + "required": [ + "nested" + ], + "properties": { + "nested": { + "$ref": "#/components/schemas/Nested" + } + } + }, + "Nested": { + "description": "Select points with payload for a specified nested field", + "type": "object", + "required": [ + "filter", + "key" + ], + "properties": { + "key": { + "type": "string" + }, + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "exact": { + "description": "Search without approximation. If set to true, search may run long but with exact results.", + "default": false, + "type": "boolean" + }, + "quantization": { + "description": "Quantization params", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationSearchParams" + }, + { + "nullable": true + } + ] + } + } + }, + "QuantizationSearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "ignore": { + "description": "If true, quantized vectors are ignored. Default is false.", + "default": false, + "type": "boolean" + }, + "rescore": { + "description": "If true, use original vectors to re-score top-k results. Might require more time in case if original vectors are stored on disk. Default is false.", + "default": false, + "type": "boolean" + }, + "oversampling": { + "description": "Oversampling factor for quantization. Default is 1.0.\n\nDefines how many extra vectors should be pre-selected using quantized index, and then re-scored using original vectors.\n\nFor example, if `oversampling` is 2.4 and `limit` is 100, then 240 vectors will be pre-selected using quantized index, and then top-100 will be returned after re-scoring.", + "default": null, + "type": "number", + "format": "double", + "minimum": 1, + "nullable": true + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "description": "`Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.", + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "LookupLocation": { + "description": "Defines a location to use for looking up the vector. Specifies collection and vector field name.", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection used for lookup", + "type": "string" + }, + "vector": { + "description": "Optional name of the vector field within the collection. If not provided, the default vector field will be used.", + "default": null, + "type": "string", + "nullable": true + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "replication_factor": { + "description": "Number of shards replicas. Default is 1 Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "init_from": { + "description": "Specify other collection to copy data from.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/InitFrom" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Quantization parameters. If none - quantization is disabled.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.\n\nMemmap storage is disabled by default, to enable it, set this threshold to a reasonable value.\n\nTo disable memmap storage, set this to `0`.\n\nNote: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing\n\nDefault value is 20,000, based on .\n\nTo disable vector indexing, set to `0`.\n\nNote: 1kB = 1 vector of size 256.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "InitFrom": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "type": "string" + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "vectors": { + "description": "Vector data parameters to update. It is possible to provide one config for single vector mode and list of configs for multiple vectors mode.", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorsConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - it is left unchanged. This operation is blocking, it will only proceed once all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Collection base params. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionParamsDiff" + }, + { + "nullable": true + } + ] + }, + "hnsw_config": { + "description": "HNSW parameters to update for the collection index. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Quantization parameters to update. If none - it is left unchanged.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "VectorsConfigDiff": { + "description": "Vector update params for multiple vectors\n\n{ \"vector_name\": { \"hnsw_config\": { \"m\": 8 } } }", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParamsDiff" + } + }, + "VectorParamsDiff": { + "type": "object", + "properties": { + "hnsw_config": { + "description": "Update params for HNSW index. If empty object - it will be unset.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Update params for quantization. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfigDiff" + }, + { + "nullable": true + } + ] + }, + "on_disk": { + "description": "If true, vectors are served from disk, improving RAM usage at the cost of latency", + "type": "boolean", + "nullable": true + } + } + }, + "QuantizationConfigDiff": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScalarQuantization" + }, + { + "$ref": "#/components/schemas/ProductQuantization" + }, + { + "$ref": "#/components/schemas/Disabled" + } + ] + }, + "Disabled": { + "type": "string", + "enum": [ + "Disabled" + ] + }, + "CollectionParamsDiff": { + "type": "object", + "properties": { + "replication_factor": { + "description": "Number of replicas for each shard", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Minimal number successful responses from replicas to consider operation successful", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Assigns payload to each point that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys" + ], + "properties": { + "keys": { + "description": "List of payload keys to remove from payload", + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "message_send_failures", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + }, + "message_send_failures": { + "description": "Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MessageSendErrors" + } + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "description": "Role of the peer in the consensus", + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "MessageSendErrors": { + "description": "Message send failures for a particular peer", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "latest_error": { + "type": "string", + "nullable": true + } + } + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ReplicaState": { + "description": "State of the single shard within a replica set.", + "type": "string", + "enum": [ + "Active", + "Dead", + "Partial", + "Initializing", + "Listener" + ] + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "sync", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sync": { + "description": "If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another", + "type": "boolean" + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster", + "collections", + "id", + "requests" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "collections": { + "$ref": "#/components/schemas/CollectionsTelemetry" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterTelemetry" + }, + "requests": { + "$ref": "#/components/schemas/RequestsTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "name", + "startup", + "version" + ], + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppFeaturesTelemetry" + }, + { + "nullable": true + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + { + "nullable": true + } + ] + }, + "startup": { + "type": "string", + "format": "date-time" + } + } + }, + "AppFeaturesTelemetry": { + "type": "object", + "required": [ + "debug", + "recovery_mode", + "service_debug_feature", + "web_feature" + ], + "properties": { + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + }, + "recovery_mode": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "CollectionsTelemetry": { + "type": "object", + "required": [ + "number_of_collections" + ], + "properties": { + "number_of_collections": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetryEnum" + }, + "nullable": true + } + } + }, + "CollectionTelemetryEnum": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionTelemetry" + }, + { + "$ref": "#/components/schemas/CollectionsAggregatedTelemetry" + } + ] + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time_ms", + "shards", + "transfers" + ], + "properties": { + "id": { + "type": "string" + }, + "init_time_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplicaSetTelemetry" + } + }, + "transfers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "ReplicaSetTelemetry": { + "type": "object", + "required": [ + "id", + "remote", + "replicate_states" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "local": { + "anyOf": [ + { + "$ref": "#/components/schemas/LocalShardTelemetry" + }, + { + "nullable": true + } + ] + }, + "remote": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardTelemetry" + } + }, + "replicate_states": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ReplicaState" + } + } + } + }, + "LocalShardTelemetry": { + "type": "object", + "required": [ + "optimizations", + "segments" + ], + "properties": { + "variant_name": { + "type": "string", + "nullable": true + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizations": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index_searches" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index_searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorIndexSearchesTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "SegmentConfig": { + "type": "object", + "required": [ + "payload_storage_type", + "vector_data" + ], + "properties": { + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "index", + "size", + "storage_type" + ], + "properties": { + "size": { + "description": "Size/dimensionality of the vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "storage_type": { + "$ref": "#/components/schemas/VectorStorageType" + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "quantization_config": { + "description": "Vector specific quantization config that overrides collection config", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "VectorStorageType": { + "description": "Storage types for vectors", + "oneOf": [ + { + "description": "Storage in memory (RAM)\n\nWill be very fast at the cost of consuming a lot of memory.", + "type": "string", + "enum": [ + "Memory" + ] + }, + { + "description": "Storage in mmap file, not appendable\n\nSearch performance is defined by disk speed and the fraction of vectors that fit in memory.", + "type": "string", + "enum": [ + "Mmap" + ] + }, + { + "description": "Storage in chunked mmap files, appendable\n\nSearch performance is defined by disk speed and the fraction of vectors that fit in memory.", + "type": "string", + "enum": [ + "ChunkedMmap" + ] + } + ] + }, + "Indexes": { + "description": "Vector index configuration", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexSearchesTelemetry": { + "type": "object", + "required": [ + "filtered_exact", + "filtered_large_cardinality", + "filtered_plain", + "filtered_small_cardinality", + "unfiltered_exact", + "unfiltered_hnsw", + "unfiltered_plain" + ], + "properties": { + "index_name": { + "type": "string", + "nullable": true + }, + "unfiltered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_hnsw": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_small_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_large_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "OperationDurationStatistics": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "avg_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "min_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "max_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "last_responded": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "field_name": { + "type": "string", + "nullable": true + }, + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "type": "object", + "required": [ + "optimizations", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "optimizations": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "RemoteShardTelemetry": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "searches": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "CollectionsAggregatedTelemetry": { + "type": "object", + "required": [ + "optimizers_status", + "params", + "vectors" + ], + "properties": { + "vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "optimizers_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + } + } + }, + "ClusterTelemetry": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterStatusTelemetry" + }, + { + "nullable": true + } + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatusTelemetry": { + "type": "object", + "required": [ + "commit", + "consensus_thread_status", + "is_voter", + "number_of_peers", + "pending_operations", + "term" + ], + "properties": { + "number_of_peers": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "term": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "role": { + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "type": "boolean" + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "RequestsTelemetry": { + "type": "object", + "required": [ + "grpc", + "rest" + ], + "properties": { + "rest": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc": { + "$ref": "#/components/schemas/GrpcTelemetry" + } + } + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + } + }, + "GrpcTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/ReplicateShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + }, + { + "$ref": "#/components/schemas/DropReplicaOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ReplicateShardOperation": { + "type": "object", + "required": [ + "replicate_shard" + ], + "properties": { + "replicate_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "DropReplicaOperation": { + "type": "object", + "required": [ + "drop_replica" + ], + "properties": { + "drop_replica": { + "$ref": "#/components/schemas/Replica" + } + } + }, + "Replica": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "LocksOption": { + "type": "object", + "required": [ + "write" + ], + "properties": { + "error_message": { + "type": "string", + "nullable": true + }, + "write": { + "type": "boolean" + } + } + }, + "SnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "description": "Examples: - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot` - Local path `file:///qdrant/snapshots/test_collection-2022-08-04-10-49-10.snapshot`", + "type": "string", + "format": "uri" + }, + "priority": { + "description": "Defines which data should be used as a source of truth if there are other replicas in the cluster. If set to `Snapshot`, the snapshot will be used as a source of truth, and the current state will be overwritten. If set to `Replica`, the current state will be used as a source of truth, and after recovery if will be synchronized with the snapshot.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/SnapshotPriority" + }, + { + "nullable": true + } + ] + } + } + }, + "SnapshotPriority": { + "description": "Defines source of truth for snapshot recovery `Snapshot` means - prefer snapshot data over the current state `Replica` means - prefer existing data over the snapshot", + "type": "string", + "enum": [ + "snapshot", + "replica" + ] + }, + "CollectionsAliasesResponse": { + "type": "object", + "required": [ + "aliases" + ], + "properties": { + "aliases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasDescription" + } + } + } + }, + "AliasDescription": { + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "alias_name": { + "type": "string" + }, + "collection_name": { + "type": "string" + } + } + }, + "WriteOrdering": { + "description": "Defines write ordering guarantees for collection operations\n\n* `weak` - write operations may be reordered, works faster, default\n\n* `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change\n\n* `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down", + "type": "string", + "enum": [ + "weak", + "medium", + "strong" + ] + }, + "ReadConsistency": { + "description": "Read consistency parameter\n\nDefines how many replicas should be queried to get the result\n\n* `N` - send N random request and return points, which present on all of them\n\n* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of them\n\n* `all` - send requests to all nodes and return points which present on all of them\n\nDefault value is `Factor(1)`", + "anyOf": [ + { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + { + "$ref": "#/components/schemas/ReadConsistencyType" + } + ] + }, + "ReadConsistencyType": { + "description": "* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of nodes\n\n* `all` - send requests to all nodes and return points which present on all nodes", + "type": "string", + "enum": [ + "majority", + "quorum", + "all" + ] + }, + "UpdateVectors": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "Points with named vectors", + "type": "array", + "items": { + "$ref": "#/components/schemas/PointVectors" + }, + "minItems": 1 + } + } + }, + "PointVectors": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + } + } + }, + "DeleteVectors": { + "type": "object", + "required": [ + "vector" + ], + "properties": { + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector names", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + } + } + }, + "PointGroup": { + "type": "object", + "required": [ + "hits", + "id" + ], + "properties": { + "hits": { + "description": "Scored points that have the same value of the group_by key", + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + }, + "id": { + "$ref": "#/components/schemas/GroupId" + }, + "lookup": { + "description": "Record that has been looked up using the group id", + "anyOf": [ + { + "$ref": "#/components/schemas/Record" + }, + { + "nullable": true + } + ] + } + } + }, + "GroupId": { + "description": "Value of the group_by key, shared across all the hits in the group", + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "integer", + "format": "int64" + } + ] + }, + "SearchGroupsRequest": { + "type": "object", + "required": [ + "group_by", + "group_size", + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "group_by": { + "description": "Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.", + "type": "string", + "minLength": 1 + }, + "group_size": { + "description": "Maximum amount of points to return per group", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "limit": { + "description": "Maximum amount of groups to return", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "with_lookup": { + "description": "Look for points in another collection using the group ids", + "anyOf": [ + { + "$ref": "#/components/schemas/WithLookupInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "WithLookupInterface": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/WithLookup" + } + ] + }, + "WithLookup": { + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection to use for points lookup", + "type": "string" + }, + "with_payload": { + "description": "Options for specifying which payload to include (or not)", + "default": true, + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vectors": { + "description": "Options for specifying which vectors to include (or not)", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + } + } + }, + "RecommendGroupsRequest": { + "type": "object", + "required": [ + "group_by", + "group_size", + "limit", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + }, + "group_by": { + "description": "Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.", + "type": "string", + "minLength": 1 + }, + "group_size": { + "description": "Maximum amount of points to return per group", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "limit": { + "description": "Maximum amount of groups to return", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "with_lookup": { + "description": "Look for points in another collection using the group ids", + "anyOf": [ + { + "$ref": "#/components/schemas/WithLookupInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "GroupsResult": { + "type": "object", + "required": [ + "groups" + ], + "properties": { + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointGroup" + } + } + } + } + } + } +} diff --git a/docs/redoc/v1.5.x/openapi.json b/docs/redoc/v1.5.x/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..1176685267da9a242d84ca1df128e25c06146966 --- /dev/null +++ b/docs/redoc/v1.5.x/openapi.json @@ -0,0 +1,9385 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + }, + "/metrics": { + "get": { + "summary": "Collect Prometheus metrics data", + "description": "Collect metrics data including app info, collections info, cluster info and statistics", + "operationId": "metrics", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Metrics data in Prometheus format", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "# HELP app_info information about qdrant server\n# TYPE app_info counter\napp_info{name=\"qdrant\",version=\"0.11.1\"} 1\n# HELP cluster_enabled is cluster support enabled\n# TYPE cluster_enabled gauge\ncluster_enabled 0\n# HELP collections_total number of collections\n# TYPE collections_total gauge\ncollections_total 1\n" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/locks": { + "post": { + "summary": "Set lock options", + "description": "Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options", + "operationId": "post_locks", + "tags": [ + "service" + ], + "requestBody": { + "description": "Lock options and optional error message", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + }, + "get": { + "summary": "Get lock options", + "description": "Get lock options. If write is locked, all write operations and collection creation are forbidden", + "operationId": "get_locks", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + } + }, + "/healthz": { + "get": { + "summary": "Kubernetes healthz endpoint", + "description": "An endpoint for health checking used in Kubernetes.", + "operationId": "healthz", + "tags": [ + "service" + ], + "responses": { + "200": { + "description": "Healthz response", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "healthz check passed" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/livez": { + "get": { + "summary": "Kubernetes livez endpoint", + "description": "An endpoint for health checking used in Kubernetes.", + "operationId": "livez", + "tags": [ + "service" + ], + "responses": { + "200": { + "description": "Healthz response", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "healthz check passed" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/readyz": { + "get": { + "summary": "Kubernetes readyz endpoint", + "description": "An endpoint for health checking used in Kubernetes.", + "operationId": "readyz", + "tags": [ + "service" + ], + "responses": { + "200": { + "description": "Healthz response", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "healthz check passed" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/recover": { + "post": { + "tags": [ + "cluster" + ], + "summary": "Tries to recover current peer Raft state.", + "operationId": "recover_current_peer", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "force", + "in": "query", + "description": "If true - removes peer even if it has shards/replicas on it.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List aliases for collection", + "description": "Get list of all aliases for a collection", + "operationId": "get_collection_aliases", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections aliases", + "description": "Get list of all existing collections aliases", + "operationId": "get_collections_aliases", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/upload": { + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from an uploaded snapshot", + "description": "Recover local collection data from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_uploaded_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "priority", + "in": "query", + "description": "Defines source of truth for snapshot recovery", + "required": false, + "schema": { + "$ref": "#/components/schemas/SnapshotPriority" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "snapshot": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Delete collection snapshot", + "description": "Delete snapshot for a collection", + "operationId": "delete_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "parameters": [ + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots" + ], + "summary": "Delete storage snapshot", + "description": "Delete snapshot of the whole storage", + "operationId": "delete_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the full snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots/upload": { + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover shard from an uploaded snapshot", + "description": "Recover shard of a local collection from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection shard.", + "operationId": "recover_shard_from_uploaded_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard to recover", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "priority", + "in": "query", + "description": "Defines source of truth for snapshot recovery", + "required": false, + "schema": { + "$ref": "#/components/schemas/SnapshotPriority" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "snapshot": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover shard of a local collection data from a snapshot. This will overwrite any data, stored in this shard, for the collection.", + "operationId": "recover_shard_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard to recover", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShardSnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List shards snapshots for a collection", + "description": "Get list of snapshots for a shard of a collection", + "operationId": "list_shard_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create shard snapshot", + "description": "Create new snapshot of a shard for a collection", + "operationId": "create_shard_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Delete shard snapshot", + "description": "Delete snapshot of a shard for a collection", + "operationId": "delete_shard_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot of a shard from a collection as a file", + "operationId": "get_shard_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/vectors": { + "put": { + "tags": [ + "points" + ], + "summary": "Update vectors", + "description": "Update specified named vectors on points, keep unspecified vectors intact.", + "operationId": "update_vectors", + "requestBody": { + "description": "Update named vectors on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateVectors" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/vectors/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete vectors", + "description": "Delete named vectors from the given points.", + "operationId": "delete_vectors", + "requestBody": { + "description": "Delete named vectors from points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteVectors" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload values for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Overwrite payload", + "description": "Replace full payload of points with new one", + "operationId": "overwrite_payload", + "requestBody": { + "description": "Payload and points selector", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Batch update points", + "description": "Apply a series of update operations for points, vectors and payloads", + "operationId": "batch_update", + "requestBody": { + "description": "update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to apply operations on", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/groups": { + "post": { + "tags": [ + "points" + ], + "summary": "Search point groups", + "description": "Retrieve closest points based on vector similarity and given filtering conditions, grouped by a given payload field", + "operationId": "search_point_groups", + "requestBody": { + "description": "Search request with optional filtering, grouped by a given payload field", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchGroupsRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/GroupsResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/groups": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend point groups", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples, grouped by a given payload field.", + "operationId": "recommend_point_groups", + "requestBody": { + "description": "Request points based on positive and negative examples, grouped by a payload field.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendGroupsRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/GroupsResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "1.5.x" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection All vectors in collection are available for querying Calculated as `points_count x vectors_per_point` Where `vectors_per_point` is a number of named vectors in schema", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in vector index (HNSW)", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points (vectors + payloads) in collection Each point could be accessed by unique id", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection. Each segment has independent vector as payload indexes", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection. `Green` - all good. `Yellow` - optimization is running, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + }, + "quantization_config": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "replication_factor": { + "description": "Number of replicas for each shard", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Custom params for quantization. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + }, + "on_disk": { + "description": "If true, vectors are served from disk, improving RAM usage at the cost of latency Default: false", + "type": "boolean", + "nullable": true + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build the index.", + "type": "integer", + "format": "uint", + "minimum": 4, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in kilobytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 10, + "nullable": true + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, the index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for additional payload-aware HNSW links. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "QuantizationConfig": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScalarQuantization" + }, + { + "$ref": "#/components/schemas/ProductQuantization" + }, + { + "$ref": "#/components/schemas/BinaryQuantization" + } + ] + }, + "ScalarQuantization": { + "type": "object", + "required": [ + "scalar" + ], + "properties": { + "scalar": { + "$ref": "#/components/schemas/ScalarQuantizationConfig" + } + } + }, + "ScalarQuantizationConfig": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/ScalarType" + }, + "quantile": { + "description": "Quantile for quantization. Expected value range in [0.5, 1.0]. If not set - use the whole range of values", + "type": "number", + "format": "float", + "maximum": 1, + "minimum": 0.5, + "nullable": true + }, + "always_ram": { + "description": "If true - quantized vectors always will be stored in RAM, ignoring the config of main storage", + "type": "boolean", + "nullable": true + } + } + }, + "ScalarType": { + "type": "string", + "enum": [ + "int8" + ] + }, + "ProductQuantization": { + "type": "object", + "required": [ + "product" + ], + "properties": { + "product": { + "$ref": "#/components/schemas/ProductQuantizationConfig" + } + } + }, + "ProductQuantizationConfig": { + "type": "object", + "required": [ + "compression" + ], + "properties": { + "compression": { + "$ref": "#/components/schemas/CompressionRatio" + }, + "always_ram": { + "type": "boolean", + "nullable": true + } + } + }, + "CompressionRatio": { + "type": "string", + "enum": [ + "x4", + "x8", + "x16", + "x32", + "x64" + ] + }, + "BinaryQuantization": { + "type": "object", + "required": [ + "binary" + ], + "properties": { + "binary": { + "$ref": "#/components/schemas/BinaryQuantizationConfig" + } + } + }, + "BinaryQuantizationConfig": { + "type": "object", + "properties": { + "always_ram": { + "type": "boolean", + "nullable": true + } + } + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 4 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for hnsw graph built for payload index. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "maximum": 1, + "minimum": 0 + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 100 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads. If `default_segment_number = 0`, will be automatically selected by the number of available CPUs.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexing speed is more important - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.\n\nMemmap storage is disabled by default, to enable it, set this threshold to a reasonable value.\n\nTo disable memmap storage, set this to `0`. Internally it will use the largest threshold possible.\n\nNote: 1Kb = 1 vector of size 256", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing\n\nDefault value is 20,000, based on .\n\nTo disable vector indexing, set to `0`.\n\nNote: 1kB = 1 vector of size 256.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type", + "points" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + }, + "points": { + "description": "Number of points indexed with this index", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text", + "bool" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word", + "multilingual" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unnamed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/IsNullCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/NestedCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + }, + { + "$ref": "#/components/schemas/MatchAny" + }, + { + "$ref": "#/components/schemas/MatchExcept" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "MatchAny": { + "description": "Exact match on any of the given values", + "type": "object", + "required": [ + "any" + ], + "properties": { + "any": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "AnyVariants": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + ] + }, + "MatchExcept": { + "description": "Should have at least one value not matching the any given values", + "type": "object", + "required": [ + "except" + ], + "properties": { + "except": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "IsNullCondition": { + "description": "Select points with null payload for a specified field", + "type": "object", + "required": [ + "is_null" + ], + "properties": { + "is_null": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "NestedCondition": { + "type": "object", + "required": [ + "nested" + ], + "properties": { + "nested": { + "$ref": "#/components/schemas/Nested" + } + } + }, + "Nested": { + "description": "Select points with payload for a specified nested field", + "type": "object", + "required": [ + "filter", + "key" + ], + "properties": { + "key": { + "type": "string" + }, + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "exact": { + "description": "Search without approximation. If set to true, search may run long but with exact results.", + "default": false, + "type": "boolean" + }, + "quantization": { + "description": "Quantization params", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationSearchParams" + }, + { + "nullable": true + } + ] + }, + "indexed_only": { + "description": "If enabled, the engine will only perform search among indexed or small segments. Using this option prevents slow searches in case of delayed index, but does not guarantee that all uploaded vectors will be included in search results", + "default": false, + "type": "boolean" + } + } + }, + "QuantizationSearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "ignore": { + "description": "If true, quantized vectors are ignored. Default is false.", + "default": false, + "type": "boolean" + }, + "rescore": { + "description": "If true, use original vectors to re-score top-k results. Might require more time in case if original vectors are stored on disk. Default is false.", + "default": false, + "type": "boolean" + }, + "oversampling": { + "description": "Oversampling factor for quantization. Default is 1.0.\n\nDefines how many extra vectors should be pre-selected using quantized index, and then re-scored using original vectors.\n\nFor example, if `oversampling` is 2.4 and `limit` is 100, then 240 vectors will be pre-selected using quantized index, and then top-100 will be returned after re-scoring.", + "default": null, + "type": "number", + "format": "double", + "minimum": 1, + "nullable": true + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "description": "`Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.", + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.", + "type": "object", + "required": [ + "limit", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "LookupLocation": { + "description": "Defines a location to use for looking up the vector. Specifies collection and vector field name.", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection used for lookup", + "type": "string" + }, + "vector": { + "description": "Optional name of the vector field within the collection. If not provided, the default vector field will be used.", + "default": null, + "type": "string", + "nullable": true + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "replication_factor": { + "description": "Number of shards replicas. Default is 1 Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "init_from": { + "description": "Specify other collection to copy data from.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/InitFrom" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Quantization parameters. If none - quantization is disabled.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.\n\nMemmap storage is disabled by default, to enable it, set this threshold to a reasonable value.\n\nTo disable memmap storage, set this to `0`.\n\nNote: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing\n\nDefault value is 20,000, based on .\n\nTo disable vector indexing, set to `0`.\n\nNote: 1kB = 1 vector of size 256.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "InitFrom": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "type": "string" + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "vectors": { + "description": "Vector data parameters to update. It is possible to provide one config for single vector mode and list of configs for multiple vectors mode.", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorsConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - it is left unchanged. This operation is blocking, it will only proceed once all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Collection base params. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionParamsDiff" + }, + { + "nullable": true + } + ] + }, + "hnsw_config": { + "description": "HNSW parameters to update for the collection index. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Quantization parameters to update. If none - it is left unchanged.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "VectorsConfigDiff": { + "description": "Vector update params for multiple vectors\n\n{ \"vector_name\": { \"hnsw_config\": { \"m\": 8 } } }", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParamsDiff" + } + }, + "VectorParamsDiff": { + "type": "object", + "properties": { + "hnsw_config": { + "description": "Update params for HNSW index. If empty object - it will be unset.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Update params for quantization. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfigDiff" + }, + { + "nullable": true + } + ] + }, + "on_disk": { + "description": "If true, vectors are served from disk, improving RAM usage at the cost of latency", + "type": "boolean", + "nullable": true + } + } + }, + "QuantizationConfigDiff": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScalarQuantization" + }, + { + "$ref": "#/components/schemas/ProductQuantization" + }, + { + "$ref": "#/components/schemas/BinaryQuantization" + }, + { + "$ref": "#/components/schemas/Disabled" + } + ] + }, + "Disabled": { + "type": "string", + "enum": [ + "Disabled" + ] + }, + "CollectionParamsDiff": { + "type": "object", + "properties": { + "replication_factor": { + "description": "Number of replicas for each shard", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Minimal number successful responses from replicas to consider operation successful", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Assigns payload to each point that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys" + ], + "properties": { + "keys": { + "description": "List of payload keys to remove from payload", + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "message_send_failures", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + }, + "message_send_failures": { + "description": "Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MessageSendErrors" + } + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "description": "Role of the peer in the consensus", + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "MessageSendErrors": { + "description": "Message send failures for a particular peer", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "latest_error": { + "type": "string", + "nullable": true + } + } + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ReplicaState": { + "description": "State of the single shard within a replica set.", + "type": "string", + "enum": [ + "Active", + "Dead", + "Partial", + "Initializing", + "Listener" + ] + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "sync", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sync": { + "description": "If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another", + "type": "boolean" + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster", + "collections", + "id", + "requests" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "collections": { + "$ref": "#/components/schemas/CollectionsTelemetry" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterTelemetry" + }, + "requests": { + "$ref": "#/components/schemas/RequestsTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "name", + "startup", + "version" + ], + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppFeaturesTelemetry" + }, + { + "nullable": true + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + { + "nullable": true + } + ] + }, + "startup": { + "type": "string", + "format": "date-time" + } + } + }, + "AppFeaturesTelemetry": { + "type": "object", + "required": [ + "debug", + "recovery_mode", + "service_debug_feature", + "web_feature" + ], + "properties": { + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + }, + "recovery_mode": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "CollectionsTelemetry": { + "type": "object", + "required": [ + "number_of_collections" + ], + "properties": { + "number_of_collections": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetryEnum" + }, + "nullable": true + } + } + }, + "CollectionTelemetryEnum": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionTelemetry" + }, + { + "$ref": "#/components/schemas/CollectionsAggregatedTelemetry" + } + ] + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time_ms", + "shards", + "transfers" + ], + "properties": { + "id": { + "type": "string" + }, + "init_time_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplicaSetTelemetry" + } + }, + "transfers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "ReplicaSetTelemetry": { + "type": "object", + "required": [ + "id", + "remote", + "replicate_states" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "local": { + "anyOf": [ + { + "$ref": "#/components/schemas/LocalShardTelemetry" + }, + { + "nullable": true + } + ] + }, + "remote": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardTelemetry" + } + }, + "replicate_states": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ReplicaState" + } + } + } + }, + "LocalShardTelemetry": { + "type": "object", + "required": [ + "optimizations", + "segments" + ], + "properties": { + "variant_name": { + "type": "string", + "nullable": true + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizations": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index_searches" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index_searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorIndexSearchesTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_indexed_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type", + "vector_data" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_indexed_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + }, + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "VectorDataInfo": { + "type": "object", + "required": [ + "num_deleted_vectors", + "num_indexed_vectors", + "num_vectors" + ], + "properties": { + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_indexed_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "SegmentConfig": { + "type": "object", + "required": [ + "payload_storage_type", + "vector_data" + ], + "properties": { + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "index", + "size", + "storage_type" + ], + "properties": { + "size": { + "description": "Size/dimensionality of the vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "storage_type": { + "$ref": "#/components/schemas/VectorStorageType" + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "quantization_config": { + "description": "Vector specific quantization config that overrides collection config", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "VectorStorageType": { + "description": "Storage types for vectors", + "oneOf": [ + { + "description": "Storage in memory (RAM)\n\nWill be very fast at the cost of consuming a lot of memory.", + "type": "string", + "enum": [ + "Memory" + ] + }, + { + "description": "Storage in mmap file, not appendable\n\nSearch performance is defined by disk speed and the fraction of vectors that fit in memory.", + "type": "string", + "enum": [ + "Mmap" + ] + }, + { + "description": "Storage in chunked mmap files, appendable\n\nSearch performance is defined by disk speed and the fraction of vectors that fit in memory.", + "type": "string", + "enum": [ + "ChunkedMmap" + ] + } + ] + }, + "Indexes": { + "description": "Vector index configuration", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexSearchesTelemetry": { + "type": "object", + "required": [ + "filtered_exact", + "filtered_large_cardinality", + "filtered_plain", + "filtered_small_cardinality", + "unfiltered_exact", + "unfiltered_hnsw", + "unfiltered_plain" + ], + "properties": { + "index_name": { + "type": "string", + "nullable": true + }, + "unfiltered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_hnsw": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_small_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_large_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "OperationDurationStatistics": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "avg_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "min_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "max_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "last_responded": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "field_name": { + "type": "string", + "nullable": true + }, + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "type": "object", + "required": [ + "log", + "optimizations", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "optimizations": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "log": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TrackerTelemetry" + } + } + } + }, + "TrackerTelemetry": { + "description": "Tracker object used in telemetry", + "type": "object", + "required": [ + "name", + "segment_ids", + "start_at", + "status" + ], + "properties": { + "name": { + "description": "Name of the optimizer", + "type": "string" + }, + "segment_ids": { + "description": "Segment IDs being optimized", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + }, + "status": { + "$ref": "#/components/schemas/TrackerStatus" + }, + "start_at": { + "description": "Start time of the optimizer", + "type": "string", + "format": "date-time" + }, + "end_at": { + "description": "End time of the optimizer", + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "TrackerStatus": { + "description": "Represents the current state of the optimizer being tracked", + "oneOf": [ + { + "type": "string", + "enum": [ + "optimizing", + "done" + ] + }, + { + "type": "object", + "required": [ + "cancelled" + ], + "properties": { + "cancelled": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "RemoteShardTelemetry": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "searches": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "CollectionsAggregatedTelemetry": { + "type": "object", + "required": [ + "optimizers_status", + "params", + "vectors" + ], + "properties": { + "vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "optimizers_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + } + } + }, + "ClusterTelemetry": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterStatusTelemetry" + }, + { + "nullable": true + } + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatusTelemetry": { + "type": "object", + "required": [ + "commit", + "consensus_thread_status", + "is_voter", + "number_of_peers", + "pending_operations", + "term" + ], + "properties": { + "number_of_peers": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "term": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "role": { + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "type": "boolean" + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "RequestsTelemetry": { + "type": "object", + "required": [ + "grpc", + "rest" + ], + "properties": { + "rest": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc": { + "$ref": "#/components/schemas/GrpcTelemetry" + } + } + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + } + }, + "GrpcTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/ReplicateShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + }, + { + "$ref": "#/components/schemas/DropReplicaOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ReplicateShardOperation": { + "type": "object", + "required": [ + "replicate_shard" + ], + "properties": { + "replicate_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "DropReplicaOperation": { + "type": "object", + "required": [ + "drop_replica" + ], + "properties": { + "drop_replica": { + "$ref": "#/components/schemas/Replica" + } + } + }, + "Replica": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "LocksOption": { + "type": "object", + "required": [ + "write" + ], + "properties": { + "error_message": { + "type": "string", + "nullable": true + }, + "write": { + "type": "boolean" + } + } + }, + "SnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "description": "Examples: - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot` - Local path `file:///qdrant/snapshots/test_collection-2022-08-04-10-49-10.snapshot`", + "type": "string", + "format": "uri" + }, + "priority": { + "description": "Defines which data should be used as a source of truth if there are other replicas in the cluster. If set to `Snapshot`, the snapshot will be used as a source of truth, and the current state will be overwritten. If set to `Replica`, the current state will be used as a source of truth, and after recovery if will be synchronized with the snapshot.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/SnapshotPriority" + }, + { + "nullable": true + } + ] + } + } + }, + "SnapshotPriority": { + "description": "Defines source of truth for snapshot recovery: `NoSync` means - restore snapshot without *any* additional synchronization. `Snapshot` means - prefer snapshot data over the current state. `Replica` means - prefer existing data over the snapshot.", + "type": "string", + "enum": [ + "no_sync", + "snapshot", + "replica" + ] + }, + "CollectionsAliasesResponse": { + "type": "object", + "required": [ + "aliases" + ], + "properties": { + "aliases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasDescription" + } + } + } + }, + "AliasDescription": { + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "alias_name": { + "type": "string" + }, + "collection_name": { + "type": "string" + } + } + }, + "WriteOrdering": { + "description": "Defines write ordering guarantees for collection operations\n\n* `weak` - write operations may be reordered, works faster, default\n\n* `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change\n\n* `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down", + "type": "string", + "enum": [ + "weak", + "medium", + "strong" + ] + }, + "ReadConsistency": { + "description": "Read consistency parameter\n\nDefines how many replicas should be queried to get the result\n\n* `N` - send N random request and return points, which present on all of them\n\n* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of them\n\n* `all` - send requests to all nodes and return points which present on all of them\n\nDefault value is `Factor(1)`", + "anyOf": [ + { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + { + "$ref": "#/components/schemas/ReadConsistencyType" + } + ] + }, + "ReadConsistencyType": { + "description": "* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of nodes\n\n* `all` - send requests to all nodes and return points which present on all nodes", + "type": "string", + "enum": [ + "majority", + "quorum", + "all" + ] + }, + "UpdateVectors": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "Points with named vectors", + "type": "array", + "items": { + "$ref": "#/components/schemas/PointVectors" + }, + "minItems": 1 + } + } + }, + "PointVectors": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + } + } + }, + "DeleteVectors": { + "type": "object", + "required": [ + "vector" + ], + "properties": { + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector names", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + } + } + }, + "PointGroup": { + "type": "object", + "required": [ + "hits", + "id" + ], + "properties": { + "hits": { + "description": "Scored points that have the same value of the group_by key", + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + }, + "id": { + "$ref": "#/components/schemas/GroupId" + }, + "lookup": { + "description": "Record that has been looked up using the group id", + "anyOf": [ + { + "$ref": "#/components/schemas/Record" + }, + { + "nullable": true + } + ] + } + } + }, + "GroupId": { + "description": "Value of the group_by key, shared across all the hits in the group", + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "integer", + "format": "int64" + } + ] + }, + "SearchGroupsRequest": { + "type": "object", + "required": [ + "group_by", + "group_size", + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "group_by": { + "description": "Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.", + "type": "string", + "minLength": 1 + }, + "group_size": { + "description": "Maximum amount of points to return per group", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "limit": { + "description": "Maximum amount of groups to return", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "with_lookup": { + "description": "Look for points in another collection using the group ids", + "anyOf": [ + { + "$ref": "#/components/schemas/WithLookupInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "WithLookupInterface": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/WithLookup" + } + ] + }, + "WithLookup": { + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection to use for points lookup", + "type": "string" + }, + "with_payload": { + "description": "Options for specifying which payload to include (or not)", + "default": true, + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vectors": { + "description": "Options for specifying which vectors to include (or not)", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + } + } + }, + "RecommendGroupsRequest": { + "type": "object", + "required": [ + "group_by", + "group_size", + "limit", + "positive" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + }, + "group_by": { + "description": "Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.", + "type": "string", + "minLength": 1 + }, + "group_size": { + "description": "Maximum amount of points to return per group", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "limit": { + "description": "Maximum amount of groups to return", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "with_lookup": { + "description": "Look for points in another collection using the group ids", + "anyOf": [ + { + "$ref": "#/components/schemas/WithLookupInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "GroupsResult": { + "type": "object", + "required": [ + "groups" + ], + "properties": { + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointGroup" + } + } + } + }, + "UpdateOperations": { + "type": "object", + "required": [ + "operations" + ], + "properties": { + "operations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateOperation" + } + } + } + }, + "UpdateOperation": { + "anyOf": [ + { + "$ref": "#/components/schemas/UpsertOperation" + }, + { + "$ref": "#/components/schemas/DeleteOperation" + }, + { + "$ref": "#/components/schemas/SetPayloadOperation" + }, + { + "$ref": "#/components/schemas/OverwritePayloadOperation" + }, + { + "$ref": "#/components/schemas/DeletePayloadOperation" + }, + { + "$ref": "#/components/schemas/ClearPayloadOperation" + }, + { + "$ref": "#/components/schemas/UpdateVectorsOperation" + }, + { + "$ref": "#/components/schemas/DeleteVectorsOperation" + } + ] + }, + "UpsertOperation": { + "type": "object", + "required": [ + "upsert" + ], + "properties": { + "upsert": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + }, + "DeleteOperation": { + "type": "object", + "required": [ + "delete" + ], + "properties": { + "delete": { + "$ref": "#/components/schemas/PointsSelector" + } + } + }, + "SetPayloadOperation": { + "type": "object", + "required": [ + "set_payload" + ], + "properties": { + "set_payload": { + "$ref": "#/components/schemas/SetPayload" + } + } + }, + "OverwritePayloadOperation": { + "type": "object", + "required": [ + "overwrite_payload" + ], + "properties": { + "overwrite_payload": { + "$ref": "#/components/schemas/SetPayload" + } + } + }, + "DeletePayloadOperation": { + "type": "object", + "required": [ + "delete_payload" + ], + "properties": { + "delete_payload": { + "$ref": "#/components/schemas/DeletePayload" + } + } + }, + "ClearPayloadOperation": { + "type": "object", + "required": [ + "clear_payload" + ], + "properties": { + "clear_payload": { + "$ref": "#/components/schemas/PointsSelector" + } + } + }, + "UpdateVectorsOperation": { + "type": "object", + "required": [ + "update_vectors" + ], + "properties": { + "update_vectors": { + "$ref": "#/components/schemas/UpdateVectors" + } + } + }, + "DeleteVectorsOperation": { + "type": "object", + "required": [ + "delete_vectors" + ], + "properties": { + "delete_vectors": { + "$ref": "#/components/schemas/DeleteVectors" + } + } + }, + "ShardSnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "$ref": "#/components/schemas/ShardSnapshotLocation" + }, + "priority": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/SnapshotPriority" + }, + { + "nullable": true + } + ] + } + } + }, + "ShardSnapshotLocation": { + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "string" + } + ] + } + } + } +} diff --git a/docs/redoc/v1.6.x/openapi.json b/docs/redoc/v1.6.x/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..003ad40323724f52068ae6202ae61ccbabdf7016 --- /dev/null +++ b/docs/redoc/v1.6.x/openapi.json @@ -0,0 +1,9491 @@ +{ + "paths": { + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + }, + "/metrics": { + "get": { + "summary": "Collect Prometheus metrics data", + "description": "Collect metrics data including app info, collections info, cluster info and statistics", + "operationId": "metrics", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Metrics data in Prometheus format", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "# HELP app_info information about qdrant server\n# TYPE app_info counter\napp_info{name=\"qdrant\",version=\"0.11.1\"} 1\n# HELP cluster_enabled is cluster support enabled\n# TYPE cluster_enabled gauge\ncluster_enabled 0\n# HELP collections_total number of collections\n# TYPE collections_total gauge\ncollections_total 1\n" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/locks": { + "post": { + "summary": "Set lock options", + "description": "Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options", + "operationId": "post_locks", + "tags": [ + "service" + ], + "requestBody": { + "description": "Lock options and optional error message", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + }, + "get": { + "summary": "Get lock options", + "description": "Get lock options. If write is locked, all write operations and collection creation are forbidden", + "operationId": "get_locks", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + } + }, + "/healthz": { + "get": { + "summary": "Kubernetes healthz endpoint", + "description": "An endpoint for health checking used in Kubernetes.", + "operationId": "healthz", + "tags": [ + "service" + ], + "responses": { + "200": { + "description": "Healthz response", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "healthz check passed" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/livez": { + "get": { + "summary": "Kubernetes livez endpoint", + "description": "An endpoint for health checking used in Kubernetes.", + "operationId": "livez", + "tags": [ + "service" + ], + "responses": { + "200": { + "description": "Healthz response", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "healthz check passed" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/readyz": { + "get": { + "summary": "Kubernetes readyz endpoint", + "description": "An endpoint for health checking used in Kubernetes.", + "operationId": "readyz", + "tags": [ + "service" + ], + "responses": { + "200": { + "description": "Healthz response", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "healthz check passed" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/recover": { + "post": { + "tags": [ + "cluster" + ], + "summary": "Tries to recover current peer Raft state.", + "operationId": "recover_current_peer", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "force", + "in": "query", + "description": "If true - removes peer even if it has shards/replicas on it.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List aliases for collection", + "description": "Get list of all aliases for a collection", + "operationId": "get_collection_aliases", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections aliases", + "description": "Get list of all existing collections aliases", + "operationId": "get_collections_aliases", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/upload": { + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from an uploaded snapshot", + "description": "Recover local collection data from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_uploaded_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "priority", + "in": "query", + "description": "Defines source of truth for snapshot recovery", + "required": false, + "schema": { + "$ref": "#/components/schemas/SnapshotPriority" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "snapshot": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Delete collection snapshot", + "description": "Delete snapshot for a collection", + "operationId": "delete_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "parameters": [ + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots" + ], + "summary": "Delete storage snapshot", + "description": "Delete snapshot of the whole storage", + "operationId": "delete_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the full snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots/upload": { + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover shard from an uploaded snapshot", + "description": "Recover shard of a local collection from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection shard.", + "operationId": "recover_shard_from_uploaded_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard to recover", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "priority", + "in": "query", + "description": "Defines source of truth for snapshot recovery", + "required": false, + "schema": { + "$ref": "#/components/schemas/SnapshotPriority" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "snapshot": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover shard of a local collection data from a snapshot. This will overwrite any data, stored in this shard, for the collection.", + "operationId": "recover_shard_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard to recover", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShardSnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List shards snapshots for a collection", + "description": "Get list of snapshots for a shard of a collection", + "operationId": "list_shard_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create shard snapshot", + "description": "Create new snapshot of a shard for a collection", + "operationId": "create_shard_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Delete shard snapshot", + "description": "Delete snapshot of a shard for a collection", + "operationId": "delete_shard_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ] + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot of a shard from a collection as a file", + "operationId": "get_shard_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/vectors": { + "put": { + "tags": [ + "points" + ], + "summary": "Update vectors", + "description": "Update specified named vectors on points, keep unspecified vectors intact.", + "operationId": "update_vectors", + "requestBody": { + "description": "Update named vectors on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateVectors" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/vectors/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete vectors", + "description": "Delete named vectors from the given points.", + "operationId": "delete_vectors", + "requestBody": { + "description": "Delete named vectors from points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteVectors" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload values for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Overwrite payload", + "description": "Replace full payload of points with new one", + "operationId": "overwrite_payload", + "requestBody": { + "description": "Payload and points selector", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Batch update points", + "description": "Apply a series of update operations for points, vectors and payloads", + "operationId": "batch_update", + "requestBody": { + "description": "update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to apply operations on", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/groups": { + "post": { + "tags": [ + "points" + ], + "summary": "Search point groups", + "description": "Retrieve closest points based on vector similarity and given filtering conditions, grouped by a given payload field", + "operationId": "search_point_groups", + "requestBody": { + "description": "Search request with optional filtering, grouped by a given payload field", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchGroupsRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/GroupsResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/groups": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend point groups", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples, grouped by a given payload field.", + "operationId": "recommend_point_groups", + "requestBody": { + "description": "Request points based on positive and negative examples, grouped by a payload field.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendGroupsRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/GroupsResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ] + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v1.6.x" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "indexed_vectors_count", + "optimizer_status", + "payload_schema", + "points_count", + "segments_count", + "status", + "vectors_count" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Number of vectors in collection All vectors in collection are available for querying Calculated as `points_count x vectors_per_point` Where `vectors_per_point` is a number of named vectors in schema", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "indexed_vectors_count": { + "description": "Number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in vector index (HNSW)", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "description": "Number of points (vectors + payloads) in collection Each point could be accessed by unique id", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "segments_count": { + "description": "Number of segments in collection. Each segment has independent vector as payload indexes", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection. `Green` - all good. `Yellow` - optimization is running, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + }, + "quantization_config": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParams": { + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "replication_factor": { + "description": "Number of replicas for each shard", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "read_fan_out_factor": { + "description": "Defines how many additional replicas should be processing read request at the same time. Default value is Auto, which means that fan-out will be determined automatically based on the busyness of the local replica. Having more than 0 might be useful to smooth latency spikes of individual nodes.", + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Custom params for quantization. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + }, + "on_disk": { + "description": "If true, vectors are served from disk, improving RAM usage at the cost of latency Default: false", + "type": "boolean", + "nullable": true + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot" + ] + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build the index.", + "type": "integer", + "format": "uint", + "minimum": 4, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in kilobytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 10, + "nullable": true + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, the index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for additional payload-aware HNSW links. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "QuantizationConfig": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScalarQuantization" + }, + { + "$ref": "#/components/schemas/ProductQuantization" + }, + { + "$ref": "#/components/schemas/BinaryQuantization" + } + ] + }, + "ScalarQuantization": { + "type": "object", + "required": [ + "scalar" + ], + "properties": { + "scalar": { + "$ref": "#/components/schemas/ScalarQuantizationConfig" + } + } + }, + "ScalarQuantizationConfig": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/ScalarType" + }, + "quantile": { + "description": "Quantile for quantization. Expected value range in [0.5, 1.0]. If not set - use the whole range of values", + "type": "number", + "format": "float", + "maximum": 1, + "minimum": 0.5, + "nullable": true + }, + "always_ram": { + "description": "If true - quantized vectors always will be stored in RAM, ignoring the config of main storage", + "type": "boolean", + "nullable": true + } + } + }, + "ScalarType": { + "type": "string", + "enum": [ + "int8" + ] + }, + "ProductQuantization": { + "type": "object", + "required": [ + "product" + ], + "properties": { + "product": { + "$ref": "#/components/schemas/ProductQuantizationConfig" + } + } + }, + "ProductQuantizationConfig": { + "type": "object", + "required": [ + "compression" + ], + "properties": { + "compression": { + "$ref": "#/components/schemas/CompressionRatio" + }, + "always_ram": { + "type": "boolean", + "nullable": true + } + } + }, + "CompressionRatio": { + "type": "string", + "enum": [ + "x4", + "x8", + "x16", + "x32", + "x64" + ] + }, + "BinaryQuantization": { + "type": "object", + "required": [ + "binary" + ], + "properties": { + "binary": { + "$ref": "#/components/schemas/BinaryQuantizationConfig" + } + } + }, + "BinaryQuantizationConfig": { + "type": "object", + "properties": { + "always_ram": { + "type": "boolean", + "nullable": true + } + } + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 4 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for hnsw graph built for payload index. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "maximum": 1, + "minimum": 0 + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 100 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads. If `default_segment_number = 0`, will be automatically selected by the number of available CPUs.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexing speed is more important - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.\n\nMemmap storage is disabled by default, to enable it, set this threshold to a reasonable value.\n\nTo disable memmap storage, set this to `0`. Internally it will use the largest threshold possible.\n\nNote: 1Kb = 1 vector of size 256", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing\n\nDefault value is 20,000, based on .\n\nTo disable vector indexing, set to `0`.\n\nNote: 1kB = 1 vector of size 256.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type", + "points" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + }, + "points": { + "description": "Number of points indexed with this index", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text", + "bool" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word", + "multilingual" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + ] + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unnamed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/IsNullCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/NestedCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "geo_polygon": { + "description": "Check if geo point is within a given polygon", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoPolygon" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + }, + { + "$ref": "#/components/schemas/MatchAny" + }, + { + "$ref": "#/components/schemas/MatchExcept" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "MatchAny": { + "description": "Exact match on any of the given values", + "type": "object", + "required": [ + "any" + ], + "properties": { + "any": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "AnyVariants": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + ] + }, + "MatchExcept": { + "description": "Should have at least one value not matching the any given values", + "type": "object", + "required": [ + "except" + ], + "properties": { + "except": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "GeoPolygon": { + "description": "Geo filter request\n\nMatches coordinates inside the polygon, defined by `exterior` and `interiors`", + "type": "object", + "required": [ + "exterior" + ], + "properties": { + "exterior": { + "$ref": "#/components/schemas/GeoLineString" + }, + "interiors": { + "description": "Interior lines (if present) bound holes within the surface each GeoLineString must consist of a minimum of 4 points, and the first and last points must be the same.", + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoLineString" + }, + "nullable": true + } + } + }, + "GeoLineString": { + "description": "Ordered sequence of GeoPoints representing the line", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoPoint" + } + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "IsNullCondition": { + "description": "Select points with null payload for a specified field", + "type": "object", + "required": [ + "is_null" + ], + "properties": { + "is_null": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "NestedCondition": { + "type": "object", + "required": [ + "nested" + ], + "properties": { + "nested": { + "$ref": "#/components/schemas/Nested" + } + } + }, + "Nested": { + "description": "Select points with payload for a specified nested field", + "type": "object", + "required": [ + "filter", + "key" + ], + "properties": { + "key": { + "type": "string" + }, + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "exact": { + "description": "Search without approximation. If set to true, search may run long but with exact results.", + "default": false, + "type": "boolean" + }, + "quantization": { + "description": "Quantization params", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationSearchParams" + }, + { + "nullable": true + } + ] + }, + "indexed_only": { + "description": "If enabled, the engine will only perform search among indexed or small segments. Using this option prevents slow searches in case of delayed index, but does not guarantee that all uploaded vectors will be included in search results", + "default": false, + "type": "boolean" + } + } + }, + "QuantizationSearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "ignore": { + "description": "If true, quantized vectors are ignored. Default is false.", + "default": false, + "type": "boolean" + }, + "rescore": { + "description": "If true, use original vectors to re-score top-k results. Might require more time in case if original vectors are stored on disk. If not set, qdrant decides automatically apply rescoring or not.", + "default": null, + "type": "boolean", + "nullable": true + }, + "oversampling": { + "description": "Oversampling factor for quantization. Default is 1.0.\n\nDefines how many extra vectors should be pre-selected using quantized index, and then re-scored using original vectors.\n\nFor example, if `oversampling` is 2.4 and `limit` is 100, then 240 vectors will be pre-selected using quantized index, and then top-100 will be returned after re-scoring.", + "default": null, + "type": "number", + "format": "double", + "minimum": 1, + "nullable": true + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "description": "`Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.", + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which can be ids of points that are already stored in the collection, raw vectors, or even ids and vectors combined.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to the `strategy` chosen.", + "type": "object", + "required": [ + "limit" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "strategy": { + "description": "How to use positive and negative examples to find the results", + "anyOf": [ + { + "$ref": "#/components/schemas/RecommendStrategy" + }, + { + "nullable": true + } + ] + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "RecommendExample": { + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + ] + }, + "RecommendStrategy": { + "description": "How to use positive and negative examples to find the results, default is `average_vector`:\n\n* `average_vector` - Average positive and negative vectors and create a single query with the formula `query = avg_pos + avg_pos - avg_neg`. Then performs normal search.\n\n* `best_score` - Uses custom search objective. Each candidate is compared against all examples, its score is then chosen from the `max(max_pos_score, max_neg_score)`. If the `max_neg_score` is chosen then it is squared and negated, otherwise it is just the `max_pos_score`.", + "type": "string", + "enum": [ + "average_vector", + "best_score" + ] + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "LookupLocation": { + "description": "Defines a location to use for looking up the vector. Specifies collection and vector field name.", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection used for lookup", + "type": "string" + }, + "vector": { + "description": "Optional name of the vector field within the collection. If not provided, the default vector field will be used.", + "default": null, + "type": "string", + "nullable": true + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "vectors" + ], + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "replication_factor": { + "description": "Number of shards replicas. Default is 1 Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "init_from": { + "description": "Specify other collection to copy data from.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/InitFrom" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Quantization parameters. If none - quantization is disabled.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.\n\nMemmap storage is disabled by default, to enable it, set this threshold to a reasonable value.\n\nTo disable memmap storage, set this to `0`.\n\nNote: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing\n\nDefault value is 20,000, based on .\n\nTo disable vector indexing, set to `0`.\n\nNote: 1kB = 1 vector of size 256.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "InitFrom": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "type": "string" + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "vectors": { + "description": "Map of vector data parameters to update for each named vector. To update parameters in a collection having a single unnamed vector, use an empty string as name.", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorsConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - it is left unchanged. This operation is blocking, it will only proceed once all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Collection base params. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionParamsDiff" + }, + { + "nullable": true + } + ] + }, + "hnsw_config": { + "description": "HNSW parameters to update for the collection index. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Quantization parameters to update. If none - it is left unchanged.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfigDiff" + }, + { + "nullable": true + } + ] + } + } + }, + "VectorsConfigDiff": { + "description": "Vector update params for multiple vectors\n\n{ \"vector_name\": { \"hnsw_config\": { \"m\": 8 } } }", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParamsDiff" + } + }, + "VectorParamsDiff": { + "type": "object", + "properties": { + "hnsw_config": { + "description": "Update params for HNSW index. If empty object - it will be unset.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Update params for quantization. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfigDiff" + }, + { + "nullable": true + } + ] + }, + "on_disk": { + "description": "If true, vectors are served from disk, improving RAM usage at the cost of latency", + "type": "boolean", + "nullable": true + } + } + }, + "QuantizationConfigDiff": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScalarQuantization" + }, + { + "$ref": "#/components/schemas/ProductQuantization" + }, + { + "$ref": "#/components/schemas/BinaryQuantization" + }, + { + "$ref": "#/components/schemas/Disabled" + } + ] + }, + "Disabled": { + "type": "string", + "enum": [ + "Disabled" + ] + }, + "CollectionParamsDiff": { + "type": "object", + "properties": { + "replication_factor": { + "description": "Number of replicas for each shard", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Minimal number successful responses from replicas to consider operation successful", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "read_fan_out_factor": { + "description": "Fan-out every read request to these many additional remote nodes (and return first available response)", + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + } + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "PointInsertOperations": { + "oneOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + } + ] + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "PointsBatch": { + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + } + } + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + } + } + }, + "SetPayload": { + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Assigns payload to each point that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "DeletePayload": { + "type": "object", + "required": [ + "keys" + ], + "properties": { + "keys": { + "description": "List of payload keys to remove from payload", + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "message_send_failures", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + }, + "message_send_failures": { + "description": "Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MessageSendErrors" + } + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "description": "Role of the peer in the consensus", + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "MessageSendErrors": { + "description": "Message send failures for a particular peer", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "latest_error": { + "type": "string", + "nullable": true + } + } + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ReplicaState": { + "description": "State of the single shard within a replica set.", + "type": "string", + "enum": [ + "Active", + "Dead", + "Partial", + "Initializing", + "Listener" + ] + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "sync", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sync": { + "description": "If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another", + "type": "boolean" + } + } + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster", + "collections", + "id", + "requests" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "collections": { + "$ref": "#/components/schemas/CollectionsTelemetry" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterTelemetry" + }, + "requests": { + "$ref": "#/components/schemas/RequestsTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "name", + "startup", + "version" + ], + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppFeaturesTelemetry" + }, + { + "nullable": true + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + { + "nullable": true + } + ] + }, + "startup": { + "type": "string", + "format": "date-time" + } + } + }, + "AppFeaturesTelemetry": { + "type": "object", + "required": [ + "debug", + "recovery_mode", + "service_debug_feature", + "web_feature" + ], + "properties": { + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + }, + "recovery_mode": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "CollectionsTelemetry": { + "type": "object", + "required": [ + "number_of_collections" + ], + "properties": { + "number_of_collections": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetryEnum" + }, + "nullable": true + } + } + }, + "CollectionTelemetryEnum": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionTelemetry" + }, + { + "$ref": "#/components/schemas/CollectionsAggregatedTelemetry" + } + ] + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time_ms", + "shards", + "transfers" + ], + "properties": { + "id": { + "type": "string" + }, + "init_time_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplicaSetTelemetry" + } + }, + "transfers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "ReplicaSetTelemetry": { + "type": "object", + "required": [ + "id", + "remote", + "replicate_states" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "local": { + "anyOf": [ + { + "$ref": "#/components/schemas/LocalShardTelemetry" + }, + { + "nullable": true + } + ] + }, + "remote": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardTelemetry" + } + }, + "replicate_states": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ReplicaState" + } + } + } + }, + "LocalShardTelemetry": { + "type": "object", + "required": [ + "optimizations", + "segments" + ], + "properties": { + "variant_name": { + "type": "string", + "nullable": true + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizations": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index_searches" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index_searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorIndexSearchesTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_indexed_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type", + "vector_data" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_indexed_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + }, + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "VectorDataInfo": { + "type": "object", + "required": [ + "num_deleted_vectors", + "num_indexed_vectors", + "num_vectors" + ], + "properties": { + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_indexed_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "SegmentConfig": { + "type": "object", + "required": [ + "payload_storage_type", + "vector_data" + ], + "properties": { + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "index", + "size", + "storage_type" + ], + "properties": { + "size": { + "description": "Size/dimensionality of the vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "storage_type": { + "$ref": "#/components/schemas/VectorStorageType" + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "quantization_config": { + "description": "Vector specific quantization config that overrides collection config", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "VectorStorageType": { + "description": "Storage types for vectors", + "oneOf": [ + { + "description": "Storage in memory (RAM)\n\nWill be very fast at the cost of consuming a lot of memory.", + "type": "string", + "enum": [ + "Memory" + ] + }, + { + "description": "Storage in mmap file, not appendable\n\nSearch performance is defined by disk speed and the fraction of vectors that fit in memory.", + "type": "string", + "enum": [ + "Mmap" + ] + }, + { + "description": "Storage in chunked mmap files, appendable\n\nSearch performance is defined by disk speed and the fraction of vectors that fit in memory.", + "type": "string", + "enum": [ + "ChunkedMmap" + ] + } + ] + }, + "Indexes": { + "description": "Vector index configuration", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexSearchesTelemetry": { + "type": "object", + "required": [ + "filtered_exact", + "filtered_large_cardinality", + "filtered_plain", + "filtered_small_cardinality", + "unfiltered_exact", + "unfiltered_hnsw", + "unfiltered_plain" + ], + "properties": { + "index_name": { + "type": "string", + "nullable": true + }, + "unfiltered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_hnsw": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_small_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_large_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "OperationDurationStatistics": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "avg_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "min_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "max_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "last_responded": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "field_name": { + "type": "string", + "nullable": true + }, + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "type": "object", + "required": [ + "log", + "optimizations", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "optimizations": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "log": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TrackerTelemetry" + } + } + } + }, + "TrackerTelemetry": { + "description": "Tracker object used in telemetry", + "type": "object", + "required": [ + "name", + "segment_ids", + "start_at", + "status" + ], + "properties": { + "name": { + "description": "Name of the optimizer", + "type": "string" + }, + "segment_ids": { + "description": "Segment IDs being optimized", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + }, + "status": { + "$ref": "#/components/schemas/TrackerStatus" + }, + "start_at": { + "description": "Start time of the optimizer", + "type": "string", + "format": "date-time" + }, + "end_at": { + "description": "End time of the optimizer", + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "TrackerStatus": { + "description": "Represents the current state of the optimizer being tracked", + "oneOf": [ + { + "type": "string", + "enum": [ + "optimizing", + "done" + ] + }, + { + "type": "object", + "required": [ + "cancelled" + ], + "properties": { + "cancelled": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "RemoteShardTelemetry": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "searches": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "CollectionsAggregatedTelemetry": { + "type": "object", + "required": [ + "optimizers_status", + "params", + "vectors" + ], + "properties": { + "vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "optimizers_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + } + } + }, + "ClusterTelemetry": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterStatusTelemetry" + }, + { + "nullable": true + } + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatusTelemetry": { + "type": "object", + "required": [ + "commit", + "consensus_thread_status", + "is_voter", + "number_of_peers", + "pending_operations", + "term" + ], + "properties": { + "number_of_peers": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "term": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "role": { + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "type": "boolean" + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "RequestsTelemetry": { + "type": "object", + "required": [ + "grpc", + "rest" + ], + "properties": { + "rest": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc": { + "$ref": "#/components/schemas/GrpcTelemetry" + } + } + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + } + }, + "GrpcTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/ReplicateShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + }, + { + "$ref": "#/components/schemas/DropReplicaOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "ReplicateShardOperation": { + "type": "object", + "required": [ + "replicate_shard" + ], + "properties": { + "replicate_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "DropReplicaOperation": { + "type": "object", + "required": [ + "drop_replica" + ], + "properties": { + "drop_replica": { + "$ref": "#/components/schemas/Replica" + } + } + }, + "Replica": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "LocksOption": { + "type": "object", + "required": [ + "write" + ], + "properties": { + "error_message": { + "type": "string", + "nullable": true + }, + "write": { + "type": "boolean" + } + } + }, + "SnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "description": "Examples: - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot` - Local path `file:///qdrant/snapshots/test_collection-2022-08-04-10-49-10.snapshot`", + "type": "string", + "format": "uri" + }, + "priority": { + "description": "Defines which data should be used as a source of truth if there are other replicas in the cluster. If set to `Snapshot`, the snapshot will be used as a source of truth, and the current state will be overwritten. If set to `Replica`, the current state will be used as a source of truth, and after recovery if will be synchronized with the snapshot.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/SnapshotPriority" + }, + { + "nullable": true + } + ] + } + } + }, + "SnapshotPriority": { + "description": "Defines source of truth for snapshot recovery: `NoSync` means - restore snapshot without *any* additional synchronization. `Snapshot` means - prefer snapshot data over the current state. `Replica` means - prefer existing data over the snapshot.", + "type": "string", + "enum": [ + "no_sync", + "snapshot", + "replica" + ] + }, + "CollectionsAliasesResponse": { + "type": "object", + "required": [ + "aliases" + ], + "properties": { + "aliases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasDescription" + } + } + } + }, + "AliasDescription": { + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "alias_name": { + "type": "string" + }, + "collection_name": { + "type": "string" + } + } + }, + "WriteOrdering": { + "description": "Defines write ordering guarantees for collection operations\n\n* `weak` - write operations may be reordered, works faster, default\n\n* `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change\n\n* `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down", + "type": "string", + "enum": [ + "weak", + "medium", + "strong" + ] + }, + "ReadConsistency": { + "description": "Read consistency parameter\n\nDefines how many replicas should be queried to get the result\n\n* `N` - send N random request and return points, which present on all of them\n\n* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of them\n\n* `all` - send requests to all nodes and return points which present on all of them\n\nDefault value is `Factor(1)`", + "anyOf": [ + { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + { + "$ref": "#/components/schemas/ReadConsistencyType" + } + ] + }, + "ReadConsistencyType": { + "description": "* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of nodes\n\n* `all` - send requests to all nodes and return points which present on all nodes", + "type": "string", + "enum": [ + "majority", + "quorum", + "all" + ] + }, + "UpdateVectors": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "Points with named vectors", + "type": "array", + "items": { + "$ref": "#/components/schemas/PointVectors" + }, + "minItems": 1 + } + } + }, + "PointVectors": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + } + } + }, + "DeleteVectors": { + "type": "object", + "required": [ + "vector" + ], + "properties": { + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector names", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + } + } + }, + "PointGroup": { + "type": "object", + "required": [ + "hits", + "id" + ], + "properties": { + "hits": { + "description": "Scored points that have the same value of the group_by key", + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + }, + "id": { + "$ref": "#/components/schemas/GroupId" + }, + "lookup": { + "description": "Record that has been looked up using the group id", + "anyOf": [ + { + "$ref": "#/components/schemas/Record" + }, + { + "nullable": true + } + ] + } + } + }, + "GroupId": { + "description": "Value of the group_by key, shared across all the hits in the group", + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "integer", + "format": "int64" + } + ] + }, + "SearchGroupsRequest": { + "type": "object", + "required": [ + "group_by", + "group_size", + "limit", + "vector" + ], + "properties": { + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "group_by": { + "description": "Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.", + "type": "string", + "minLength": 1 + }, + "group_size": { + "description": "Maximum amount of points to return per group", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "limit": { + "description": "Maximum amount of groups to return", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "with_lookup": { + "description": "Look for points in another collection using the group ids", + "anyOf": [ + { + "$ref": "#/components/schemas/WithLookupInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "WithLookupInterface": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/WithLookup" + } + ] + }, + "WithLookup": { + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection to use for points lookup", + "type": "string" + }, + "with_payload": { + "description": "Options for specifying which payload to include (or not)", + "default": true, + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vectors": { + "description": "Options for specifying which vectors to include (or not)", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + } + } + }, + "RecommendGroupsRequest": { + "type": "object", + "required": [ + "group_by", + "group_size", + "limit" + ], + "properties": { + "positive": { + "description": "Look for vectors closest to those", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "strategy": { + "description": "How to use positive and negative examples to find the results", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/RecommendStrategy" + }, + { + "nullable": true + } + ] + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + }, + "group_by": { + "description": "Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.", + "type": "string", + "minLength": 1 + }, + "group_size": { + "description": "Maximum amount of points to return per group", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "limit": { + "description": "Maximum amount of groups to return", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "with_lookup": { + "description": "Look for points in another collection using the group ids", + "anyOf": [ + { + "$ref": "#/components/schemas/WithLookupInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "GroupsResult": { + "type": "object", + "required": [ + "groups" + ], + "properties": { + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointGroup" + } + } + } + }, + "UpdateOperations": { + "type": "object", + "required": [ + "operations" + ], + "properties": { + "operations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateOperation" + } + } + } + }, + "UpdateOperation": { + "anyOf": [ + { + "$ref": "#/components/schemas/UpsertOperation" + }, + { + "$ref": "#/components/schemas/DeleteOperation" + }, + { + "$ref": "#/components/schemas/SetPayloadOperation" + }, + { + "$ref": "#/components/schemas/OverwritePayloadOperation" + }, + { + "$ref": "#/components/schemas/DeletePayloadOperation" + }, + { + "$ref": "#/components/schemas/ClearPayloadOperation" + }, + { + "$ref": "#/components/schemas/UpdateVectorsOperation" + }, + { + "$ref": "#/components/schemas/DeleteVectorsOperation" + } + ] + }, + "UpsertOperation": { + "type": "object", + "required": [ + "upsert" + ], + "properties": { + "upsert": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + }, + "DeleteOperation": { + "type": "object", + "required": [ + "delete" + ], + "properties": { + "delete": { + "$ref": "#/components/schemas/PointsSelector" + } + } + }, + "SetPayloadOperation": { + "type": "object", + "required": [ + "set_payload" + ], + "properties": { + "set_payload": { + "$ref": "#/components/schemas/SetPayload" + } + } + }, + "OverwritePayloadOperation": { + "type": "object", + "required": [ + "overwrite_payload" + ], + "properties": { + "overwrite_payload": { + "$ref": "#/components/schemas/SetPayload" + } + } + }, + "DeletePayloadOperation": { + "type": "object", + "required": [ + "delete_payload" + ], + "properties": { + "delete_payload": { + "$ref": "#/components/schemas/DeletePayload" + } + } + }, + "ClearPayloadOperation": { + "type": "object", + "required": [ + "clear_payload" + ], + "properties": { + "clear_payload": { + "$ref": "#/components/schemas/PointsSelector" + } + } + }, + "UpdateVectorsOperation": { + "type": "object", + "required": [ + "update_vectors" + ], + "properties": { + "update_vectors": { + "$ref": "#/components/schemas/UpdateVectors" + } + } + }, + "DeleteVectorsOperation": { + "type": "object", + "required": [ + "delete_vectors" + ], + "properties": { + "delete_vectors": { + "$ref": "#/components/schemas/DeleteVectors" + } + } + }, + "ShardSnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "$ref": "#/components/schemas/ShardSnapshotLocation" + }, + "priority": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/SnapshotPriority" + }, + { + "nullable": true + } + ] + } + } + }, + "ShardSnapshotLocation": { + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "string" + } + ] + } + } + } +} diff --git a/docs/redoc/v1.7.x/openapi.json b/docs/redoc/v1.7.x/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..b666c2861d5a8005f212d7b3fc79f8fdd18d1a90 --- /dev/null +++ b/docs/redoc/v1.7.x/openapi.json @@ -0,0 +1,10482 @@ +{ + "paths": { + "/collections/{collection_name}/shards": { + "put": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Create shard key", + "operationId": "create_shard_key", + "requestBody": { + "description": "Shard key configuration", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateShardingKey" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to create shards for", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/delete": { + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Delete shard key", + "operationId": "delete_shard_key", + "requestBody": { + "description": "Select shard key to delete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DropShardingKey" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to create shards for", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + }, + "/metrics": { + "get": { + "summary": "Collect Prometheus metrics data", + "description": "Collect metrics data including app info, collections info, cluster info and statistics", + "operationId": "metrics", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Metrics data in Prometheus format", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "# HELP app_info information about qdrant server\n# TYPE app_info counter\napp_info{name=\"qdrant\",version=\"0.11.1\"} 1\n# HELP cluster_enabled is cluster support enabled\n# TYPE cluster_enabled gauge\ncluster_enabled 0\n# HELP collections_total number of collections\n# TYPE collections_total gauge\ncollections_total 1\n" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/locks": { + "post": { + "summary": "Set lock options", + "description": "Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options", + "operationId": "post_locks", + "tags": [ + "service" + ], + "requestBody": { + "description": "Lock options and optional error message", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + }, + "get": { + "summary": "Get lock options", + "description": "Get lock options. If write is locked, all write operations and collection creation are forbidden", + "operationId": "get_locks", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + } + }, + "/healthz": { + "get": { + "summary": "Kubernetes healthz endpoint", + "description": "An endpoint for health checking used in Kubernetes.", + "operationId": "healthz", + "tags": [ + "service" + ], + "responses": { + "200": { + "description": "Healthz response", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "healthz check passed" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/livez": { + "get": { + "summary": "Kubernetes livez endpoint", + "description": "An endpoint for health checking used in Kubernetes.", + "operationId": "livez", + "tags": [ + "service" + ], + "responses": { + "200": { + "description": "Healthz response", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "healthz check passed" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/readyz": { + "get": { + "summary": "Kubernetes readyz endpoint", + "description": "An endpoint for health checking used in Kubernetes.", + "operationId": "readyz", + "tags": [ + "service" + ], + "responses": { + "200": { + "description": "Healthz response", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "healthz check passed" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/recover": { + "post": { + "tags": [ + "cluster" + ], + "summary": "Tries to recover current peer Raft state.", + "operationId": "recover_current_peer", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "force", + "in": "query", + "description": "If true - removes peer even if it has shards/replicas on it.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List aliases for collection", + "description": "Get list of all aliases for a collection", + "operationId": "get_collection_aliases", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections aliases", + "description": "Get list of all existing collections aliases", + "operationId": "get_collections_aliases", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/upload": { + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from an uploaded snapshot", + "description": "Recover local collection data from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_uploaded_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "priority", + "in": "query", + "description": "Defines source of truth for snapshot recovery", + "required": false, + "schema": { + "$ref": "#/components/schemas/SnapshotPriority" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "snapshot": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Delete collection snapshot", + "description": "Delete snapshot for a collection", + "operationId": "delete_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "parameters": [ + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots" + ], + "summary": "Delete storage snapshot", + "description": "Delete snapshot of the whole storage", + "operationId": "delete_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the full snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots/upload": { + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover shard from an uploaded snapshot", + "description": "Recover shard of a local collection from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection shard.", + "operationId": "recover_shard_from_uploaded_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard to recover", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "priority", + "in": "query", + "description": "Defines source of truth for snapshot recovery", + "required": false, + "schema": { + "$ref": "#/components/schemas/SnapshotPriority" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "snapshot": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover shard of a local collection data from a snapshot. This will overwrite any data, stored in this shard, for the collection.", + "operationId": "recover_shard_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard to recover", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShardSnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List shards snapshots for a collection", + "description": "Get list of snapshots for a shard of a collection", + "operationId": "list_shard_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create shard snapshot", + "description": "Create new snapshot of a shard for a collection", + "operationId": "create_shard_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Delete shard snapshot", + "description": "Delete snapshot of a shard for a collection", + "operationId": "delete_shard_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot of a shard from a collection as a file", + "operationId": "get_shard_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/vectors": { + "put": { + "tags": [ + "points" + ], + "summary": "Update vectors", + "description": "Update specified named vectors on points, keep unspecified vectors intact.", + "operationId": "update_vectors", + "requestBody": { + "description": "Update named vectors on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateVectors" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/vectors/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete vectors", + "description": "Delete named vectors from the given points.", + "operationId": "delete_vectors", + "requestBody": { + "description": "Delete named vectors from points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteVectors" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload values for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Overwrite payload", + "description": "Replace full payload of points with new one", + "operationId": "overwrite_payload", + "requestBody": { + "description": "Payload and points selector", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Batch update points", + "description": "Apply a series of update operations for points, vectors and payloads", + "operationId": "batch_update", + "requestBody": { + "description": "update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to apply operations on", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/groups": { + "post": { + "tags": [ + "points" + ], + "summary": "Search point groups", + "description": "Retrieve closest points based on vector similarity and given filtering conditions, grouped by a given payload field", + "operationId": "search_point_groups", + "requestBody": { + "description": "Search request with optional filtering, grouped by a given payload field", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchGroupsRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/GroupsResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/groups": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend point groups", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples, grouped by a given payload field.", + "operationId": "recommend_point_groups", + "requestBody": { + "description": "Request points based on positive and negative examples, grouped by a payload field.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendGroupsRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/GroupsResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/discover": { + "post": { + "tags": [ + "points" + ], + "summary": "Discover points", + "description": "Use context and a target to find the most similar points to the target, constrained by the context.\nWhen using only the context (without a target), a special search - called context search - is performed where pairs of points are used to generate a loss that guides the search towards the zone where most positive examples overlap. This means that the score minimizes the scenario of finding a point closer to a negative than to a positive part of a pair.\nSince the score of a context relates to loss, the maximum score a point can get is 0.0, and it becomes normal that many points can have a score of 0.0.\nWhen using target (with or without context), the score behaves a little different: The integer part of the score represents the rank with respect to the context, while the decimal part of the score relates to the distance to the target. The context part of the score for each pair is calculated +1 if the point is closer to a positive than to a negative part of a pair, and -1 otherwise.\n", + "operationId": "discover_points", + "requestBody": { + "description": "Request points based on {positive, negative} pairs of examples, and/or a target", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DiscoverRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/discover/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Discover batch points", + "description": "Look for points based on target and/or positive and negative example pairs, in batch.", + "operationId": "discover_batch_points", + "requestBody": { + "description": "Batch request points based on { positive, negative } pairs of examples, and/or a target.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DiscoverRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [ + { + "api-key": [] + }, + { + "bearerAuth": [] + }, + {} + ], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v1.7.x" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup" + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots" + } + ], + "components": { + "securitySchemes": { + "api-key": { + "type": "apiKey", + "in": "header", + "name": "api-key", + "description": "Authorization key, either read-write or read-only" + }, + "bearerAuth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "optimizer_status", + "payload_schema", + "segments_count", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Approximate number of vectors in collection. All vectors in collection are available for querying. Calculated as `points_count x vectors_per_point`. Where `vectors_per_point` is a number of named vectors in schema.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexed_vectors_count": { + "description": "Approximate number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in a specialized vector index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "points_count": { + "description": "Approximate number of points (vectors + payloads) in collection. Each point could be accessed by unique id.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "segments_count": { + "description": "Number of segments in collection. Each segment has independent vector as payload indexes", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection. `Green` - all good. `Yellow` - optimization is running, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + }, + "quantization_config": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParams": { + "type": "object", + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "sharding_method": { + "description": "Sharding method Default is Auto - points are distributed across all available shards Custom - points are distributed across shards according to shard key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardingMethod" + }, + { + "nullable": true + } + ] + }, + "replication_factor": { + "description": "Number of replicas for each shard", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "read_fan_out_factor": { + "description": "Defines how many additional replicas should be processing read request at the same time. Default value is Auto, which means that fan-out will be determined automatically based on the busyness of the local replica. Having more than 0 might be useful to smooth latency spikes of individual nodes.", + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + }, + "sparse_vectors": { + "description": "Configuration of the sparse vector storage", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorParams" + }, + "nullable": true + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Custom params for quantization. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + }, + "on_disk": { + "description": "If true, vectors are served from disk, improving RAM usage at the cost of latency Default: false", + "type": "boolean", + "nullable": true + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot", + "Manhattan" + ] + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build the index.", + "type": "integer", + "format": "uint", + "minimum": 4, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in kilobytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 10, + "nullable": true + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, the index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for additional payload-aware HNSW links. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "QuantizationConfig": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScalarQuantization" + }, + { + "$ref": "#/components/schemas/ProductQuantization" + }, + { + "$ref": "#/components/schemas/BinaryQuantization" + } + ] + }, + "ScalarQuantization": { + "type": "object", + "required": [ + "scalar" + ], + "properties": { + "scalar": { + "$ref": "#/components/schemas/ScalarQuantizationConfig" + } + } + }, + "ScalarQuantizationConfig": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/ScalarType" + }, + "quantile": { + "description": "Quantile for quantization. Expected value range in [0.5, 1.0]. If not set - use the whole range of values", + "type": "number", + "format": "float", + "maximum": 1, + "minimum": 0.5, + "nullable": true + }, + "always_ram": { + "description": "If true - quantized vectors always will be stored in RAM, ignoring the config of main storage", + "type": "boolean", + "nullable": true + } + } + }, + "ScalarType": { + "type": "string", + "enum": [ + "int8" + ] + }, + "ProductQuantization": { + "type": "object", + "required": [ + "product" + ], + "properties": { + "product": { + "$ref": "#/components/schemas/ProductQuantizationConfig" + } + } + }, + "ProductQuantizationConfig": { + "type": "object", + "required": [ + "compression" + ], + "properties": { + "compression": { + "$ref": "#/components/schemas/CompressionRatio" + }, + "always_ram": { + "type": "boolean", + "nullable": true + } + } + }, + "CompressionRatio": { + "type": "string", + "enum": [ + "x4", + "x8", + "x16", + "x32", + "x64" + ] + }, + "BinaryQuantization": { + "type": "object", + "required": [ + "binary" + ], + "properties": { + "binary": { + "$ref": "#/components/schemas/BinaryQuantizationConfig" + } + } + }, + "BinaryQuantizationConfig": { + "type": "object", + "properties": { + "always_ram": { + "type": "boolean", + "nullable": true + } + } + }, + "ShardingMethod": { + "type": "string", + "enum": [ + "auto", + "custom" + ] + }, + "SparseVectorParams": { + "description": "Params of single sparse vector data storage", + "type": "object", + "properties": { + "index": { + "description": "Custom params for index. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/SparseIndexParams" + }, + { + "nullable": true + } + ] + } + } + }, + "SparseIndexParams": { + "description": "Configuration for sparse inverted index.", + "type": "object", + "properties": { + "full_scan_threshold": { + "description": "We prefer a full scan search upto (excluding) this number of vectors.\n\nNote: this is number of vectors, not KiloBytes.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "on_disk": { + "description": "Store index on disk. If set to false, the index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + } + } + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 4 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - auto selection.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for hnsw graph built for payload index. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "max_optimization_threads", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "maximum": 1, + "minimum": 0 + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 100 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads. If `default_segment_number = 0`, will be automatically selected by the number of available CPUs.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexing speed is more important - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.\n\nMemmap storage is disabled by default, to enable it, set this threshold to a reasonable value.\n\nTo disable memmap storage, set this to `0`. Internally it will use the largest threshold possible.\n\nNote: 1Kb = 1 vector of size 256", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing\n\nDefault value is 20,000, based on .\n\nTo disable vector indexing, set to `0`.\n\nNote: 1kB = 1 vector of size 256.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type", + "points" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + }, + "points": { + "description": "Number of points indexed with this index", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text", + "bool" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word", + "multilingual" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ShardKeySelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardKey" + } + } + ] + }, + "ShardKey": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + ] + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "description": "Shard Key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Vector" + } + } + ] + }, + "Vector": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/SparseVector" + } + ] + }, + "SparseVector": { + "description": "Sparse vector structure", + "type": "object", + "required": [ + "indices", + "values" + ], + "properties": { + "indices": { + "description": "indices must be unique", + "type": "array", + "items": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "values": { + "description": "values and indices must be the same length", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unnamed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + }, + { + "$ref": "#/components/schemas/NamedSparseVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "NamedSparseVector": { + "description": "Sparse vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "$ref": "#/components/schemas/SparseVector" + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/IsNullCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/NestedCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "geo_polygon": { + "description": "Check if geo point is within a given polygon", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoPolygon" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + }, + { + "$ref": "#/components/schemas/MatchAny" + }, + { + "$ref": "#/components/schemas/MatchExcept" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "MatchAny": { + "description": "Exact match on any of the given values", + "type": "object", + "required": [ + "any" + ], + "properties": { + "any": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "AnyVariants": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + ] + }, + "MatchExcept": { + "description": "Should have at least one value not matching the any given values", + "type": "object", + "required": [ + "except" + ], + "properties": { + "except": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "GeoPolygon": { + "description": "Geo filter request\n\nMatches coordinates inside the polygon, defined by `exterior` and `interiors`", + "type": "object", + "required": [ + "exterior" + ], + "properties": { + "exterior": { + "$ref": "#/components/schemas/GeoLineString" + }, + "interiors": { + "description": "Interior lines (if present) bound holes within the surface each GeoLineString must consist of a minimum of 4 points, and the first and last points must be the same.", + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoLineString" + }, + "nullable": true + } + } + }, + "GeoLineString": { + "description": "Ordered sequence of GeoPoints representing the line", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoPoint" + } + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "IsNullCondition": { + "description": "Select points with null payload for a specified field", + "type": "object", + "required": [ + "is_null" + ], + "properties": { + "is_null": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "NestedCondition": { + "type": "object", + "required": [ + "nested" + ], + "properties": { + "nested": { + "$ref": "#/components/schemas/Nested" + } + } + }, + "Nested": { + "description": "Select points with payload for a specified nested field", + "type": "object", + "required": [ + "filter", + "key" + ], + "properties": { + "key": { + "type": "string" + }, + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "exact": { + "description": "Search without approximation. If set to true, search may run long but with exact results.", + "default": false, + "type": "boolean" + }, + "quantization": { + "description": "Quantization params", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationSearchParams" + }, + { + "nullable": true + } + ] + }, + "indexed_only": { + "description": "If enabled, the engine will only perform search among indexed or small segments. Using this option prevents slow searches in case of delayed index, but does not guarantee that all uploaded vectors will be included in search results", + "default": false, + "type": "boolean" + } + } + }, + "QuantizationSearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "ignore": { + "description": "If true, quantized vectors are ignored. Default is false.", + "default": false, + "type": "boolean" + }, + "rescore": { + "description": "If true, use original vectors to re-score top-k results. Might require more time in case if original vectors are stored on disk. If not set, qdrant decides automatically apply rescoring or not.", + "default": null, + "type": "boolean", + "nullable": true + }, + "oversampling": { + "description": "Oversampling factor for quantization. Default is 1.0.\n\nDefines how many extra vectors should be pre-selected using quantized index, and then re-scored using original vectors.\n\nFor example, if `oversampling` is 2.4 and `limit` is 100, then 240 vectors will be pre-selected using quantized index, and then top-100 will be returned after re-scoring.", + "default": null, + "type": "number", + "format": "double", + "minimum": 1, + "nullable": true + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "description": "Shard Key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "description": "`Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.", + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which can be ids of points that are already stored in the collection, raw vectors, or even ids and vectors combined.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to the `strategy` chosen.", + "type": "object", + "required": [ + "limit" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "positive": { + "description": "Look for vectors closest to those", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "strategy": { + "description": "How to use positive and negative examples to find the results", + "anyOf": [ + { + "$ref": "#/components/schemas/RecommendStrategy" + }, + { + "nullable": true + } + ] + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "RecommendExample": { + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/SparseVector" + } + ] + }, + "RecommendStrategy": { + "description": "How to use positive and negative examples to find the results, default is `average_vector`:\n\n* `average_vector` - Average positive and negative vectors and create a single query with the formula `query = avg_pos + avg_pos - avg_neg`. Then performs normal search.\n\n* `best_score` - Uses custom search objective. Each candidate is compared against all examples, its score is then chosen from the `max(max_pos_score, max_neg_score)`. If the `max_neg_score` is chosen then it is squared and negated, otherwise it is just the `max_pos_score`.", + "type": "string", + "enum": [ + "average_vector", + "best_score" + ] + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "LookupLocation": { + "description": "Defines a location to use for looking up the vector. Specifies collection and vector field name.", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection used for lookup", + "type": "string" + }, + "vector": { + "description": "Optional name of the vector field within the collection. If not provided, the default vector field will be used.", + "default": null, + "type": "string", + "nullable": true + }, + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "For auto sharding: Number of shards in collection. - Default is 1 for standalone, otherwise equal to the number of nodes - Minimum is 1 For custom sharding: Number of shards in collection per shard group. - Default is 1, meaning that each shard key will be mapped to a single shard - Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "sharding_method": { + "description": "Sharding method Default is Auto - points are distributed across all available shards Custom - points are distributed across shards according to shard key", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/ShardingMethod" + }, + { + "nullable": true + } + ] + }, + "replication_factor": { + "description": "Number of shards replicas. Default is 1 Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "init_from": { + "description": "Specify other collection to copy data from.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/InitFrom" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Quantization parameters. If none - quantization is disabled.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + }, + "sparse_vectors": { + "description": "Sparse vector data config.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorParams" + }, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.\n\nMemmap storage is disabled by default, to enable it, set this threshold to a reasonable value.\n\nTo disable memmap storage, set this to `0`.\n\nNote: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing\n\nDefault value is 20,000, based on .\n\nTo disable vector indexing, set to `0`.\n\nNote: 1kB = 1 vector of size 256.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Maximum available threads for optimization workers", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "InitFrom": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "type": "string" + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "vectors": { + "description": "Map of vector data parameters to update for each named vector. To update parameters in a collection having a single unnamed vector, use an empty string as name.", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorsConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - it is left unchanged. This operation is blocking, it will only proceed once all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Collection base params. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionParamsDiff" + }, + { + "nullable": true + } + ] + }, + "hnsw_config": { + "description": "HNSW parameters to update for the collection index. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Quantization parameters to update. If none - it is left unchanged.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfigDiff" + }, + { + "nullable": true + } + ] + }, + "sparse_vectors": { + "description": "Map of sparse vector data parameters to update for each sparse vector.", + "anyOf": [ + { + "$ref": "#/components/schemas/SparseVectorsConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "VectorsConfigDiff": { + "description": "Vector update params for multiple vectors\n\n{ \"vector_name\": { \"hnsw_config\": { \"m\": 8 } } }", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParamsDiff" + } + }, + "VectorParamsDiff": { + "type": "object", + "properties": { + "hnsw_config": { + "description": "Update params for HNSW index. If empty object - it will be unset.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Update params for quantization. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfigDiff" + }, + { + "nullable": true + } + ] + }, + "on_disk": { + "description": "If true, vectors are served from disk, improving RAM usage at the cost of latency", + "type": "boolean", + "nullable": true + } + } + }, + "QuantizationConfigDiff": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScalarQuantization" + }, + { + "$ref": "#/components/schemas/ProductQuantization" + }, + { + "$ref": "#/components/schemas/BinaryQuantization" + }, + { + "$ref": "#/components/schemas/Disabled" + } + ] + }, + "Disabled": { + "type": "string", + "enum": [ + "Disabled" + ] + }, + "CollectionParamsDiff": { + "type": "object", + "properties": { + "replication_factor": { + "description": "Number of replicas for each shard", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Minimal number successful responses from replicas to consider operation successful", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "read_fan_out_factor": { + "description": "Fan-out every read request to these many additional remote nodes (and return first available response)", + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + } + } + }, + "SparseVectorsConfig": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorParams" + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointInsertOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "PointsBatch": { + "type": "object", + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Vector" + } + } + } + ] + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "SetPayload": { + "description": "This data structure is used in API interface and applied across multiple shards", + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Assigns payload to each point that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "DeletePayload": { + "description": "This data structure is used in API interface and applied across multiple shards", + "type": "object", + "required": [ + "keys" + ], + "properties": { + "keys": { + "description": "List of payload keys to remove from payload", + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "message_send_failures", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + }, + "message_send_failures": { + "description": "Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MessageSendErrors" + } + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "description": "Role of the peer in the consensus", + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "MessageSendErrors": { + "description": "Message send failures for a particular peer", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "latest_error": { + "type": "string", + "nullable": true + } + } + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "shard_key": { + "description": "User-defined sharding key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ReplicaState": { + "description": "State of the single shard within a replica set.", + "type": "string", + "enum": [ + "Active", + "Dead", + "Partial", + "Initializing", + "Listener", + "PartialSnapshot" + ] + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "shard_key": { + "description": "User-defined sharding key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "sync", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sync": { + "description": "If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another", + "type": "boolean" + }, + "method": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardTransferMethod" + }, + { + "nullable": true + } + ] + } + } + }, + "ShardTransferMethod": { + "description": "Methods for transferring a shard from one node to another.", + "oneOf": [ + { + "description": "Stream all shard records in batches until the whole shard is transferred.", + "type": "string", + "enum": [ + "stream_records" + ] + }, + { + "description": "Snapshot the shard, transfer and restore it on the receiver.", + "type": "string", + "enum": [ + "snapshot" + ] + } + ] + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster", + "collections", + "id", + "requests" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "collections": { + "$ref": "#/components/schemas/CollectionsTelemetry" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterTelemetry" + }, + "requests": { + "$ref": "#/components/schemas/RequestsTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "name", + "startup", + "version" + ], + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppFeaturesTelemetry" + }, + { + "nullable": true + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + { + "nullable": true + } + ] + }, + "startup": { + "type": "string", + "format": "date-time" + } + } + }, + "AppFeaturesTelemetry": { + "type": "object", + "required": [ + "debug", + "recovery_mode", + "service_debug_feature", + "web_feature" + ], + "properties": { + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + }, + "recovery_mode": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "CollectionsTelemetry": { + "type": "object", + "required": [ + "number_of_collections" + ], + "properties": { + "number_of_collections": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetryEnum" + }, + "nullable": true + } + } + }, + "CollectionTelemetryEnum": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionTelemetry" + }, + { + "$ref": "#/components/schemas/CollectionsAggregatedTelemetry" + } + ] + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time_ms", + "shards", + "transfers" + ], + "properties": { + "id": { + "type": "string" + }, + "init_time_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplicaSetTelemetry" + } + }, + "transfers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "ReplicaSetTelemetry": { + "type": "object", + "required": [ + "id", + "remote", + "replicate_states" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "local": { + "anyOf": [ + { + "$ref": "#/components/schemas/LocalShardTelemetry" + }, + { + "nullable": true + } + ] + }, + "remote": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardTelemetry" + } + }, + "replicate_states": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ReplicaState" + } + } + } + }, + "LocalShardTelemetry": { + "type": "object", + "required": [ + "optimizations", + "segments" + ], + "properties": { + "variant_name": { + "type": "string", + "nullable": true + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizations": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index_searches" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index_searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorIndexSearchesTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_indexed_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type", + "vector_data" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_indexed_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + }, + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "VectorDataInfo": { + "type": "object", + "required": [ + "num_deleted_vectors", + "num_indexed_vectors", + "num_vectors" + ], + "properties": { + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_indexed_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "SegmentConfig": { + "type": "object", + "required": [ + "payload_storage_type" + ], + "properties": { + "vector_data": { + "default": {}, + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "sparse_vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorDataConfig" + } + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "index", + "size", + "storage_type" + ], + "properties": { + "size": { + "description": "Size/dimensionality of the vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "storage_type": { + "$ref": "#/components/schemas/VectorStorageType" + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "quantization_config": { + "description": "Vector specific quantization config that overrides collection config", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "VectorStorageType": { + "description": "Storage types for vectors", + "oneOf": [ + { + "description": "Storage in memory (RAM)\n\nWill be very fast at the cost of consuming a lot of memory.", + "type": "string", + "enum": [ + "Memory" + ] + }, + { + "description": "Storage in mmap file, not appendable\n\nSearch performance is defined by disk speed and the fraction of vectors that fit in memory.", + "type": "string", + "enum": [ + "Mmap" + ] + }, + { + "description": "Storage in chunked mmap files, appendable\n\nSearch performance is defined by disk speed and the fraction of vectors that fit in memory.", + "type": "string", + "enum": [ + "ChunkedMmap" + ] + } + ] + }, + "Indexes": { + "description": "Vector index configuration", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "SparseVectorDataConfig": { + "description": "Config of single sparse vector data storage", + "type": "object", + "required": [ + "index" + ], + "properties": { + "index": { + "$ref": "#/components/schemas/SparseIndexConfig" + } + } + }, + "SparseIndexConfig": { + "description": "Configuration for sparse inverted index.", + "type": "object", + "required": [ + "index_type" + ], + "properties": { + "full_scan_threshold": { + "description": "We prefer a full scan search upto (excluding) this number of vectors.\n\nNote: this is number of vectors, not KiloBytes.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "index_type": { + "$ref": "#/components/schemas/SparseIndexType" + } + } + }, + "SparseIndexType": { + "description": "Sparse index types", + "oneOf": [ + { + "description": "Mutable RAM sparse index", + "type": "string", + "enum": [ + "MutableRam" + ] + }, + { + "description": "Immutable RAM sparse index", + "type": "string", + "enum": [ + "ImmutableRam" + ] + }, + { + "description": "Mmap sparse index", + "type": "string", + "enum": [ + "Mmap" + ] + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexSearchesTelemetry": { + "type": "object", + "required": [ + "filtered_exact", + "filtered_large_cardinality", + "filtered_plain", + "filtered_small_cardinality", + "filtered_sparse", + "unfiltered_exact", + "unfiltered_hnsw", + "unfiltered_plain", + "unfiltered_sparse" + ], + "properties": { + "index_name": { + "type": "string", + "nullable": true + }, + "unfiltered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_hnsw": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_sparse": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_small_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_large_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_sparse": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "OperationDurationStatistics": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "avg_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "min_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "max_duration_micros": { + "type": "number", + "format": "float", + "nullable": true + }, + "last_responded": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "field_name": { + "type": "string", + "nullable": true + }, + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "type": "object", + "required": [ + "log", + "optimizations", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "optimizations": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "log": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TrackerTelemetry" + } + } + } + }, + "TrackerTelemetry": { + "description": "Tracker object used in telemetry", + "type": "object", + "required": [ + "name", + "segment_ids", + "start_at", + "status" + ], + "properties": { + "name": { + "description": "Name of the optimizer", + "type": "string" + }, + "segment_ids": { + "description": "Segment IDs being optimized", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + }, + "status": { + "$ref": "#/components/schemas/TrackerStatus" + }, + "start_at": { + "description": "Start time of the optimizer", + "type": "string", + "format": "date-time" + }, + "end_at": { + "description": "End time of the optimizer", + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "TrackerStatus": { + "description": "Represents the current state of the optimizer being tracked", + "oneOf": [ + { + "type": "string", + "enum": [ + "optimizing", + "done" + ] + }, + { + "type": "object", + "required": [ + "cancelled" + ], + "properties": { + "cancelled": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "RemoteShardTelemetry": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "searches": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "CollectionsAggregatedTelemetry": { + "type": "object", + "required": [ + "optimizers_status", + "params", + "vectors" + ], + "properties": { + "vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "optimizers_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + } + } + }, + "ClusterTelemetry": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterStatusTelemetry" + }, + { + "nullable": true + } + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatusTelemetry": { + "type": "object", + "required": [ + "commit", + "consensus_thread_status", + "is_voter", + "number_of_peers", + "pending_operations", + "term" + ], + "properties": { + "number_of_peers": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "term": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "role": { + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "type": "boolean" + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "RequestsTelemetry": { + "type": "object", + "required": [ + "grpc", + "rest" + ], + "properties": { + "rest": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc": { + "$ref": "#/components/schemas/GrpcTelemetry" + } + } + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + } + }, + "GrpcTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/ReplicateShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + }, + { + "$ref": "#/components/schemas/DropReplicaOperation" + }, + { + "$ref": "#/components/schemas/CreateShardingKeyOperation" + }, + { + "$ref": "#/components/schemas/DropShardingKeyOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "method": { + "description": "Method for transferring the shard from one node to another", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardTransferMethod" + }, + { + "nullable": true + } + ] + } + } + }, + "ReplicateShardOperation": { + "type": "object", + "required": [ + "replicate_shard" + ], + "properties": { + "replicate_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "DropReplicaOperation": { + "type": "object", + "required": [ + "drop_replica" + ], + "properties": { + "drop_replica": { + "$ref": "#/components/schemas/Replica" + } + } + }, + "Replica": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CreateShardingKeyOperation": { + "type": "object", + "required": [ + "create_sharding_key" + ], + "properties": { + "create_sharding_key": { + "$ref": "#/components/schemas/CreateShardingKey" + } + } + }, + "CreateShardingKey": { + "type": "object", + "required": [ + "shard_key" + ], + "properties": { + "shard_key": { + "$ref": "#/components/schemas/ShardKey" + }, + "shards_number": { + "description": "How many shards to create for this key If not specified, will use the default value from config", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "replication_factor": { + "description": "How many replicas to create for each shard If not specified, will use the default value from config", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "placement": { + "description": "Placement of shards for this key List of peer ids, that can be used to place shards for this key If not specified, will be randomly placed among all peers", + "type": "array", + "items": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "nullable": true + } + } + }, + "DropShardingKeyOperation": { + "type": "object", + "required": [ + "drop_sharding_key" + ], + "properties": { + "drop_sharding_key": { + "$ref": "#/components/schemas/DropShardingKey" + } + } + }, + "DropShardingKey": { + "type": "object", + "required": [ + "shard_key" + ], + "properties": { + "shard_key": { + "$ref": "#/components/schemas/ShardKey" + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "LocksOption": { + "type": "object", + "required": [ + "write" + ], + "properties": { + "error_message": { + "type": "string", + "nullable": true + }, + "write": { + "type": "boolean" + } + } + }, + "SnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "description": "Examples: - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot` - Local path `file:///qdrant/snapshots/test_collection-2022-08-04-10-49-10.snapshot`", + "type": "string", + "format": "uri" + }, + "priority": { + "description": "Defines which data should be used as a source of truth if there are other replicas in the cluster. If set to `Snapshot`, the snapshot will be used as a source of truth, and the current state will be overwritten. If set to `Replica`, the current state will be used as a source of truth, and after recovery if will be synchronized with the snapshot.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/SnapshotPriority" + }, + { + "nullable": true + } + ] + } + } + }, + "SnapshotPriority": { + "description": "Defines source of truth for snapshot recovery: `NoSync` means - restore snapshot without *any* additional synchronization. `Snapshot` means - prefer snapshot data over the current state. `Replica` means - prefer existing data over the snapshot.", + "type": "string", + "enum": [ + "no_sync", + "snapshot", + "replica" + ] + }, + "CollectionsAliasesResponse": { + "type": "object", + "required": [ + "aliases" + ], + "properties": { + "aliases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasDescription" + } + } + } + }, + "AliasDescription": { + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "alias_name": { + "type": "string" + }, + "collection_name": { + "type": "string" + } + } + }, + "WriteOrdering": { + "description": "Defines write ordering guarantees for collection operations\n\n* `weak` - write operations may be reordered, works faster, default\n\n* `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change\n\n* `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down", + "type": "string", + "enum": [ + "weak", + "medium", + "strong" + ] + }, + "ReadConsistency": { + "description": "Read consistency parameter\n\nDefines how many replicas should be queried to get the result\n\n* `N` - send N random request and return points, which present on all of them\n\n* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of them\n\n* `all` - send requests to all nodes and return points which present on all of them\n\nDefault value is `Factor(1)`", + "anyOf": [ + { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + { + "$ref": "#/components/schemas/ReadConsistencyType" + } + ] + }, + "ReadConsistencyType": { + "description": "* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of nodes\n\n* `all` - send requests to all nodes and return points which present on all nodes", + "type": "string", + "enum": [ + "majority", + "quorum", + "all" + ] + }, + "UpdateVectors": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "Points with named vectors", + "type": "array", + "items": { + "$ref": "#/components/schemas/PointVectors" + }, + "minItems": 1 + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointVectors": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + } + } + }, + "DeleteVectors": { + "type": "object", + "required": [ + "vector" + ], + "properties": { + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector names", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointGroup": { + "type": "object", + "required": [ + "hits", + "id" + ], + "properties": { + "hits": { + "description": "Scored points that have the same value of the group_by key", + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + }, + "id": { + "$ref": "#/components/schemas/GroupId" + }, + "lookup": { + "description": "Record that has been looked up using the group id", + "anyOf": [ + { + "$ref": "#/components/schemas/Record" + }, + { + "nullable": true + } + ] + } + } + }, + "GroupId": { + "description": "Value of the group_by key, shared across all the hits in the group", + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "integer", + "format": "int64" + } + ] + }, + "SearchGroupsRequest": { + "type": "object", + "required": [ + "group_by", + "group_size", + "limit", + "vector" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "group_by": { + "description": "Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.", + "type": "string", + "minLength": 1 + }, + "group_size": { + "description": "Maximum amount of points to return per group", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "limit": { + "description": "Maximum amount of groups to return", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "with_lookup": { + "description": "Look for points in another collection using the group ids", + "anyOf": [ + { + "$ref": "#/components/schemas/WithLookupInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "WithLookupInterface": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/WithLookup" + } + ] + }, + "WithLookup": { + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection to use for points lookup", + "type": "string" + }, + "with_payload": { + "description": "Options for specifying which payload to include (or not)", + "default": true, + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vectors": { + "description": "Options for specifying which vectors to include (or not)", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + } + } + }, + "RecommendGroupsRequest": { + "type": "object", + "required": [ + "group_by", + "group_size", + "limit" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "positive": { + "description": "Look for vectors closest to those", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "strategy": { + "description": "How to use positive and negative examples to find the results", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/RecommendStrategy" + }, + { + "nullable": true + } + ] + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + }, + "group_by": { + "description": "Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.", + "type": "string", + "minLength": 1 + }, + "group_size": { + "description": "Maximum amount of points to return per group", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "limit": { + "description": "Maximum amount of groups to return", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "with_lookup": { + "description": "Look for points in another collection using the group ids", + "anyOf": [ + { + "$ref": "#/components/schemas/WithLookupInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "GroupsResult": { + "type": "object", + "required": [ + "groups" + ], + "properties": { + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointGroup" + } + } + } + }, + "UpdateOperations": { + "type": "object", + "required": [ + "operations" + ], + "properties": { + "operations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateOperation" + } + } + } + }, + "UpdateOperation": { + "anyOf": [ + { + "$ref": "#/components/schemas/UpsertOperation" + }, + { + "$ref": "#/components/schemas/DeleteOperation" + }, + { + "$ref": "#/components/schemas/SetPayloadOperation" + }, + { + "$ref": "#/components/schemas/OverwritePayloadOperation" + }, + { + "$ref": "#/components/schemas/DeletePayloadOperation" + }, + { + "$ref": "#/components/schemas/ClearPayloadOperation" + }, + { + "$ref": "#/components/schemas/UpdateVectorsOperation" + }, + { + "$ref": "#/components/schemas/DeleteVectorsOperation" + } + ] + }, + "UpsertOperation": { + "type": "object", + "required": [ + "upsert" + ], + "properties": { + "upsert": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + }, + "DeleteOperation": { + "type": "object", + "required": [ + "delete" + ], + "properties": { + "delete": { + "$ref": "#/components/schemas/PointsSelector" + } + } + }, + "SetPayloadOperation": { + "type": "object", + "required": [ + "set_payload" + ], + "properties": { + "set_payload": { + "$ref": "#/components/schemas/SetPayload" + } + } + }, + "OverwritePayloadOperation": { + "type": "object", + "required": [ + "overwrite_payload" + ], + "properties": { + "overwrite_payload": { + "$ref": "#/components/schemas/SetPayload" + } + } + }, + "DeletePayloadOperation": { + "type": "object", + "required": [ + "delete_payload" + ], + "properties": { + "delete_payload": { + "$ref": "#/components/schemas/DeletePayload" + } + } + }, + "ClearPayloadOperation": { + "type": "object", + "required": [ + "clear_payload" + ], + "properties": { + "clear_payload": { + "$ref": "#/components/schemas/PointsSelector" + } + } + }, + "UpdateVectorsOperation": { + "type": "object", + "required": [ + "update_vectors" + ], + "properties": { + "update_vectors": { + "$ref": "#/components/schemas/UpdateVectors" + } + } + }, + "DeleteVectorsOperation": { + "type": "object", + "required": [ + "delete_vectors" + ], + "properties": { + "delete_vectors": { + "$ref": "#/components/schemas/DeleteVectors" + } + } + }, + "ShardSnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "$ref": "#/components/schemas/ShardSnapshotLocation" + }, + "priority": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/SnapshotPriority" + }, + { + "nullable": true + } + ] + } + } + }, + "ShardSnapshotLocation": { + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "string" + } + ] + }, + "DiscoverRequest": { + "description": "Use context and a target to find the most similar points, constrained by the context.", + "type": "object", + "required": [ + "limit" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "target": { + "description": "Look for vectors closest to this.\n\nWhen using the target (with or without context), the integer part of the score represents the rank with respect to the context, while the decimal part of the score relates to the distance to the target.", + "anyOf": [ + { + "$ref": "#/components/schemas/RecommendExample" + }, + { + "nullable": true + } + ] + }, + "context": { + "description": "Pairs of { positive, negative } examples to constrain the search.\n\nWhen using only the context (without a target), a special search - called context search - is performed where pairs of points are used to generate a loss that guides the search towards the zone where most positive examples overlap. This means that the score minimizes the scenario of finding a point closer to a negative than to a positive part of a pair.\n\nSince the score of a context relates to loss, the maximum score a point can get is 0.0, and it becomes normal that many points can have a score of 0.0.\n\nFor discovery search (when including a target), the context part of the score for each pair is calculated +1 if the point is closer to a positive than to a negative part of a pair, and -1 otherwise.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ContextExamplePair" + }, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "ContextExamplePair": { + "type": "object", + "required": [ + "negative", + "positive" + ], + "properties": { + "positive": { + "$ref": "#/components/schemas/RecommendExample" + }, + "negative": { + "$ref": "#/components/schemas/RecommendExample" + } + } + }, + "DiscoverRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DiscoverRequest" + } + } + } + } + } + } +} diff --git a/docs/redoc/v1.8.x/openapi.json b/docs/redoc/v1.8.x/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..c44f33d74a5981663c95ade1e9e6ec00656d1d42 --- /dev/null +++ b/docs/redoc/v1.8.x/openapi.json @@ -0,0 +1,10931 @@ +{ + "paths": { + "/collections/{collection_name}/shards": { + "put": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Create shard key", + "operationId": "create_shard_key", + "requestBody": { + "description": "Shard key configuration", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateShardingKey" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to create shards for", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/delete": { + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Delete shard key", + "operationId": "delete_shard_key", + "requestBody": { + "description": "Select shard key to delete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DropShardingKey" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to create shards for", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/": { + "get": { + "summary": "Returns information about the running Qdrant instance", + "description": "Returns information about the running Qdrant instance like version and commit id", + "operationId": "root", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/VersionInfo" + } + } + } + } + } + } + } + } + }, + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + }, + "/metrics": { + "get": { + "summary": "Collect Prometheus metrics data", + "description": "Collect metrics data including app info, collections info, cluster info and statistics", + "operationId": "metrics", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Metrics data in Prometheus format", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "# HELP app_info information about qdrant server\n# TYPE app_info counter\napp_info{name=\"qdrant\",version=\"0.11.1\"} 1\n# HELP cluster_enabled is cluster support enabled\n# TYPE cluster_enabled gauge\ncluster_enabled 0\n# HELP collections_total number of collections\n# TYPE collections_total gauge\ncollections_total 1\n" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/locks": { + "post": { + "summary": "Set lock options", + "description": "Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options", + "operationId": "post_locks", + "tags": [ + "service" + ], + "requestBody": { + "description": "Lock options and optional error message", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + }, + "get": { + "summary": "Get lock options", + "description": "Get lock options. If write is locked, all write operations and collection creation are forbidden", + "operationId": "get_locks", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + } + }, + "/healthz": { + "get": { + "summary": "Kubernetes healthz endpoint", + "description": "An endpoint for health checking used in Kubernetes.", + "operationId": "healthz", + "tags": [ + "service" + ], + "responses": { + "200": { + "description": "Healthz response", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "healthz check passed" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/livez": { + "get": { + "summary": "Kubernetes livez endpoint", + "description": "An endpoint for health checking used in Kubernetes.", + "operationId": "livez", + "tags": [ + "service" + ], + "responses": { + "200": { + "description": "Healthz response", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "healthz check passed" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/readyz": { + "get": { + "summary": "Kubernetes readyz endpoint", + "description": "An endpoint for health checking used in Kubernetes.", + "operationId": "readyz", + "tags": [ + "service" + ], + "responses": { + "200": { + "description": "Healthz response", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "healthz check passed" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/recover": { + "post": { + "tags": [ + "cluster" + ], + "summary": "Tries to recover current peer Raft state.", + "operationId": "recover_current_peer", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "force", + "in": "query", + "description": "If true - removes peer even if it has shards/replicas on it.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/exists": { + "get": { + "tags": [ + "collections" + ], + "summary": "Check the existence of a collection", + "description": "Returns \"true\" if the given collection name exists, and \"false\" otherwise", + "operationId": "collection_exists", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/CollectionExistence" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List aliases for collection", + "description": "Get list of all aliases for a collection", + "operationId": "get_collection_aliases", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections aliases", + "description": "Get list of all existing collections aliases", + "operationId": "get_collections_aliases", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/upload": { + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from an uploaded snapshot", + "description": "Recover local collection data from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_uploaded_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "priority", + "in": "query", + "description": "Defines source of truth for snapshot recovery", + "required": false, + "schema": { + "$ref": "#/components/schemas/SnapshotPriority" + } + }, + { + "name": "checksum", + "in": "query", + "description": "Optional SHA256 checksum to verify snapshot integrity before recovery.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "snapshot": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Delete collection snapshot", + "description": "Delete snapshot for a collection", + "operationId": "delete_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "parameters": [ + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots" + ], + "summary": "Delete storage snapshot", + "description": "Delete snapshot of the whole storage", + "operationId": "delete_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the full snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots/upload": { + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover shard from an uploaded snapshot", + "description": "Recover shard of a local collection from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection shard.", + "operationId": "recover_shard_from_uploaded_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard to recover", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "priority", + "in": "query", + "description": "Defines source of truth for snapshot recovery", + "required": false, + "schema": { + "$ref": "#/components/schemas/SnapshotPriority" + } + }, + { + "name": "checksum", + "in": "query", + "description": "Optional SHA256 checksum to verify snapshot integrity before recovery.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "snapshot": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover shard of a local collection data from a snapshot. This will overwrite any data, stored in this shard, for the collection.", + "operationId": "recover_shard_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard to recover", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShardSnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List shards snapshots for a collection", + "description": "Get list of snapshots for a shard of a collection", + "operationId": "list_shard_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create shard snapshot", + "description": "Create new snapshot of a shard for a collection", + "operationId": "create_shard_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Delete shard snapshot", + "description": "Delete snapshot of a shard for a collection", + "operationId": "delete_shard_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot of a shard from a collection as a file", + "operationId": "get_shard_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/vectors": { + "put": { + "tags": [ + "points" + ], + "summary": "Update vectors", + "description": "Update specified named vectors on points, keep unspecified vectors intact.", + "operationId": "update_vectors", + "requestBody": { + "description": "Update named vectors on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateVectors" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/vectors/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete vectors", + "description": "Delete named vectors from the given points.", + "operationId": "delete_vectors", + "requestBody": { + "description": "Delete named vectors from points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteVectors" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload values for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Overwrite payload", + "description": "Replace full payload of points with new one", + "operationId": "overwrite_payload", + "requestBody": { + "description": "Payload and points selector", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Batch update points", + "description": "Apply a series of update operations for points, vectors and payloads", + "operationId": "batch_update", + "requestBody": { + "description": "update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to apply operations on", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/groups": { + "post": { + "tags": [ + "points" + ], + "summary": "Search point groups", + "description": "Retrieve closest points based on vector similarity and given filtering conditions, grouped by a given payload field", + "operationId": "search_point_groups", + "requestBody": { + "description": "Search request with optional filtering, grouped by a given payload field", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchGroupsRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/GroupsResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/groups": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend point groups", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples, grouped by a given payload field.", + "operationId": "recommend_point_groups", + "requestBody": { + "description": "Request points based on positive and negative examples, grouped by a payload field.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendGroupsRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/GroupsResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/discover": { + "post": { + "tags": [ + "points" + ], + "summary": "Discover points", + "description": "Use context and a target to find the most similar points to the target, constrained by the context.\nWhen using only the context (without a target), a special search - called context search - is performed where pairs of points are used to generate a loss that guides the search towards the zone where most positive examples overlap. This means that the score minimizes the scenario of finding a point closer to a negative than to a positive part of a pair.\nSince the score of a context relates to loss, the maximum score a point can get is 0.0, and it becomes normal that many points can have a score of 0.0.\nWhen using target (with or without context), the score behaves a little different: The integer part of the score represents the rank with respect to the context, while the decimal part of the score relates to the distance to the target. The context part of the score for each pair is calculated +1 if the point is closer to a positive than to a negative part of a pair, and -1 otherwise.\n", + "operationId": "discover_points", + "requestBody": { + "description": "Request points based on {positive, negative} pairs of examples, and/or a target", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DiscoverRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/discover/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Discover batch points", + "description": "Look for points based on target and/or positive and negative example pairs, in batch.", + "operationId": "discover_batch_points", + "requestBody": { + "description": "Batch request points based on { positive, negative } pairs of examples, and/or a target.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DiscoverRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [ + { + "api-key": [] + }, + { + "bearerAuth": [] + }, + {} + ], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `min_should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v1.8.x" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup." + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots." + }, + { + "name": "service", + "description": "Qdrant service utilities." + }, + { + "name": "beta", + "description": "Beta features, do not depend on these yet." + } + ], + "components": { + "securitySchemes": { + "api-key": { + "type": "apiKey", + "in": "header", + "name": "api-key", + "description": "Authorization key, either read-write or read-only" + }, + "bearerAuth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "optimizer_status", + "payload_schema", + "segments_count", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "Approximate number of vectors in collection. All vectors in collection are available for querying. Calculated as `points_count x vectors_per_point`. Where `vectors_per_point` is a number of named vectors in schema.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexed_vectors_count": { + "description": "Approximate number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in a specialized vector index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "points_count": { + "description": "Approximate number of points (vectors + payloads) in collection. Each point could be accessed by unique id.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "segments_count": { + "description": "Number of segments in collection. Each segment has independent vector as payload indexes", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection. `Green` - all good. `Yellow` - optimization is running, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + }, + "quantization_config": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParams": { + "type": "object", + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "sharding_method": { + "description": "Sharding method Default is Auto - points are distributed across all available shards Custom - points are distributed across shards according to shard key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardingMethod" + }, + { + "nullable": true + } + ] + }, + "replication_factor": { + "description": "Number of replicas for each shard", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "read_fan_out_factor": { + "description": "Defines how many additional replicas should be processing read request at the same time. Default value is Auto, which means that fan-out will be determined automatically based on the busyness of the local replica. Having more than 0 might be useful to smooth latency spikes of individual nodes.", + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + }, + "sparse_vectors": { + "description": "Configuration of the sparse vector storage", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorParams" + }, + "nullable": true + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Custom params for quantization. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + }, + "on_disk": { + "description": "If true, vectors are served from disk, improving RAM usage at the cost of latency Default: false", + "type": "boolean", + "nullable": true + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot", + "Manhattan" + ] + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build the index.", + "type": "integer", + "format": "uint", + "minimum": 4, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in kilobytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 10, + "nullable": true + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - automatically select from 8 to 16. Best to keep between 8 and 16 to prevent likelihood of building broken/inefficient HNSW graphs. On small CPUs, less threads are used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, the index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for additional payload-aware HNSW links. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "QuantizationConfig": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScalarQuantization" + }, + { + "$ref": "#/components/schemas/ProductQuantization" + }, + { + "$ref": "#/components/schemas/BinaryQuantization" + } + ] + }, + "ScalarQuantization": { + "type": "object", + "required": [ + "scalar" + ], + "properties": { + "scalar": { + "$ref": "#/components/schemas/ScalarQuantizationConfig" + } + } + }, + "ScalarQuantizationConfig": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/ScalarType" + }, + "quantile": { + "description": "Quantile for quantization. Expected value range in [0.5, 1.0]. If not set - use the whole range of values", + "type": "number", + "format": "float", + "maximum": 1, + "minimum": 0.5, + "nullable": true + }, + "always_ram": { + "description": "If true - quantized vectors always will be stored in RAM, ignoring the config of main storage", + "type": "boolean", + "nullable": true + } + } + }, + "ScalarType": { + "type": "string", + "enum": [ + "int8" + ] + }, + "ProductQuantization": { + "type": "object", + "required": [ + "product" + ], + "properties": { + "product": { + "$ref": "#/components/schemas/ProductQuantizationConfig" + } + } + }, + "ProductQuantizationConfig": { + "type": "object", + "required": [ + "compression" + ], + "properties": { + "compression": { + "$ref": "#/components/schemas/CompressionRatio" + }, + "always_ram": { + "type": "boolean", + "nullable": true + } + } + }, + "CompressionRatio": { + "type": "string", + "enum": [ + "x4", + "x8", + "x16", + "x32", + "x64" + ] + }, + "BinaryQuantization": { + "type": "object", + "required": [ + "binary" + ], + "properties": { + "binary": { + "$ref": "#/components/schemas/BinaryQuantizationConfig" + } + } + }, + "BinaryQuantizationConfig": { + "type": "object", + "properties": { + "always_ram": { + "type": "boolean", + "nullable": true + } + } + }, + "ShardingMethod": { + "type": "string", + "enum": [ + "auto", + "custom" + ] + }, + "SparseVectorParams": { + "description": "Params of single sparse vector data storage", + "type": "object", + "properties": { + "index": { + "description": "Custom params for index. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/SparseIndexParams" + }, + { + "nullable": true + } + ] + } + } + }, + "SparseIndexParams": { + "description": "Configuration for sparse inverted index.", + "type": "object", + "properties": { + "full_scan_threshold": { + "description": "We prefer a full scan search upto (excluding) this number of vectors.\n\nNote: this is number of vectors, not KiloBytes.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "on_disk": { + "description": "Store index on disk. If set to false, the index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + } + } + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 4 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - automatically select from 8 to 16. Best to keep between 8 and 16 to prevent likelihood of slow building or broken/inefficient HNSW graphs. On small CPUs, less threads are used.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for hnsw graph built for payload index. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "maximum": 1, + "minimum": 0 + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 100 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads. If `default_segment_number = 0`, will be automatically selected by the number of available CPUs.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexing speed is more important - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.\n\nMemmap storage is disabled by default, to enable it, set this threshold to a reasonable value.\n\nTo disable memmap storage, set this to `0`. Internally it will use the largest threshold possible.\n\nNote: 1Kb = 1 vector of size 256", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing\n\nDefault value is 20,000, based on .\n\nTo disable vector indexing, set to `0`.\n\nNote: 1kB = 1 vector of size 256.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Max number of threads (jobs) for running optimizations per shard. Note: each optimization job will also use `max_indexing_threads` threads by itself for index building. If null - have no limit and choose dynamically to saturate CPU. If 0 - no optimization threads, optimizations will be disabled.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type", + "points" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + }, + "points": { + "description": "Number of points indexed with this index", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text", + "bool", + "datetime" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + }, + { + "$ref": "#/components/schemas/IntegerIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word", + "multilingual" + ] + }, + "IntegerIndexParams": { + "type": "object", + "required": [ + "lookup", + "range", + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/IntegerIndexType" + }, + "lookup": { + "description": "If true - support direct lookups.", + "type": "boolean" + }, + "range": { + "description": "If true - support ranges filters.", + "type": "boolean" + } + } + }, + "IntegerIndexType": { + "type": "string", + "enum": [ + "integer" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ShardKeySelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardKey" + } + } + ] + }, + "ShardKey": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + ] + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "description": "Shard Key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Vector" + } + } + ] + }, + "Vector": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/SparseVector" + } + ] + }, + "SparseVector": { + "description": "Sparse vector structure", + "type": "object", + "required": [ + "indices", + "values" + ], + "properties": { + "indices": { + "description": "indices must be unique", + "type": "array", + "items": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "values": { + "description": "values and indices must be the same length", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unnamed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + }, + { + "$ref": "#/components/schemas/NamedSparseVector" + } + ] + }, + "NamedVector": { + "description": "Vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "NamedSparseVector": { + "description": "Sparse vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "$ref": "#/components/schemas/SparseVector" + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "min_should": { + "description": "At least minimum amount of given conditions should match", + "anyOf": [ + { + "$ref": "#/components/schemas/MinShould" + }, + { + "nullable": true + } + ] + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/IsNullCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/NestedCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/RangeInterface" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "geo_polygon": { + "description": "Check if geo point is within a given polygon", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoPolygon" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + }, + { + "$ref": "#/components/schemas/MatchAny" + }, + { + "$ref": "#/components/schemas/MatchExcept" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "MatchAny": { + "description": "Exact match on any of the given values", + "type": "object", + "required": [ + "any" + ], + "properties": { + "any": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "AnyVariants": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "uniqueItems": true + } + ] + }, + "MatchExcept": { + "description": "Should have at least one value not matching the any given values", + "type": "object", + "required": [ + "except" + ], + "properties": { + "except": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "RangeInterface": { + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "$ref": "#/components/schemas/DatetimeRange" + } + ] + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "DatetimeRange": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "string", + "format": "date-time", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "string", + "format": "date-time", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "string", + "format": "date-time", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "GeoPolygon": { + "description": "Geo filter request\n\nMatches coordinates inside the polygon, defined by `exterior` and `interiors`", + "type": "object", + "required": [ + "exterior" + ], + "properties": { + "exterior": { + "$ref": "#/components/schemas/GeoLineString" + }, + "interiors": { + "description": "Interior lines (if present) bound holes within the surface each GeoLineString must consist of a minimum of 4 points, and the first and last points must be the same.", + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoLineString" + }, + "nullable": true + } + } + }, + "GeoLineString": { + "description": "Ordered sequence of GeoPoints representing the line", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoPoint" + } + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "IsNullCondition": { + "description": "Select points with null payload for a specified field", + "type": "object", + "required": [ + "is_null" + ], + "properties": { + "is_null": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "NestedCondition": { + "type": "object", + "required": [ + "nested" + ], + "properties": { + "nested": { + "$ref": "#/components/schemas/Nested" + } + } + }, + "Nested": { + "description": "Select points with payload for a specified nested field", + "type": "object", + "required": [ + "filter", + "key" + ], + "properties": { + "key": { + "type": "string" + }, + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "MinShould": { + "type": "object", + "required": [ + "conditions", + "min_count" + ], + "properties": { + "conditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + } + }, + "min_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "exact": { + "description": "Search without approximation. If set to true, search may run long but with exact results.", + "default": false, + "type": "boolean" + }, + "quantization": { + "description": "Quantization params", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationSearchParams" + }, + { + "nullable": true + } + ] + }, + "indexed_only": { + "description": "If enabled, the engine will only perform search among indexed or small segments. Using this option prevents slow searches in case of delayed index, but does not guarantee that all uploaded vectors will be included in search results", + "default": false, + "type": "boolean" + } + } + }, + "QuantizationSearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "ignore": { + "description": "If true, quantized vectors are ignored. Default is false.", + "default": false, + "type": "boolean" + }, + "rescore": { + "description": "If true, use original vectors to re-score top-k results. Might require more time in case if original vectors are stored on disk. If not set, qdrant decides automatically apply rescoring or not.", + "default": null, + "type": "boolean", + "nullable": true + }, + "oversampling": { + "description": "Oversampling factor for quantization. Default is 1.0.\n\nDefines how many extra vectors should be pre-selected using quantized index, and then re-scored using original vectors.\n\nFor example, if `oversampling` is 2.4 and `limit` is 100, then 240 vectors will be pre-selected using quantized index, and then top-100 will be returned after re-scoring.", + "default": null, + "type": "number", + "format": "double", + "minimum": 1, + "nullable": true + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "description": "Shard Key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "description": "`Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.", + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which can be ids of points that are already stored in the collection, raw vectors, or even ids and vectors combined.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to the `strategy` chosen.", + "type": "object", + "required": [ + "limit" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "positive": { + "description": "Look for vectors closest to those", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "strategy": { + "description": "How to use positive and negative examples to find the results", + "anyOf": [ + { + "$ref": "#/components/schemas/RecommendStrategy" + }, + { + "nullable": true + } + ] + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "RecommendExample": { + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/SparseVector" + } + ] + }, + "RecommendStrategy": { + "description": "How to use positive and negative examples to find the results, default is `average_vector`:\n\n* `average_vector` - Average positive and negative vectors and create a single query with the formula `query = avg_pos + avg_pos - avg_neg`. Then performs normal search.\n\n* `best_score` - Uses custom search objective. Each candidate is compared against all examples, its score is then chosen from the `max(max_pos_score, max_neg_score)`. If the `max_neg_score` is chosen then it is squared and negated, otherwise it is just the `max_pos_score`.", + "type": "string", + "enum": [ + "average_vector", + "best_score" + ] + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "LookupLocation": { + "description": "Defines a location to use for looking up the vector. Specifies collection and vector field name.", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection used for lookup", + "type": "string" + }, + "vector": { + "description": "Optional name of the vector field within the collection. If not provided, the default vector field will be used.", + "default": null, + "type": "string", + "nullable": true + }, + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + }, + "order_by": { + "description": "Order the records by a payload field.", + "anyOf": [ + { + "$ref": "#/components/schemas/OrderByInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "OrderByInterface": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/OrderBy" + } + ] + }, + "OrderBy": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key to order by", + "type": "string" + }, + "direction": { + "description": "Direction of ordering: `asc` or `desc`. Default is ascending.", + "anyOf": [ + { + "$ref": "#/components/schemas/Direction" + }, + { + "nullable": true + } + ] + }, + "start_from": { + "description": "Which payload value to start scrolling from. Default is the lowest value for `asc` and the highest for `desc`", + "anyOf": [ + { + "$ref": "#/components/schemas/StartFrom" + }, + { + "nullable": true + } + ] + } + } + }, + "Direction": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "StartFrom": { + "anyOf": [ + { + "type": "integer", + "format": "int64" + }, + { + "type": "number", + "format": "double" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "For auto sharding: Number of shards in collection. - Default is 1 for standalone, otherwise equal to the number of nodes - Minimum is 1 For custom sharding: Number of shards in collection per shard group. - Default is 1, meaning that each shard key will be mapped to a single shard - Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "sharding_method": { + "description": "Sharding method Default is Auto - points are distributed across all available shards Custom - points are distributed across shards according to shard key", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/ShardingMethod" + }, + { + "nullable": true + } + ] + }, + "replication_factor": { + "description": "Number of shards replicas. Default is 1 Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "init_from": { + "description": "Specify other collection to copy data from.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/InitFrom" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Quantization parameters. If none - quantization is disabled.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + }, + "sparse_vectors": { + "description": "Sparse vector data config.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorParams" + }, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.\n\nMemmap storage is disabled by default, to enable it, set this threshold to a reasonable value.\n\nTo disable memmap storage, set this to `0`.\n\nNote: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing\n\nDefault value is 20,000, based on .\n\nTo disable vector indexing, set to `0`.\n\nNote: 1kB = 1 vector of size 256.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Max number of threads (jobs) for running optimizations per shard. Note: each optimization job will also use `max_indexing_threads` threads by itself for index building. If null - have no limit and choose dynamically to saturate CPU. If 0 - no optimization threads, optimizations will be disabled.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "InitFrom": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "type": "string" + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "vectors": { + "description": "Map of vector data parameters to update for each named vector. To update parameters in a collection having a single unnamed vector, use an empty string as name.", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorsConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - it is left unchanged. This operation is blocking, it will only proceed once all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Collection base params. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionParamsDiff" + }, + { + "nullable": true + } + ] + }, + "hnsw_config": { + "description": "HNSW parameters to update for the collection index. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Quantization parameters to update. If none - it is left unchanged.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfigDiff" + }, + { + "nullable": true + } + ] + }, + "sparse_vectors": { + "description": "Map of sparse vector data parameters to update for each sparse vector.", + "anyOf": [ + { + "$ref": "#/components/schemas/SparseVectorsConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "VectorsConfigDiff": { + "description": "Vector update params for multiple vectors\n\n{ \"vector_name\": { \"hnsw_config\": { \"m\": 8 } } }", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParamsDiff" + } + }, + "VectorParamsDiff": { + "type": "object", + "properties": { + "hnsw_config": { + "description": "Update params for HNSW index. If empty object - it will be unset.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Update params for quantization. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfigDiff" + }, + { + "nullable": true + } + ] + }, + "on_disk": { + "description": "If true, vectors are served from disk, improving RAM usage at the cost of latency", + "type": "boolean", + "nullable": true + } + } + }, + "QuantizationConfigDiff": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScalarQuantization" + }, + { + "$ref": "#/components/schemas/ProductQuantization" + }, + { + "$ref": "#/components/schemas/BinaryQuantization" + }, + { + "$ref": "#/components/schemas/Disabled" + } + ] + }, + "Disabled": { + "type": "string", + "enum": [ + "Disabled" + ] + }, + "CollectionParamsDiff": { + "type": "object", + "properties": { + "replication_factor": { + "description": "Number of replicas for each shard", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Minimal number successful responses from replicas to consider operation successful", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "read_fan_out_factor": { + "description": "Fan-out every read request to these many additional remote nodes (and return first available response)", + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + } + } + }, + "SparseVectorsConfig": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorParams" + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointInsertOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "PointsBatch": { + "type": "object", + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Vector" + } + } + } + ] + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "SetPayload": { + "description": "This data structure is used in API interface and applied across multiple shards", + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Assigns payload to each point that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "key": { + "description": "Assigns payload to each point that satisfy this path of property", + "type": "string", + "nullable": true + } + } + }, + "DeletePayload": { + "description": "This data structure is used in API interface and applied across multiple shards", + "type": "object", + "required": [ + "keys" + ], + "properties": { + "keys": { + "description": "List of payload keys to remove from payload", + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "message_send_failures", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + }, + "message_send_failures": { + "description": "Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MessageSendErrors" + } + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "description": "Role of the peer in the consensus", + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "MessageSendErrors": { + "description": "Message send failures for a particular peer", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "latest_error": { + "type": "string", + "nullable": true + }, + "latest_error_timestamp": { + "description": "Timestamp of the latest error", + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "checksum": { + "type": "string", + "nullable": true + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "shard_key": { + "description": "User-defined sharding key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ReplicaState": { + "description": "State of the single shard within a replica set.", + "type": "string", + "enum": [ + "Active", + "Dead", + "Partial", + "Initializing", + "Listener", + "PartialSnapshot", + "Recovery" + ] + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "shard_key": { + "description": "User-defined sharding key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "sync", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "description": "Source peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "description": "Destination peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sync": { + "description": "If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another", + "type": "boolean" + }, + "method": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardTransferMethod" + }, + { + "nullable": true + } + ] + }, + "comment": { + "description": "A human-readable report of the transfer progress. Available only on the source peer.", + "type": "string", + "nullable": true + } + } + }, + "ShardTransferMethod": { + "description": "Methods for transferring a shard from one node to another.", + "oneOf": [ + { + "description": "Stream all shard records in batches until the whole shard is transferred.", + "type": "string", + "enum": [ + "stream_records" + ] + }, + { + "description": "Snapshot the shard, transfer and restore it on the receiver.", + "type": "string", + "enum": [ + "snapshot" + ] + } + ] + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster", + "collections", + "id", + "requests" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "collections": { + "$ref": "#/components/schemas/CollectionsTelemetry" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterTelemetry" + }, + "requests": { + "$ref": "#/components/schemas/RequestsTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "name", + "startup", + "version" + ], + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppFeaturesTelemetry" + }, + { + "nullable": true + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + { + "nullable": true + } + ] + }, + "startup": { + "type": "string", + "format": "date-time" + } + } + }, + "AppFeaturesTelemetry": { + "type": "object", + "required": [ + "debug", + "recovery_mode", + "service_debug_feature", + "web_feature" + ], + "properties": { + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + }, + "recovery_mode": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "CollectionsTelemetry": { + "type": "object", + "required": [ + "number_of_collections" + ], + "properties": { + "number_of_collections": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetryEnum" + }, + "nullable": true + } + } + }, + "CollectionTelemetryEnum": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionTelemetry" + }, + { + "$ref": "#/components/schemas/CollectionsAggregatedTelemetry" + } + ] + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time_ms", + "shards", + "transfers" + ], + "properties": { + "id": { + "type": "string" + }, + "init_time_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplicaSetTelemetry" + } + }, + "transfers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "ReplicaSetTelemetry": { + "type": "object", + "required": [ + "id", + "remote", + "replicate_states" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "local": { + "anyOf": [ + { + "$ref": "#/components/schemas/LocalShardTelemetry" + }, + { + "nullable": true + } + ] + }, + "remote": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardTelemetry" + } + }, + "replicate_states": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ReplicaState" + } + } + } + }, + "LocalShardTelemetry": { + "type": "object", + "required": [ + "optimizations", + "segments" + ], + "properties": { + "variant_name": { + "type": "string", + "nullable": true + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizations": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index_searches" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index_searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorIndexSearchesTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_indexed_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type", + "vector_data" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_indexed_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + }, + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "VectorDataInfo": { + "type": "object", + "required": [ + "num_deleted_vectors", + "num_indexed_vectors", + "num_vectors" + ], + "properties": { + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_indexed_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "SegmentConfig": { + "type": "object", + "required": [ + "payload_storage_type" + ], + "properties": { + "vector_data": { + "default": {}, + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "sparse_vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorDataConfig" + } + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "index", + "size", + "storage_type" + ], + "properties": { + "size": { + "description": "Size/dimensionality of the vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "storage_type": { + "$ref": "#/components/schemas/VectorStorageType" + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "quantization_config": { + "description": "Vector specific quantization config that overrides collection config", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "VectorStorageType": { + "description": "Storage types for vectors", + "oneOf": [ + { + "description": "Storage in memory (RAM)\n\nWill be very fast at the cost of consuming a lot of memory.", + "type": "string", + "enum": [ + "Memory" + ] + }, + { + "description": "Storage in mmap file, not appendable\n\nSearch performance is defined by disk speed and the fraction of vectors that fit in memory.", + "type": "string", + "enum": [ + "Mmap" + ] + }, + { + "description": "Storage in chunked mmap files, appendable\n\nSearch performance is defined by disk speed and the fraction of vectors that fit in memory.", + "type": "string", + "enum": [ + "ChunkedMmap" + ] + } + ] + }, + "Indexes": { + "description": "Vector index configuration", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "SparseVectorDataConfig": { + "description": "Config of single sparse vector data storage", + "type": "object", + "required": [ + "index" + ], + "properties": { + "index": { + "$ref": "#/components/schemas/SparseIndexConfig" + } + } + }, + "SparseIndexConfig": { + "description": "Configuration for sparse inverted index.", + "type": "object", + "required": [ + "index_type" + ], + "properties": { + "full_scan_threshold": { + "description": "We prefer a full scan search upto (excluding) this number of vectors.\n\nNote: this is number of vectors, not KiloBytes.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "index_type": { + "$ref": "#/components/schemas/SparseIndexType" + } + } + }, + "SparseIndexType": { + "description": "Sparse index types", + "oneOf": [ + { + "description": "Mutable RAM sparse index", + "type": "string", + "enum": [ + "MutableRam" + ] + }, + { + "description": "Immutable RAM sparse index", + "type": "string", + "enum": [ + "ImmutableRam" + ] + }, + { + "description": "Mmap sparse index", + "type": "string", + "enum": [ + "Mmap" + ] + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexSearchesTelemetry": { + "type": "object", + "required": [ + "filtered_exact", + "filtered_large_cardinality", + "filtered_plain", + "filtered_small_cardinality", + "filtered_sparse", + "unfiltered_exact", + "unfiltered_hnsw", + "unfiltered_plain", + "unfiltered_sparse" + ], + "properties": { + "index_name": { + "type": "string", + "nullable": true + }, + "unfiltered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_hnsw": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_sparse": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_small_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_large_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_sparse": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "OperationDurationStatistics": { + "type": "object", + "required": [ + "count", + "total_duration_micros" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "avg_duration_micros": { + "description": "The average time taken by 128 latest operations, calculated as a weighted mean.", + "type": "number", + "format": "float", + "nullable": true + }, + "min_duration_micros": { + "description": "The minimum duration of the operations across all the measurements.", + "type": "number", + "format": "float", + "nullable": true + }, + "max_duration_micros": { + "description": "The maximum duration of the operations across all the measurements.", + "type": "number", + "format": "float", + "nullable": true + }, + "total_duration_micros": { + "description": "The total duration of all operations in microseconds.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "last_responded": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "field_name": { + "type": "string", + "nullable": true + }, + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "type": "object", + "required": [ + "log", + "optimizations", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "optimizations": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "log": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TrackerTelemetry" + } + } + } + }, + "TrackerTelemetry": { + "description": "Tracker object used in telemetry", + "type": "object", + "required": [ + "name", + "segment_ids", + "start_at", + "status" + ], + "properties": { + "name": { + "description": "Name of the optimizer", + "type": "string" + }, + "segment_ids": { + "description": "Segment IDs being optimized", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + }, + "status": { + "$ref": "#/components/schemas/TrackerStatus" + }, + "start_at": { + "description": "Start time of the optimizer", + "type": "string", + "format": "date-time" + }, + "end_at": { + "description": "End time of the optimizer", + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "TrackerStatus": { + "description": "Represents the current state of the optimizer being tracked", + "oneOf": [ + { + "type": "string", + "enum": [ + "optimizing", + "done" + ] + }, + { + "type": "object", + "required": [ + "cancelled" + ], + "properties": { + "cancelled": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "RemoteShardTelemetry": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "searches": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "CollectionsAggregatedTelemetry": { + "type": "object", + "required": [ + "optimizers_status", + "params", + "vectors" + ], + "properties": { + "vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "optimizers_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + } + } + }, + "ClusterTelemetry": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterStatusTelemetry" + }, + { + "nullable": true + } + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatusTelemetry": { + "type": "object", + "required": [ + "commit", + "consensus_thread_status", + "is_voter", + "number_of_peers", + "pending_operations", + "term" + ], + "properties": { + "number_of_peers": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "term": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "role": { + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "type": "boolean" + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "RequestsTelemetry": { + "type": "object", + "required": [ + "grpc", + "rest" + ], + "properties": { + "rest": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc": { + "$ref": "#/components/schemas/GrpcTelemetry" + } + } + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + } + }, + "GrpcTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/ReplicateShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + }, + { + "$ref": "#/components/schemas/DropReplicaOperation" + }, + { + "$ref": "#/components/schemas/CreateShardingKeyOperation" + }, + { + "$ref": "#/components/schemas/DropShardingKeyOperation" + }, + { + "$ref": "#/components/schemas/RestartTransferOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "method": { + "description": "Method for transferring the shard from one node to another", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardTransferMethod" + }, + { + "nullable": true + } + ] + } + } + }, + "ReplicateShardOperation": { + "type": "object", + "required": [ + "replicate_shard" + ], + "properties": { + "replicate_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "DropReplicaOperation": { + "type": "object", + "required": [ + "drop_replica" + ], + "properties": { + "drop_replica": { + "$ref": "#/components/schemas/Replica" + } + } + }, + "Replica": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CreateShardingKeyOperation": { + "type": "object", + "required": [ + "create_sharding_key" + ], + "properties": { + "create_sharding_key": { + "$ref": "#/components/schemas/CreateShardingKey" + } + } + }, + "CreateShardingKey": { + "type": "object", + "required": [ + "shard_key" + ], + "properties": { + "shard_key": { + "$ref": "#/components/schemas/ShardKey" + }, + "shards_number": { + "description": "How many shards to create for this key If not specified, will use the default value from config", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "replication_factor": { + "description": "How many replicas to create for each shard If not specified, will use the default value from config", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "placement": { + "description": "Placement of shards for this key List of peer ids, that can be used to place shards for this key If not specified, will be randomly placed among all peers", + "type": "array", + "items": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "nullable": true + } + } + }, + "DropShardingKeyOperation": { + "type": "object", + "required": [ + "drop_sharding_key" + ], + "properties": { + "drop_sharding_key": { + "$ref": "#/components/schemas/DropShardingKey" + } + } + }, + "DropShardingKey": { + "type": "object", + "required": [ + "shard_key" + ], + "properties": { + "shard_key": { + "$ref": "#/components/schemas/ShardKey" + } + } + }, + "RestartTransferOperation": { + "type": "object", + "required": [ + "restart_transfer" + ], + "properties": { + "restart_transfer": { + "$ref": "#/components/schemas/RestartTransfer" + } + } + }, + "RestartTransfer": { + "type": "object", + "required": [ + "from_peer_id", + "method", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "method": { + "$ref": "#/components/schemas/ShardTransferMethod" + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "LocksOption": { + "type": "object", + "required": [ + "write" + ], + "properties": { + "error_message": { + "type": "string", + "nullable": true + }, + "write": { + "type": "boolean" + } + } + }, + "SnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "description": "Examples: - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot` - Local path `file:///qdrant/snapshots/test_collection-2022-08-04-10-49-10.snapshot`", + "type": "string", + "format": "uri" + }, + "priority": { + "description": "Defines which data should be used as a source of truth if there are other replicas in the cluster. If set to `Snapshot`, the snapshot will be used as a source of truth, and the current state will be overwritten. If set to `Replica`, the current state will be used as a source of truth, and after recovery if will be synchronized with the snapshot.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/SnapshotPriority" + }, + { + "nullable": true + } + ] + }, + "checksum": { + "description": "Optional SHA256 checksum to verify snapshot integrity before recovery.", + "default": null, + "type": "string", + "nullable": true + } + } + }, + "SnapshotPriority": { + "description": "Defines source of truth for snapshot recovery: `NoSync` means - restore snapshot without *any* additional synchronization. `Snapshot` means - prefer snapshot data over the current state. `Replica` means - prefer existing data over the snapshot.", + "type": "string", + "enum": [ + "no_sync", + "snapshot", + "replica" + ] + }, + "CollectionsAliasesResponse": { + "type": "object", + "required": [ + "aliases" + ], + "properties": { + "aliases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasDescription" + } + } + } + }, + "AliasDescription": { + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "alias_name": { + "type": "string" + }, + "collection_name": { + "type": "string" + } + } + }, + "WriteOrdering": { + "description": "Defines write ordering guarantees for collection operations\n\n* `weak` - write operations may be reordered, works faster, default\n\n* `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change\n\n* `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down", + "type": "string", + "enum": [ + "weak", + "medium", + "strong" + ] + }, + "ReadConsistency": { + "description": "Read consistency parameter\n\nDefines how many replicas should be queried to get the result\n\n* `N` - send N random request and return points, which present on all of them\n\n* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of them\n\n* `all` - send requests to all nodes and return points which present on all of them\n\nDefault value is `Factor(1)`", + "anyOf": [ + { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + { + "$ref": "#/components/schemas/ReadConsistencyType" + } + ] + }, + "ReadConsistencyType": { + "description": "* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of nodes\n\n* `all` - send requests to all nodes and return points which present on all nodes", + "type": "string", + "enum": [ + "majority", + "quorum", + "all" + ] + }, + "UpdateVectors": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "Points with named vectors", + "type": "array", + "items": { + "$ref": "#/components/schemas/PointVectors" + }, + "minItems": 1 + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointVectors": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + } + } + }, + "DeleteVectors": { + "type": "object", + "required": [ + "vector" + ], + "properties": { + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector names", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointGroup": { + "type": "object", + "required": [ + "hits", + "id" + ], + "properties": { + "hits": { + "description": "Scored points that have the same value of the group_by key", + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + }, + "id": { + "$ref": "#/components/schemas/GroupId" + }, + "lookup": { + "description": "Record that has been looked up using the group id", + "anyOf": [ + { + "$ref": "#/components/schemas/Record" + }, + { + "nullable": true + } + ] + } + } + }, + "GroupId": { + "description": "Value of the group_by key, shared across all the hits in the group", + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "integer", + "format": "int64" + } + ] + }, + "SearchGroupsRequest": { + "type": "object", + "required": [ + "group_by", + "group_size", + "limit", + "vector" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "group_by": { + "description": "Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.", + "type": "string", + "minLength": 1 + }, + "group_size": { + "description": "Maximum amount of points to return per group", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "limit": { + "description": "Maximum amount of groups to return", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "with_lookup": { + "description": "Look for points in another collection using the group ids", + "anyOf": [ + { + "$ref": "#/components/schemas/WithLookupInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "WithLookupInterface": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/WithLookup" + } + ] + }, + "WithLookup": { + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection to use for points lookup", + "type": "string" + }, + "with_payload": { + "description": "Options for specifying which payload to include (or not)", + "default": true, + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vectors": { + "description": "Options for specifying which vectors to include (or not)", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + } + } + }, + "RecommendGroupsRequest": { + "type": "object", + "required": [ + "group_by", + "group_size", + "limit" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "positive": { + "description": "Look for vectors closest to those", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "strategy": { + "description": "How to use positive and negative examples to find the results", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/RecommendStrategy" + }, + { + "nullable": true + } + ] + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + }, + "group_by": { + "description": "Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.", + "type": "string", + "minLength": 1 + }, + "group_size": { + "description": "Maximum amount of points to return per group", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "limit": { + "description": "Maximum amount of groups to return", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "with_lookup": { + "description": "Look for points in another collection using the group ids", + "anyOf": [ + { + "$ref": "#/components/schemas/WithLookupInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "GroupsResult": { + "type": "object", + "required": [ + "groups" + ], + "properties": { + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointGroup" + } + } + } + }, + "UpdateOperations": { + "type": "object", + "required": [ + "operations" + ], + "properties": { + "operations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateOperation" + } + } + } + }, + "UpdateOperation": { + "anyOf": [ + { + "$ref": "#/components/schemas/UpsertOperation" + }, + { + "$ref": "#/components/schemas/DeleteOperation" + }, + { + "$ref": "#/components/schemas/SetPayloadOperation" + }, + { + "$ref": "#/components/schemas/OverwritePayloadOperation" + }, + { + "$ref": "#/components/schemas/DeletePayloadOperation" + }, + { + "$ref": "#/components/schemas/ClearPayloadOperation" + }, + { + "$ref": "#/components/schemas/UpdateVectorsOperation" + }, + { + "$ref": "#/components/schemas/DeleteVectorsOperation" + } + ] + }, + "UpsertOperation": { + "type": "object", + "required": [ + "upsert" + ], + "properties": { + "upsert": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + }, + "DeleteOperation": { + "type": "object", + "required": [ + "delete" + ], + "properties": { + "delete": { + "$ref": "#/components/schemas/PointsSelector" + } + } + }, + "SetPayloadOperation": { + "type": "object", + "required": [ + "set_payload" + ], + "properties": { + "set_payload": { + "$ref": "#/components/schemas/SetPayload" + } + } + }, + "OverwritePayloadOperation": { + "type": "object", + "required": [ + "overwrite_payload" + ], + "properties": { + "overwrite_payload": { + "$ref": "#/components/schemas/SetPayload" + } + } + }, + "DeletePayloadOperation": { + "type": "object", + "required": [ + "delete_payload" + ], + "properties": { + "delete_payload": { + "$ref": "#/components/schemas/DeletePayload" + } + } + }, + "ClearPayloadOperation": { + "type": "object", + "required": [ + "clear_payload" + ], + "properties": { + "clear_payload": { + "$ref": "#/components/schemas/PointsSelector" + } + } + }, + "UpdateVectorsOperation": { + "type": "object", + "required": [ + "update_vectors" + ], + "properties": { + "update_vectors": { + "$ref": "#/components/schemas/UpdateVectors" + } + } + }, + "DeleteVectorsOperation": { + "type": "object", + "required": [ + "delete_vectors" + ], + "properties": { + "delete_vectors": { + "$ref": "#/components/schemas/DeleteVectors" + } + } + }, + "ShardSnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "$ref": "#/components/schemas/ShardSnapshotLocation" + }, + "priority": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/SnapshotPriority" + }, + { + "nullable": true + } + ] + }, + "checksum": { + "description": "Optional SHA256 checksum to verify snapshot integrity before recovery.", + "default": null, + "type": "string", + "nullable": true + } + } + }, + "ShardSnapshotLocation": { + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "string" + } + ] + }, + "DiscoverRequest": { + "description": "Use context and a target to find the most similar points, constrained by the context.", + "type": "object", + "required": [ + "limit" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "target": { + "description": "Look for vectors closest to this.\n\nWhen using the target (with or without context), the integer part of the score represents the rank with respect to the context, while the decimal part of the score relates to the distance to the target.", + "anyOf": [ + { + "$ref": "#/components/schemas/RecommendExample" + }, + { + "nullable": true + } + ] + }, + "context": { + "description": "Pairs of { positive, negative } examples to constrain the search.\n\nWhen using only the context (without a target), a special search - called context search - is performed where pairs of points are used to generate a loss that guides the search towards the zone where most positive examples overlap. This means that the score minimizes the scenario of finding a point closer to a negative than to a positive part of a pair.\n\nSince the score of a context relates to loss, the maximum score a point can get is 0.0, and it becomes normal that many points can have a score of 0.0.\n\nFor discovery search (when including a target), the context part of the score for each pair is calculated +1 if the point is closer to a positive than to a negative part of a pair, and -1 otherwise.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ContextExamplePair" + }, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "ContextExamplePair": { + "type": "object", + "required": [ + "negative", + "positive" + ], + "properties": { + "positive": { + "$ref": "#/components/schemas/RecommendExample" + }, + "negative": { + "$ref": "#/components/schemas/RecommendExample" + } + } + }, + "DiscoverRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DiscoverRequest" + } + } + } + }, + "VersionInfo": { + "type": "object", + "required": [ + "title", + "version" + ], + "properties": { + "title": { + "type": "string" + }, + "version": { + "type": "string" + }, + "commit": { + "type": "string", + "nullable": true + } + } + }, + "CollectionExistence": { + "description": "State of existence of a collection, true = exists, false = does not exist", + "type": "object", + "required": [ + "exists" + ], + "properties": { + "exists": { + "type": "boolean" + } + } + } + } + } +} diff --git a/docs/redoc/v1.9.x/openapi.json b/docs/redoc/v1.9.x/openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..56a888447b3046445aa8aceca9de76b9639b6e38 --- /dev/null +++ b/docs/redoc/v1.9.x/openapi.json @@ -0,0 +1,11035 @@ +{ + "paths": { + "/collections/{collection_name}/shards": { + "put": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Create shard key", + "operationId": "create_shard_key", + "requestBody": { + "description": "Shard key configuration", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateShardingKey" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to create shards for", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/delete": { + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Delete shard key", + "operationId": "delete_shard_key", + "requestBody": { + "description": "Select shard key to delete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DropShardingKey" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to create shards for", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/": { + "get": { + "summary": "Returns information about the running Qdrant instance", + "description": "Returns information about the running Qdrant instance like version and commit id", + "operationId": "root", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/VersionInfo" + } + } + } + } + } + } + } + } + }, + "/telemetry": { + "get": { + "summary": "Collect telemetry data", + "description": "Collect telemetry data including app info, system info, collections info, cluster info, configs and statistics", + "operationId": "telemetry", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/TelemetryData" + } + } + } + } + } + } + } + } + }, + "/metrics": { + "get": { + "summary": "Collect Prometheus metrics data", + "description": "Collect metrics data including app info, collections info, cluster info and statistics", + "operationId": "metrics", + "tags": [ + "service" + ], + "parameters": [ + { + "name": "anonymize", + "in": "query", + "description": "If true, anonymize result", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Metrics data in Prometheus format", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "# HELP app_info information about qdrant server\n# TYPE app_info counter\napp_info{name=\"qdrant\",version=\"0.11.1\"} 1\n# HELP cluster_enabled is cluster support enabled\n# TYPE cluster_enabled gauge\ncluster_enabled 0\n# HELP collections_total number of collections\n# TYPE collections_total gauge\ncollections_total 1\n" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/locks": { + "post": { + "summary": "Set lock options", + "description": "Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options", + "operationId": "post_locks", + "tags": [ + "service" + ], + "requestBody": { + "description": "Lock options and optional error message", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + }, + "get": { + "summary": "Get lock options", + "description": "Get lock options. If write is locked, all write operations and collection creation are forbidden", + "operationId": "get_locks", + "tags": [ + "service" + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/LocksOption" + } + } + } + } + } + } + } + } + }, + "/healthz": { + "get": { + "summary": "Kubernetes healthz endpoint", + "description": "An endpoint for health checking used in Kubernetes.", + "operationId": "healthz", + "tags": [ + "service" + ], + "responses": { + "200": { + "description": "Healthz response", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "healthz check passed" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/livez": { + "get": { + "summary": "Kubernetes livez endpoint", + "description": "An endpoint for health checking used in Kubernetes.", + "operationId": "livez", + "tags": [ + "service" + ], + "responses": { + "200": { + "description": "Healthz response", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "healthz check passed" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/readyz": { + "get": { + "summary": "Kubernetes readyz endpoint", + "description": "An endpoint for health checking used in Kubernetes.", + "operationId": "readyz", + "tags": [ + "service" + ], + "responses": { + "200": { + "description": "Healthz response", + "content": { + "text/plain": { + "schema": { + "type": "string", + "example": "healthz check passed" + } + } + } + }, + "4XX": { + "description": "error" + } + } + } + }, + "/cluster": { + "get": { + "tags": [ + "cluster" + ], + "summary": "Get cluster status info", + "description": "Get information about the current state and composition of the cluster", + "operationId": "cluster_status", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/ClusterStatus" + } + } + } + } + } + } + } + } + }, + "/cluster/recover": { + "post": { + "tags": [ + "cluster" + ], + "summary": "Tries to recover current peer Raft state.", + "operationId": "recover_current_peer", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/cluster/peer/{peer_id}": { + "delete": { + "tags": [ + "cluster" + ], + "summary": "Remove peer from the cluster", + "description": "Tries to remove peer from the cluster. Will return an error if peer has shards on it.", + "operationId": "remove_peer", + "parameters": [ + { + "name": "peer_id", + "in": "path", + "description": "Id of the peer", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "force", + "in": "query", + "description": "If true - removes peer even if it has shards/replicas on it.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections", + "description": "Get list name of all existing collections", + "operationId": "get_collections", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/CollectionsResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}": { + "get": { + "tags": [ + "collections" + ], + "summary": "Collection info", + "description": "Get detailed information about specified existing collection", + "operationId": "get_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/CollectionInfo" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "collections" + ], + "summary": "Create collection", + "description": "Create new collection with given parameters", + "operationId": "create_collection", + "requestBody": { + "description": "Parameters of a new collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the new collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "patch": { + "tags": [ + "collections" + ], + "summary": "Update collection parameters", + "description": "Update parameters of the existing collection", + "operationId": "update_collection", + "requestBody": { + "description": "New parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCollection" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete collection", + "description": "Drop collection and all associated data", + "operationId": "delete_collection", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/aliases": { + "post": { + "tags": [ + "collections" + ], + "summary": "Update aliases of the collections", + "operationId": "update_aliases", + "requestBody": { + "description": "Alias update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeAliasesOperation" + } + } + } + }, + "parameters": [ + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index": { + "put": { + "tags": [ + "collections" + ], + "summary": "Create index for field in collection", + "description": "Create index for field in collection", + "operationId": "create_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "requestBody": { + "description": "Field name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFieldIndex" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/exists": { + "get": { + "tags": [ + "collections" + ], + "summary": "Check the existence of a collection", + "description": "Returns \"true\" if the given collection name exists, and \"false\" otherwise", + "operationId": "collection_exists", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/CollectionExistence" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/index/{field_name}": { + "delete": { + "tags": [ + "collections" + ], + "summary": "Delete index for field in collection", + "description": "Delete field index for collection", + "operationId": "delete_field_index", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "field_name", + "in": "path", + "description": "Name of the field where to delete the index", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/cluster": { + "get": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Collection cluster info", + "description": "Get cluster information for a collection", + "operationId": "collection_cluster_info", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve the cluster info for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/CollectionClusterInfo" + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "collections", + "cluster" + ], + "summary": "Update collection cluster setup", + "operationId": "update_collection_cluster", + "requestBody": { + "description": "Collection cluster update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClusterOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection on which to to apply the cluster update operation", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "query", + "description": "Wait for operation commit timeout in seconds. \nIf timeout is reached - request will return with service error.\n", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List aliases for collection", + "description": "Get list of all aliases for a collection", + "operationId": "get_collection_aliases", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/aliases": { + "get": { + "tags": [ + "collections" + ], + "summary": "List collections aliases", + "description": "Get list of all existing collections aliases", + "operationId": "get_collections_aliases", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/CollectionsAliasesResponse" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/upload": { + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from an uploaded snapshot", + "description": "Recover local collection data from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_uploaded_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "priority", + "in": "query", + "description": "Defines source of truth for snapshot recovery", + "required": false, + "schema": { + "$ref": "#/components/schemas/SnapshotPriority" + } + }, + { + "name": "checksum", + "in": "query", + "description": "Optional SHA256 checksum to verify snapshot integrity before recovery.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "snapshot": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover local collection data from a snapshot. This will overwrite any data, stored on this node, for the collection. If collection does not exist - it will be created.", + "operationId": "recover_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List collection snapshots", + "description": "Get list of snapshots for a collection", + "operationId": "list_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create collection snapshot", + "description": "Create new snapshot for a collection", + "operationId": "create_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Delete collection snapshot", + "description": "Delete snapshot for a collection", + "operationId": "delete_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot from a collection as a file", + "operationId": "get_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/snapshots": { + "get": { + "tags": [ + "snapshots" + ], + "summary": "List of storage snapshots", + "description": "Get list of snapshots of the whole storage", + "operationId": "list_full_snapshots", + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots" + ], + "summary": "Create storage snapshot", + "description": "Create new snapshot of the whole storage", + "operationId": "create_full_snapshot", + "parameters": [ + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots" + ], + "summary": "Delete storage snapshot", + "description": "Delete snapshot of the whole storage", + "operationId": "delete_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the full snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots" + ], + "summary": "Download storage snapshot", + "description": "Download specified snapshot of the whole storage as a file", + "operationId": "get_full_snapshot", + "parameters": [ + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots/upload": { + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover shard from an uploaded snapshot", + "description": "Recover shard of a local collection from an uploaded snapshot. This will overwrite any data, stored on this node, for the collection shard.", + "operationId": "recover_shard_from_uploaded_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard to recover", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "priority", + "in": "query", + "description": "Defines source of truth for snapshot recovery", + "required": false, + "schema": { + "$ref": "#/components/schemas/SnapshotPriority" + } + }, + { + "name": "checksum", + "in": "query", + "description": "Optional SHA256 checksum to verify snapshot integrity before recovery.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "snapshot": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots/recover": { + "put": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Recover from a snapshot", + "description": "Recover shard of a local collection data from a snapshot. This will overwrite any data, stored in this shard, for the collection.", + "operationId": "recover_shard_from_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard to recover", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "Snapshot to recover from", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShardSnapshotRecover" + } + } + } + }, + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots": { + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "List shards snapshots for a collection", + "description": "Get list of snapshots for a shard of a collection", + "operationId": "list_shard_snapshots", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + } + } + } + }, + "post": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Create shard snapshot", + "description": "Create new snapshot of a shard for a collection", + "operationId": "create_shard_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to create a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/SnapshotDescription" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/shards/{shard_id}/snapshots/{snapshot_name}": { + "delete": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Delete shard snapshot", + "description": "Delete snapshot of a shard for a collection", + "operationId": "delete_shard_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection for which to delete a snapshot", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to delete", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen. If false - let changes happen in background. Default is true.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "boolean" + } + } + } + } + } + }, + "202": { + "description": "operation is accepted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + } + } + } + } + } + } + } + }, + "get": { + "tags": [ + "snapshots", + "collections" + ], + "summary": "Download collection snapshot", + "description": "Download specified snapshot of a shard from a collection as a file", + "operationId": "get_shard_snapshot", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "shard_id", + "in": "path", + "description": "Id of the shard", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "snapshot_name", + "in": "path", + "description": "Name of the snapshot to download", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "Snapshot file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/{id}": { + "get": { + "tags": [ + "points" + ], + "summary": "Get point", + "description": "Retrieve full information of single point by id", + "operationId": "get_point", + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "description": "Id of the point", + "required": true, + "schema": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points": { + "post": { + "tags": [ + "points" + ], + "summary": "Get points", + "description": "Retrieve multiple points by specified IDs", + "operationId": "get_points", + "requestBody": { + "description": "List of points to retrieve", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Upsert points", + "description": "Perform insert + updates on points. If point with given ID already exists - it will be overwritten.", + "operationId": "upsert_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete points", + "description": "Delete points", + "operationId": "delete_points", + "requestBody": { + "description": "Operation to perform on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/vectors": { + "put": { + "tags": [ + "points" + ], + "summary": "Update vectors", + "description": "Update specified named vectors on points, keep unspecified vectors intact.", + "operationId": "update_vectors", + "requestBody": { + "description": "Update named vectors on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateVectors" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to update from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/vectors/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete vectors", + "description": "Delete named vectors from the given points.", + "operationId": "delete_vectors", + "requestBody": { + "description": "Delete named vectors from points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteVectors" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload": { + "post": { + "tags": [ + "points" + ], + "summary": "Set payload", + "description": "Set payload values for points", + "operationId": "set_payload", + "requestBody": { + "description": "Set payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "points" + ], + "summary": "Overwrite payload", + "description": "Replace full payload of points with new one", + "operationId": "overwrite_payload", + "requestBody": { + "description": "Payload and points selector", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetPayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to set from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/delete": { + "post": { + "tags": [ + "points" + ], + "summary": "Delete payload", + "description": "Delete specified key payload for points", + "operationId": "delete_payload", + "requestBody": { + "description": "delete payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletePayload" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to delete from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/payload/clear": { + "post": { + "tags": [ + "points" + ], + "summary": "Clear payload", + "description": "Remove all payload for specified points", + "operationId": "clear_payload", + "requestBody": { + "description": "clear payload on points", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointsSelector" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to clear payload from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Batch update points", + "description": "Apply a series of update operations for points, vectors and payloads", + "operationId": "batch_update", + "requestBody": { + "description": "update operations", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateOperations" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to apply operations on", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "wait", + "in": "query", + "description": "If true, wait for changes to actually happen", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "ordering", + "in": "query", + "description": "define ordering guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/WriteOrdering" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateResult" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/scroll": { + "post": { + "tags": [ + "points" + ], + "summary": "Scroll points", + "description": "Scroll request - paginate over all points which matches given filtering condition", + "operationId": "scroll_points", + "requestBody": { + "description": "Pagination and filter parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScrollRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to retrieve from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/ScrollResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search": { + "post": { + "tags": [ + "points" + ], + "summary": "Search points", + "description": "Retrieve closest points based on vector similarity and given filtering conditions", + "operationId": "search_points", + "requestBody": { + "description": "Search request with optional filtering", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Search batch points", + "description": "Retrieve by batch the closest points based on vector similarity and given filtering conditions", + "operationId": "search_batch_points", + "requestBody": { + "description": "Search batch request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/search/groups": { + "post": { + "tags": [ + "points" + ], + "summary": "Search point groups", + "description": "Retrieve closest points based on vector similarity and given filtering conditions, grouped by a given payload field", + "operationId": "search_point_groups", + "requestBody": { + "description": "Search request with optional filtering, grouped by a given payload field", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchGroupsRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/GroupsResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend batch points", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples.", + "operationId": "recommend_batch_points", + "requestBody": { + "description": "Request points based on positive and negative examples.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/recommend/groups": { + "post": { + "tags": [ + "points" + ], + "summary": "Recommend point groups", + "description": "Look for the points which are closer to stored positive examples and at the same time further to negative examples, grouped by a given payload field.", + "operationId": "recommend_point_groups", + "requestBody": { + "description": "Request points based on positive and negative examples, grouped by a payload field.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RecommendGroupsRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/GroupsResult" + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/discover": { + "post": { + "tags": [ + "points" + ], + "summary": "Discover points", + "description": "Use context and a target to find the most similar points to the target, constrained by the context.\nWhen using only the context (without a target), a special search - called context search - is performed where pairs of points are used to generate a loss that guides the search towards the zone where most positive examples overlap. This means that the score minimizes the scenario of finding a point closer to a negative than to a positive part of a pair.\nSince the score of a context relates to loss, the maximum score a point can get is 0.0, and it becomes normal that many points can have a score of 0.0.\nWhen using target (with or without context), the score behaves a little different: The integer part of the score represents the rank with respect to the context, while the decimal part of the score relates to the distance to the target. The context part of the score for each pair is calculated +1 if the point is closer to a positive than to a negative part of a pair, and -1 otherwise.\n", + "operationId": "discover_points", + "requestBody": { + "description": "Request points based on {positive, negative} pairs of examples, and/or a target", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DiscoverRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/discover/batch": { + "post": { + "tags": [ + "points" + ], + "summary": "Discover batch points", + "description": "Look for points based on target and/or positive and negative example pairs, in batch.", + "operationId": "discover_batch_points", + "requestBody": { + "description": "Batch request points based on { positive, negative } pairs of examples, and/or a target.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DiscoverRequestBatch" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to search in", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "consistency", + "in": "query", + "description": "Define read consistency guarantees for the operation", + "required": false, + "schema": { + "$ref": "#/components/schemas/ReadConsistency" + } + }, + { + "name": "timeout", + "in": "query", + "description": "If set, overrides global timeout for this request. Unit is seconds.", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + } + } + } + } + } + } + } + } + } + }, + "/collections/{collection_name}/points/count": { + "post": { + "tags": [ + "points" + ], + "summary": "Count points", + "description": "Count points which matches given filtering condition", + "operationId": "count_points", + "requestBody": { + "description": "Request counts of points which matches given filtering condition", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountRequest" + } + } + } + }, + "parameters": [ + { + "name": "collection_name", + "in": "path", + "description": "Name of the collection to count in", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "4XX": { + "description": "error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "string" + }, + "result": { + "$ref": "#/components/schemas/CountResult" + } + } + } + } + } + } + } + } + } + }, + "openapi": "3.0.1", + "security": [ + { + "api-key": [] + }, + { + "bearerAuth": [] + }, + {} + ], + "info": { + "title": "Qdrant API", + "description": "API description for Qdrant vector search engine.\n\nThis document describes CRUD and search operations on collections of points (vectors with payload).\n\nQdrant supports any combinations of `should`, `min_should`, `must` and `must_not` conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account.\n## Examples\nThis examples cover the most basic use-cases - collection creation and basic vector search.\n### Create collection\nFirst - let's create a collection with dot-production metric.\n```\ncurl -X PUT 'http://localhost:6333/collections/test_collection' \\\n -H 'Content-Type: application/json' \\\n --data-raw '{\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n }'\n\n```\nExpected response:\n```\n{\n \"result\": true,\n \"status\": \"ok\",\n \"time\": 0.031095451\n}\n```\nWe can ensure that collection was created:\n```\ncurl 'http://localhost:6333/collections/test_collection'\n```\nExpected response:\n```\n{\n \"result\": {\n \"status\": \"green\",\n \"vectors_count\": 0,\n \"segments_count\": 5,\n \"disk_data_size\": 0,\n \"ram_data_size\": 0,\n \"config\": {\n \"params\": {\n \"vectors\": {\n \"size\": 4,\n \"distance\": \"Dot\"\n }\n },\n \"hnsw_config\": {\n \"m\": 16,\n \"ef_construct\": 100,\n \"full_scan_threshold\": 10000\n },\n \"optimizer_config\": {\n \"deleted_threshold\": 0.2,\n \"vacuum_min_vector_number\": 1000,\n \"max_segment_number\": 5,\n \"memmap_threshold\": 50000,\n \"indexing_threshold\": 20000,\n \"flush_interval_sec\": 1\n },\n \"wal_config\": {\n \"wal_capacity_mb\": 32,\n \"wal_segments_ahead\": 0\n }\n }\n },\n \"status\": \"ok\",\n \"time\": 2.1199e-05\n}\n```\n\n### Add points\nLet's now add vectors with some payload:\n```\ncurl -L -X PUT 'http://localhost:6333/collections/test_collection/points?wait=true' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"points\": [\n {\"id\": 1, \"vector\": [0.05, 0.61, 0.76, 0.74], \"payload\": {\"city\": \"Berlin\"}},\n {\"id\": 2, \"vector\": [0.19, 0.81, 0.75, 0.11], \"payload\": {\"city\": [\"Berlin\", \"London\"] }},\n {\"id\": 3, \"vector\": [0.36, 0.55, 0.47, 0.94], \"payload\": {\"city\": [\"Berlin\", \"Moscow\"] }},\n {\"id\": 4, \"vector\": [0.18, 0.01, 0.85, 0.80], \"payload\": {\"city\": [\"London\", \"Moscow\"] }},\n {\"id\": 5, \"vector\": [0.24, 0.18, 0.22, 0.44], \"payload\": {\"count\": [0]}},\n {\"id\": 6, \"vector\": [0.35, 0.08, 0.11, 0.44]}\n ]\n}'\n```\nExpected response:\n```\n{\n \"result\": {\n \"operation_id\": 0,\n \"status\": \"completed\"\n },\n \"status\": \"ok\",\n \"time\": 0.000206061\n}\n```\n### Search with filtering\nLet's start with a basic request:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"vector\": [0.2,0.1,0.9,0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 1, \"score\": 1.273, \"payload\": null, \"version\": 0 },\n { \"id\": 3, \"score\": 1.208, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000055785\n}\n```\nBut result is different if we add a filter:\n```\ncurl -L -X POST 'http://localhost:6333/collections/test_collection/points/search' \\ -H 'Content-Type: application/json' \\ --data-raw '{\n \"filter\": {\n \"should\": [\n {\n \"key\": \"city\",\n \"match\": {\n \"value\": \"London\"\n }\n }\n ]\n },\n \"vector\": [0.2, 0.1, 0.9, 0.7],\n \"top\": 3\n}'\n```\nExpected response:\n```\n{\n \"result\": [\n { \"id\": 4, \"score\": 1.362, \"payload\": null, \"version\": 0 },\n { \"id\": 2, \"score\": 0.871, \"payload\": null, \"version\": 0 }\n ],\n \"status\": \"ok\",\n \"time\": 0.000093972\n}\n```\n", + "contact": { + "email": "andrey@vasnetsov.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "v1.9.x" + }, + "externalDocs": { + "description": "Find out more about Qdrant applications and demo", + "url": "https://qdrant.tech/documentation/" + }, + "servers": [ + { + "url": "{protocol}://{hostname}:{port}", + "variables": { + "protocol": { + "enum": [ + "http", + "https" + ], + "default": "http" + }, + "hostname": { + "default": "localhost" + }, + "port": { + "default": "6333" + } + } + } + ], + "tags": [ + { + "name": "collections", + "description": "Searchable collections of points." + }, + { + "name": "points", + "description": "Float-point vectors with payload." + }, + { + "name": "cluster", + "description": "Service distributed setup." + }, + { + "name": "snapshots", + "description": "Storage and collections snapshots." + }, + { + "name": "service", + "description": "Qdrant service utilities." + }, + { + "name": "beta", + "description": "Beta features, do not depend on these yet." + } + ], + "components": { + "securitySchemes": { + "api-key": { + "type": "apiKey", + "in": "header", + "name": "api-key", + "description": "Authorization key, either read-write or read-only" + }, + "bearerAuth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "ErrorResponse": { + "type": "object", + "properties": { + "time": { + "type": "number", + "format": "float", + "description": "Time spent to process this request" + }, + "status": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Description of the occurred error." + } + } + }, + "result": { + "type": "object", + "nullable": true + } + } + }, + "CollectionsResponse": { + "type": "object", + "required": [ + "collections" + ], + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionDescription" + } + } + } + }, + "CollectionDescription": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "CollectionInfo": { + "description": "Current statistics and configuration of the collection", + "type": "object", + "required": [ + "config", + "optimizer_status", + "payload_schema", + "segments_count", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/CollectionStatus" + }, + "optimizer_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "vectors_count": { + "description": "DEPRECATED: Approximate number of vectors in collection. All vectors in collection are available for querying. Calculated as `points_count x vectors_per_point`. Where `vectors_per_point` is a number of named vectors in schema.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexed_vectors_count": { + "description": "Approximate number of indexed vectors in the collection. Indexed vectors in large segments are faster to query, as it is stored in a specialized vector index.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "points_count": { + "description": "Approximate number of points (vectors + payloads) in collection. Each point could be accessed by unique id.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "segments_count": { + "description": "Number of segments in collection. Each segment has independent vector as payload indexes", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "payload_schema": { + "description": "Types of stored payload", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + } + } + }, + "CollectionStatus": { + "description": "Current state of the collection. `Green` - all good. `Yellow` - optimization is running, `Red` - some operations failed and was not recovered", + "type": "string", + "enum": [ + "green", + "yellow", + "grey", + "red" + ] + }, + "OptimizersStatus": { + "description": "Current state of the collection", + "oneOf": [ + { + "description": "Optimizers are reporting as expected", + "type": "string", + "enum": [ + "ok" + ] + }, + { + "description": "Something wrong happened with optimizers", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "CollectionConfig": { + "type": "object", + "required": [ + "hnsw_config", + "optimizer_config", + "params", + "wal_config" + ], + "properties": { + "params": { + "$ref": "#/components/schemas/CollectionParams" + }, + "hnsw_config": { + "$ref": "#/components/schemas/HnswConfig" + }, + "optimizer_config": { + "$ref": "#/components/schemas/OptimizersConfig" + }, + "wal_config": { + "$ref": "#/components/schemas/WalConfig" + }, + "quantization_config": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "CollectionParams": { + "type": "object", + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "Number of shards the collection has", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "sharding_method": { + "description": "Sharding method Default is Auto - points are distributed across all available shards Custom - points are distributed across shards according to shard key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardingMethod" + }, + { + "nullable": true + } + ] + }, + "replication_factor": { + "description": "Number of replicas for each shard", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": 1, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "read_fan_out_factor": { + "description": "Defines how many additional replicas should be processing read request at the same time. Default value is Auto, which means that fan-out will be determined automatically based on the busyness of the local replica. Having more than 0 might be useful to smooth latency spikes of individual nodes.", + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": false, + "type": "boolean" + }, + "sparse_vectors": { + "description": "Configuration of the sparse vector storage", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorParams" + }, + "nullable": true + } + } + }, + "VectorsConfig": { + "description": "Vector params separator for single and multiple vector modes Single mode:\n\n{ \"size\": 128, \"distance\": \"Cosine\" }\n\nor multiple mode:\n\n{ \"default\": { \"size\": 128, \"distance\": \"Cosine\" } }", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorParams" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParams" + } + } + ] + }, + "VectorParams": { + "description": "Params of single vector data storage", + "type": "object", + "required": [ + "distance", + "size" + ], + "properties": { + "size": { + "description": "Size of a vectors used", + "type": "integer", + "format": "uint64", + "minimum": 1 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Custom params for quantization. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + }, + "on_disk": { + "description": "If true, vectors are served from disk, improving RAM usage at the cost of latency Default: false", + "type": "boolean", + "nullable": true + }, + "datatype": { + "anyOf": [ + { + "$ref": "#/components/schemas/Datatype" + }, + { + "nullable": true + } + ] + } + } + }, + "Distance": { + "description": "Type of internal tags, build from payload Distance function types used to compare vectors", + "type": "string", + "enum": [ + "Cosine", + "Euclid", + "Dot", + "Manhattan" + ] + }, + "HnswConfigDiff": { + "type": "object", + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build the index.", + "type": "integer", + "format": "uint", + "minimum": 4, + "nullable": true + }, + "full_scan_threshold": { + "description": "Minimal size (in kilobytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 10, + "nullable": true + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - automatically select from 8 to 16. Best to keep between 8 and 16 to prevent likelihood of building broken/inefficient HNSW graphs. On small CPUs, less threads are used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, the index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for additional payload-aware HNSW links. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "QuantizationConfig": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScalarQuantization" + }, + { + "$ref": "#/components/schemas/ProductQuantization" + }, + { + "$ref": "#/components/schemas/BinaryQuantization" + } + ] + }, + "ScalarQuantization": { + "type": "object", + "required": [ + "scalar" + ], + "properties": { + "scalar": { + "$ref": "#/components/schemas/ScalarQuantizationConfig" + } + } + }, + "ScalarQuantizationConfig": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/ScalarType" + }, + "quantile": { + "description": "Quantile for quantization. Expected value range in [0.5, 1.0]. If not set - use the whole range of values", + "type": "number", + "format": "float", + "maximum": 1, + "minimum": 0.5, + "nullable": true + }, + "always_ram": { + "description": "If true - quantized vectors always will be stored in RAM, ignoring the config of main storage", + "type": "boolean", + "nullable": true + } + } + }, + "ScalarType": { + "type": "string", + "enum": [ + "int8" + ] + }, + "ProductQuantization": { + "type": "object", + "required": [ + "product" + ], + "properties": { + "product": { + "$ref": "#/components/schemas/ProductQuantizationConfig" + } + } + }, + "ProductQuantizationConfig": { + "type": "object", + "required": [ + "compression" + ], + "properties": { + "compression": { + "$ref": "#/components/schemas/CompressionRatio" + }, + "always_ram": { + "type": "boolean", + "nullable": true + } + } + }, + "CompressionRatio": { + "type": "string", + "enum": [ + "x4", + "x8", + "x16", + "x32", + "x64" + ] + }, + "BinaryQuantization": { + "type": "object", + "required": [ + "binary" + ], + "properties": { + "binary": { + "$ref": "#/components/schemas/BinaryQuantizationConfig" + } + } + }, + "BinaryQuantizationConfig": { + "type": "object", + "properties": { + "always_ram": { + "type": "boolean", + "nullable": true + } + } + }, + "Datatype": { + "description": "Defines which datatype should be used to represent vectors in the storage. Choosing different datatypes allows to optimize memory usage and performance vs accuracy. - For `float32` datatype - vectors are stored as single-precision floating point numbers, 4bytes. - For `uint8` datatype - vectors are stored as unsigned 8-bit integers, 1byte. It expects vector elements to be in range `[0, 255]`.", + "type": "string", + "enum": [ + "float32", + "uint8" + ] + }, + "ShardingMethod": { + "type": "string", + "enum": [ + "auto", + "custom" + ] + }, + "SparseVectorParams": { + "description": "Params of single sparse vector data storage", + "type": "object", + "properties": { + "index": { + "description": "Custom params for index. If none - values from collection configuration are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/SparseIndexParams" + }, + { + "nullable": true + } + ] + } + } + }, + "SparseIndexParams": { + "description": "Configuration for sparse inverted index.", + "type": "object", + "properties": { + "full_scan_threshold": { + "description": "We prefer a full scan search upto (excluding) this number of vectors.\n\nNote: this is number of vectors, not KiloBytes.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "on_disk": { + "description": "Store index on disk. If set to false, the index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + } + } + }, + "HnswConfig": { + "description": "Config of HNSW index", + "type": "object", + "required": [ + "ef_construct", + "full_scan_threshold", + "m" + ], + "properties": { + "m": { + "description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ef_construct": { + "description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.", + "type": "integer", + "format": "uint", + "minimum": 4 + }, + "full_scan_threshold": { + "description": "Minimal size (in KiloBytes) of vectors for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold_kb` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_indexing_threads": { + "description": "Number of parallel threads used for background index building. If 0 - automatically select from 8 to 16. Best to keep between 8 and 16 to prevent likelihood of slow building or broken/inefficient HNSW graphs. On small CPUs, less threads are used.", + "default": 0, + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "on_disk": { + "description": "Store HNSW index on disk. If set to false, index will be stored in RAM. Default: false", + "type": "boolean", + "nullable": true + }, + "payload_m": { + "description": "Custom M param for hnsw graph built for payload index. If not set, default M will be used.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfig": { + "type": "object", + "required": [ + "default_segment_number", + "deleted_threshold", + "flush_interval_sec", + "vacuum_min_vector_number" + ], + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "maximum": 1, + "minimum": 0 + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 100 + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads. If `default_segment_number = 0`, will be automatically selected by the number of available CPUs.", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexing speed is more important - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256 If not set, will be automatically selected considering the number of available CPUs.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.\n\nMemmap storage is disabled by default, to enable it, set this threshold to a reasonable value.\n\nTo disable memmap storage, set this to `0`. Internally it will use the largest threshold possible.\n\nNote: 1Kb = 1 vector of size 256", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing\n\nDefault value is 20,000, based on .\n\nTo disable vector indexing, set to `0`.\n\nNote: 1kB = 1 vector of size 256.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "max_optimization_threads": { + "description": "Max number of threads (jobs) for running optimizations per shard. Note: each optimization job will also use `max_indexing_threads` threads by itself for index building. If null - have no limit and choose dynamically to saturate CPU. If 0 - no optimization threads, optimizations will be disabled.", + "default": null, + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "WalConfig": { + "type": "object", + "required": [ + "wal_capacity_mb", + "wal_segments_ahead" + ], + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadIndexInfo": { + "description": "Display payload field type & index information", + "type": "object", + "required": [ + "data_type", + "points" + ], + "properties": { + "data_type": { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + "params": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaParams" + }, + { + "nullable": true + } + ] + }, + "points": { + "description": "Number of points indexed with this index", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "PayloadSchemaType": { + "description": "All possible names of payload types", + "type": "string", + "enum": [ + "keyword", + "integer", + "float", + "geo", + "text", + "bool", + "datetime" + ] + }, + "PayloadSchemaParams": { + "description": "Payload type with parameters", + "anyOf": [ + { + "$ref": "#/components/schemas/TextIndexParams" + }, + { + "$ref": "#/components/schemas/IntegerIndexParams" + } + ] + }, + "TextIndexParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/TextIndexType" + }, + "tokenizer": { + "$ref": "#/components/schemas/TokenizerType" + }, + "min_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_token_len": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lowercase": { + "description": "If true, lowercase all tokens. Default: true", + "type": "boolean", + "nullable": true + } + } + }, + "TextIndexType": { + "type": "string", + "enum": [ + "text" + ] + }, + "TokenizerType": { + "type": "string", + "enum": [ + "prefix", + "whitespace", + "word", + "multilingual" + ] + }, + "IntegerIndexParams": { + "type": "object", + "required": [ + "lookup", + "range", + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/IntegerIndexType" + }, + "lookup": { + "description": "If true - support direct lookups.", + "type": "boolean" + }, + "range": { + "description": "If true - support ranges filters.", + "type": "boolean" + } + } + }, + "IntegerIndexType": { + "type": "string", + "enum": [ + "integer" + ] + }, + "PointRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "ids": { + "description": "Look for points with ids", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + } + } + }, + "ShardKeySelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardKey" + } + } + ] + }, + "ShardKey": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + ] + }, + "ExtendedPointId": { + "description": "Type, used for specifying point ID in user interface", + "anyOf": [ + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "string", + "format": "uuid" + } + ] + }, + "WithPayloadInterface": { + "description": "Options for specifying which payload to include or not", + "anyOf": [ + { + "description": "If `true` - return all payload, If `false` - do not return payload", + "type": "boolean" + }, + { + "description": "Specify which fields to return", + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "#/components/schemas/PayloadSelector" + } + ] + }, + "PayloadSelector": { + "description": "Specifies how to treat payload selector", + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSelectorInclude" + }, + { + "$ref": "#/components/schemas/PayloadSelectorExclude" + } + ] + }, + "PayloadSelectorInclude": { + "type": "object", + "required": [ + "include" + ], + "properties": { + "include": { + "description": "Only include this payload keys", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "PayloadSelectorExclude": { + "type": "object", + "required": [ + "exclude" + ], + "properties": { + "exclude": { + "description": "Exclude this fields from returning payload", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "WithVector": { + "description": "Options for specifying which vector to include", + "anyOf": [ + { + "description": "If `true` - return all vector, If `false` - do not return vector", + "type": "boolean" + }, + { + "description": "Specify which vector to return", + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Record": { + "description": "Point data", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "description": "Shard Key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + } + } + }, + "Payload": { + "type": "object", + "additionalProperties": true + }, + "VectorStruct": { + "description": "Full vector data per point separator with single and multiple vector modes", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Vector" + } + } + ] + }, + "Vector": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/SparseVector" + } + ] + }, + "SparseVector": { + "description": "Sparse vector structure", + "type": "object", + "required": [ + "indices", + "values" + ], + "properties": { + "indices": { + "description": "indices must be unique", + "type": "array", + "items": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "values": { + "description": "values and indices must be the same length", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "SearchRequest": { + "description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.", + "type": "object", + "required": [ + "limit", + "vector" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + } + } + }, + "NamedVectorStruct": { + "description": "Vector data separator for named and unnamed modes Unnamed mode:\n\n{ \"vector\": [1.0, 2.0, 3.0] }\n\nor named mode:\n\n{ \"vector\": { \"vector\": [1.0, 2.0, 3.0], \"name\": \"image-embeddings\" } }", + "anyOf": [ + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/NamedVector" + }, + { + "$ref": "#/components/schemas/NamedSparseVector" + } + ] + }, + "NamedVector": { + "description": "Dense vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "description": "Vector data", + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "NamedSparseVector": { + "description": "Sparse vector data with name", + "type": "object", + "required": [ + "name", + "vector" + ], + "properties": { + "name": { + "description": "Name of vector data", + "type": "string" + }, + "vector": { + "$ref": "#/components/schemas/SparseVector" + } + } + }, + "Filter": { + "type": "object", + "properties": { + "should": { + "description": "At least one of those conditions should match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "min_should": { + "description": "At least minimum amount of given conditions should match", + "anyOf": [ + { + "$ref": "#/components/schemas/MinShould" + }, + { + "nullable": true + } + ] + }, + "must": { + "description": "All conditions must match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + }, + "must_not": { + "description": "All conditions must NOT match", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Condition": { + "anyOf": [ + { + "$ref": "#/components/schemas/FieldCondition" + }, + { + "$ref": "#/components/schemas/IsEmptyCondition" + }, + { + "$ref": "#/components/schemas/IsNullCondition" + }, + { + "$ref": "#/components/schemas/HasIdCondition" + }, + { + "$ref": "#/components/schemas/NestedCondition" + }, + { + "$ref": "#/components/schemas/Filter" + } + ] + }, + "FieldCondition": { + "description": "All possible payload filtering conditions", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key", + "type": "string" + }, + "match": { + "description": "Check if point has field with a given value", + "anyOf": [ + { + "$ref": "#/components/schemas/Match" + }, + { + "nullable": true + } + ] + }, + "range": { + "description": "Check if points value lies in a given range", + "anyOf": [ + { + "$ref": "#/components/schemas/RangeInterface" + }, + { + "nullable": true + } + ] + }, + "geo_bounding_box": { + "description": "Check if points geo location lies in a given area", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoBoundingBox" + }, + { + "nullable": true + } + ] + }, + "geo_radius": { + "description": "Check if geo point is within a given radius", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoRadius" + }, + { + "nullable": true + } + ] + }, + "geo_polygon": { + "description": "Check if geo point is within a given polygon", + "anyOf": [ + { + "$ref": "#/components/schemas/GeoPolygon" + }, + { + "nullable": true + } + ] + }, + "values_count": { + "description": "Check number of values of the field", + "anyOf": [ + { + "$ref": "#/components/schemas/ValuesCount" + }, + { + "nullable": true + } + ] + } + } + }, + "Match": { + "description": "Match filter request", + "anyOf": [ + { + "$ref": "#/components/schemas/MatchValue" + }, + { + "$ref": "#/components/schemas/MatchText" + }, + { + "$ref": "#/components/schemas/MatchAny" + }, + { + "$ref": "#/components/schemas/MatchExcept" + } + ] + }, + "MatchValue": { + "description": "Exact match of the given value", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/components/schemas/ValueVariants" + } + } + }, + "ValueVariants": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "boolean" + } + ] + }, + "MatchText": { + "description": "Full-text match of the strings.", + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string" + } + } + }, + "MatchAny": { + "description": "Exact match on any of the given values", + "type": "object", + "required": [ + "any" + ], + "properties": { + "any": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "AnyVariants": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "uniqueItems": true + } + ] + }, + "MatchExcept": { + "description": "Should have at least one value not matching the any given values", + "type": "object", + "required": [ + "except" + ], + "properties": { + "except": { + "$ref": "#/components/schemas/AnyVariants" + } + } + }, + "RangeInterface": { + "anyOf": [ + { + "$ref": "#/components/schemas/Range" + }, + { + "$ref": "#/components/schemas/DatetimeRange" + } + ] + }, + "Range": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "number", + "format": "double", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "number", + "format": "double", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "number", + "format": "double", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "DatetimeRange": { + "description": "Range filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key < range.lt", + "type": "string", + "format": "date-time", + "nullable": true + }, + "gt": { + "description": "point.key > range.gt", + "type": "string", + "format": "date-time", + "nullable": true + }, + "gte": { + "description": "point.key >= range.gte", + "type": "string", + "format": "date-time", + "nullable": true + }, + "lte": { + "description": "point.key <= range.lte", + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "GeoBoundingBox": { + "description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges", + "type": "object", + "required": [ + "bottom_right", + "top_left" + ], + "properties": { + "top_left": { + "$ref": "#/components/schemas/GeoPoint" + }, + "bottom_right": { + "$ref": "#/components/schemas/GeoPoint" + } + } + }, + "GeoPoint": { + "description": "Geo point payload schema", + "type": "object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lon": { + "type": "number", + "format": "double" + }, + "lat": { + "type": "number", + "format": "double" + } + } + }, + "GeoRadius": { + "description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`", + "type": "object", + "required": [ + "center", + "radius" + ], + "properties": { + "center": { + "$ref": "#/components/schemas/GeoPoint" + }, + "radius": { + "description": "Radius of the area in meters", + "type": "number", + "format": "double" + } + } + }, + "GeoPolygon": { + "description": "Geo filter request\n\nMatches coordinates inside the polygon, defined by `exterior` and `interiors`", + "type": "object", + "required": [ + "exterior" + ], + "properties": { + "exterior": { + "$ref": "#/components/schemas/GeoLineString" + }, + "interiors": { + "description": "Interior lines (if present) bound holes within the surface each GeoLineString must consist of a minimum of 4 points, and the first and last points must be the same.", + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoLineString" + }, + "nullable": true + } + } + }, + "GeoLineString": { + "description": "Ordered sequence of GeoPoints representing the line", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoPoint" + } + } + } + }, + "ValuesCount": { + "description": "Values count filter request", + "type": "object", + "properties": { + "lt": { + "description": "point.key.length() < values_count.lt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gt": { + "description": "point.key.length() > values_count.gt", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "gte": { + "description": "point.key.length() >= values_count.gte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "lte": { + "description": "point.key.length() <= values_count.lte", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "IsEmptyCondition": { + "description": "Select points with empty payload for a specified field", + "type": "object", + "required": [ + "is_empty" + ], + "properties": { + "is_empty": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "PayloadField": { + "description": "Payload field", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload field name", + "type": "string" + } + } + }, + "IsNullCondition": { + "description": "Select points with null payload for a specified field", + "type": "object", + "required": [ + "is_null" + ], + "properties": { + "is_null": { + "$ref": "#/components/schemas/PayloadField" + } + } + }, + "HasIdCondition": { + "description": "ID-based filtering condition", + "type": "object", + "required": [ + "has_id" + ], + "properties": { + "has_id": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "uniqueItems": true + } + } + }, + "NestedCondition": { + "type": "object", + "required": [ + "nested" + ], + "properties": { + "nested": { + "$ref": "#/components/schemas/Nested" + } + } + }, + "Nested": { + "description": "Select points with payload for a specified nested field", + "type": "object", + "required": [ + "filter", + "key" + ], + "properties": { + "key": { + "type": "string" + }, + "filter": { + "$ref": "#/components/schemas/Filter" + } + } + }, + "MinShould": { + "type": "object", + "required": [ + "conditions", + "min_count" + ], + "properties": { + "conditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + } + }, + "min_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "SearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "hnsw_ef": { + "description": "Params relevant to HNSW index Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "exact": { + "description": "Search without approximation. If set to true, search may run long but with exact results.", + "default": false, + "type": "boolean" + }, + "quantization": { + "description": "Quantization params", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationSearchParams" + }, + { + "nullable": true + } + ] + }, + "indexed_only": { + "description": "If enabled, the engine will only perform search among indexed or small segments. Using this option prevents slow searches in case of delayed index, but does not guarantee that all uploaded vectors will be included in search results", + "default": false, + "type": "boolean" + } + } + }, + "QuantizationSearchParams": { + "description": "Additional parameters of the search", + "type": "object", + "properties": { + "ignore": { + "description": "If true, quantized vectors are ignored. Default is false.", + "default": false, + "type": "boolean" + }, + "rescore": { + "description": "If true, use original vectors to re-score top-k results. Might require more time in case if original vectors are stored on disk. If not set, qdrant decides automatically apply rescoring or not.", + "default": null, + "type": "boolean", + "nullable": true + }, + "oversampling": { + "description": "Oversampling factor for quantization. Default is 1.0.\n\nDefines how many extra vectors should be pre-selected using quantized index, and then re-scored using original vectors.\n\nFor example, if `oversampling` is 2.4 and `limit` is 100, then 240 vectors will be pre-selected using quantized index, and then top-100 will be returned after re-scoring.", + "default": null, + "type": "number", + "format": "double", + "minimum": 1, + "nullable": true + } + } + }, + "ScoredPoint": { + "description": "Search result", + "type": "object", + "required": [ + "id", + "score", + "version" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "version": { + "description": "Point version", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "score": { + "description": "Points vector distance to the query vector", + "type": "number", + "format": "float" + }, + "payload": { + "description": "Payload - values assigned to the point", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector of the point", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStruct" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "description": "Shard Key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + } + } + }, + "UpdateResult": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "operation_id": { + "description": "Sequential number of the operation", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/UpdateStatus" + } + } + }, + "UpdateStatus": { + "description": "`Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.", + "type": "string", + "enum": [ + "acknowledged", + "completed" + ] + }, + "RecommendRequest": { + "description": "Recommendation request. Provides positive and negative examples of the vectors, which can be ids of points that are already stored in the collection, raw vectors, or even ids and vectors combined.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to the `strategy` chosen.", + "type": "object", + "required": [ + "limit" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "positive": { + "description": "Look for vectors closest to those", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "strategy": { + "description": "How to use positive and negative examples to find the results", + "anyOf": [ + { + "$ref": "#/components/schemas/RecommendStrategy" + }, + { + "nullable": true + } + ] + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "RecommendExample": { + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + { + "$ref": "#/components/schemas/SparseVector" + } + ] + }, + "RecommendStrategy": { + "description": "How to use positive and negative examples to find the results, default is `average_vector`:\n\n* `average_vector` - Average positive and negative vectors and create a single query with the formula `query = avg_pos + avg_pos - avg_neg`. Then performs normal search.\n\n* `best_score` - Uses custom search objective. Each candidate is compared against all examples, its score is then chosen from the `max(max_pos_score, max_neg_score)`. If the `max_neg_score` is chosen then it is squared and negated, otherwise it is just the `max_pos_score`.", + "type": "string", + "enum": [ + "average_vector", + "best_score" + ] + }, + "UsingVector": { + "anyOf": [ + { + "type": "string" + } + ] + }, + "LookupLocation": { + "description": "Defines a location to use for looking up the vector. Specifies collection and vector field name.", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection used for lookup", + "type": "string" + }, + "vector": { + "description": "Optional name of the vector field within the collection. If not provided, the default vector field will be used.", + "default": null, + "type": "string", + "nullable": true + }, + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "ScrollRequest": { + "description": "Scroll request - paginate over all points which matches given condition", + "type": "object", + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "offset": { + "description": "Start ID to read points from.", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Page size. Default: 10", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions. If not provided - all points.", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: All", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "$ref": "#/components/schemas/WithVector" + }, + "order_by": { + "description": "Order the records by a payload field.", + "anyOf": [ + { + "$ref": "#/components/schemas/OrderByInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "OrderByInterface": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/OrderBy" + } + ] + }, + "OrderBy": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "Payload key to order by", + "type": "string" + }, + "direction": { + "description": "Direction of ordering: `asc` or `desc`. Default is ascending.", + "anyOf": [ + { + "$ref": "#/components/schemas/Direction" + }, + { + "nullable": true + } + ] + }, + "start_from": { + "description": "Which payload value to start scrolling from. Default is the lowest value for `asc` and the highest for `desc`", + "anyOf": [ + { + "$ref": "#/components/schemas/StartFrom" + }, + { + "nullable": true + } + ] + } + } + }, + "Direction": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "StartFrom": { + "anyOf": [ + { + "type": "integer", + "format": "int64" + }, + { + "type": "number", + "format": "double" + }, + { + "type": "string", + "format": "date-time" + } + ] + }, + "ScrollResult": { + "description": "Result of the points read request", + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "List of retrieved points", + "type": "array", + "items": { + "$ref": "#/components/schemas/Record" + } + }, + "next_page_offset": { + "description": "Offset which should be used to retrieve a next page result", + "anyOf": [ + { + "$ref": "#/components/schemas/ExtendedPointId" + }, + { + "nullable": true + } + ] + } + } + }, + "CreateCollection": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "properties": { + "vectors": { + "$ref": "#/components/schemas/VectorsConfig" + }, + "shard_number": { + "description": "For auto sharding: Number of shards in collection. - Default is 1 for standalone, otherwise equal to the number of nodes - Minimum is 1 For custom sharding: Number of shards in collection per shard group. - Default is 1, meaning that each shard key will be mapped to a single shard - Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "sharding_method": { + "description": "Sharding method Default is Auto - points are distributed across all available shards Custom - points are distributed across shards according to shard key", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/ShardingMethod" + }, + { + "nullable": true + } + ] + }, + "replication_factor": { + "description": "Number of shards replicas. Default is 1 Minimum is 1", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Defines how many replicas should apply the operation for us to consider it successful. Increasing this number will make the collection more resilient to inconsistencies, but will also make it fail if not enough replicas are available. Does not have any performance impact.", + "default": null, + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + }, + "hnsw_config": { + "description": "Custom params for HNSW index. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "wal_config": { + "description": "Custom params for WAL. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/WalConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - values from service configuration file are used.", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "init_from": { + "description": "Specify other collection to copy data from.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/InitFrom" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Quantization parameters. If none - quantization is disabled.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + }, + "sparse_vectors": { + "description": "Sparse vector data config.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorParams" + }, + "nullable": true + } + } + }, + "WalConfigDiff": { + "type": "object", + "properties": { + "wal_capacity_mb": { + "description": "Size of a single WAL segment in MB", + "type": "integer", + "format": "uint", + "minimum": 1, + "nullable": true + }, + "wal_segments_ahead": { + "description": "Number of WAL segments to create ahead of actually used ones", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizersConfigDiff": { + "type": "object", + "properties": { + "deleted_threshold": { + "description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization", + "type": "number", + "format": "double", + "nullable": true + }, + "vacuum_min_vector_number": { + "description": "The minimal number of vectors in a segment, required to perform segment optimization", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "default_segment_number": { + "description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads If `default_segment_number = 0`, will be automatically selected by the number of available CPUs", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "max_segment_size": { + "description": "Do not create segments larger this size (in kilobytes). Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher. Note: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "memmap_threshold": { + "description": "Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.\n\nMemmap storage is disabled by default, to enable it, set this threshold to a reasonable value.\n\nTo disable memmap storage, set this to `0`.\n\nNote: 1Kb = 1 vector of size 256", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "indexing_threshold": { + "description": "Maximum size (in kilobytes) of vectors allowed for plain index, exceeding this threshold will enable vector indexing\n\nDefault value is 20,000, based on .\n\nTo disable vector indexing, set to `0`.\n\nNote: 1kB = 1 vector of size 256.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "flush_interval_sec": { + "description": "Minimum interval between forced flushes.", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "max_optimization_threads": { + "description": "Max number of threads (jobs) for running optimizations per shard. Note: each optimization job will also use `max_indexing_threads` threads by itself for index building. If null - have no limit and choose dynamically to saturate CPU. If 0 - no optimization threads, optimizations will be disabled.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "InitFrom": { + "description": "Operation for creating new collection and (optionally) specify index params", + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "type": "string" + } + } + }, + "UpdateCollection": { + "description": "Operation for updating parameters of the existing collection", + "type": "object", + "properties": { + "vectors": { + "description": "Map of vector data parameters to update for each named vector. To update parameters in a collection having a single unnamed vector, use an empty string as name.", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorsConfigDiff" + }, + { + "nullable": true + } + ] + }, + "optimizers_config": { + "description": "Custom params for Optimizers. If none - it is left unchanged. This operation is blocking, it will only proceed once all current optimizations are complete", + "anyOf": [ + { + "$ref": "#/components/schemas/OptimizersConfigDiff" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Collection base params. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionParamsDiff" + }, + { + "nullable": true + } + ] + }, + "hnsw_config": { + "description": "HNSW parameters to update for the collection index. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Quantization parameters to update. If none - it is left unchanged.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfigDiff" + }, + { + "nullable": true + } + ] + }, + "sparse_vectors": { + "description": "Map of sparse vector data parameters to update for each sparse vector.", + "anyOf": [ + { + "$ref": "#/components/schemas/SparseVectorsConfig" + }, + { + "nullable": true + } + ] + } + } + }, + "VectorsConfigDiff": { + "description": "Vector update params for multiple vectors\n\n{ \"vector_name\": { \"hnsw_config\": { \"m\": 8 } } }", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorParamsDiff" + } + }, + "VectorParamsDiff": { + "type": "object", + "properties": { + "hnsw_config": { + "description": "Update params for HNSW index. If empty object - it will be unset.", + "anyOf": [ + { + "$ref": "#/components/schemas/HnswConfigDiff" + }, + { + "nullable": true + } + ] + }, + "quantization_config": { + "description": "Update params for quantization. If none - it is left unchanged.", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfigDiff" + }, + { + "nullable": true + } + ] + }, + "on_disk": { + "description": "If true, vectors are served from disk, improving RAM usage at the cost of latency", + "type": "boolean", + "nullable": true + } + } + }, + "QuantizationConfigDiff": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScalarQuantization" + }, + { + "$ref": "#/components/schemas/ProductQuantization" + }, + { + "$ref": "#/components/schemas/BinaryQuantization" + }, + { + "$ref": "#/components/schemas/Disabled" + } + ] + }, + "Disabled": { + "type": "string", + "enum": [ + "Disabled" + ] + }, + "CollectionParamsDiff": { + "type": "object", + "properties": { + "replication_factor": { + "description": "Number of replicas for each shard", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "write_consistency_factor": { + "description": "Minimal number successful responses from replicas to consider operation successful", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "read_fan_out_factor": { + "description": "Fan-out every read request to these many additional remote nodes (and return first available response)", + "type": "integer", + "format": "uint32", + "minimum": 0, + "nullable": true + }, + "on_disk_payload": { + "description": "If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM.", + "default": null, + "type": "boolean", + "nullable": true + } + } + }, + "SparseVectorsConfig": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorParams" + } + }, + "ChangeAliasesOperation": { + "description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.", + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasOperations" + } + } + } + }, + "AliasOperations": { + "description": "Group of all the possible operations related to collection aliases", + "anyOf": [ + { + "$ref": "#/components/schemas/CreateAliasOperation" + }, + { + "$ref": "#/components/schemas/DeleteAliasOperation" + }, + { + "$ref": "#/components/schemas/RenameAliasOperation" + } + ] + }, + "CreateAliasOperation": { + "type": "object", + "required": [ + "create_alias" + ], + "properties": { + "create_alias": { + "$ref": "#/components/schemas/CreateAlias" + } + } + }, + "CreateAlias": { + "description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,", + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "collection_name": { + "type": "string" + }, + "alias_name": { + "type": "string" + } + } + }, + "DeleteAliasOperation": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "delete_alias" + ], + "properties": { + "delete_alias": { + "$ref": "#/components/schemas/DeleteAlias" + } + } + }, + "DeleteAlias": { + "description": "Delete alias if exists", + "type": "object", + "required": [ + "alias_name" + ], + "properties": { + "alias_name": { + "type": "string" + } + } + }, + "RenameAliasOperation": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "rename_alias" + ], + "properties": { + "rename_alias": { + "$ref": "#/components/schemas/RenameAlias" + } + } + }, + "RenameAlias": { + "description": "Change alias to a new one", + "type": "object", + "required": [ + "new_alias_name", + "old_alias_name" + ], + "properties": { + "old_alias_name": { + "type": "string" + }, + "new_alias_name": { + "type": "string" + } + } + }, + "CreateFieldIndex": { + "type": "object", + "required": [ + "field_name" + ], + "properties": { + "field_name": { + "type": "string" + }, + "field_schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadFieldSchema" + }, + { + "nullable": true + } + ] + } + } + }, + "PayloadFieldSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PayloadSchemaType" + }, + { + "$ref": "#/components/schemas/PayloadSchemaParams" + } + ] + }, + "PointsSelector": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointIdsList" + }, + { + "$ref": "#/components/schemas/FilterSelector" + } + ] + }, + "PointIdsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "FilterSelector": { + "type": "object", + "required": [ + "filter" + ], + "properties": { + "filter": { + "$ref": "#/components/schemas/Filter" + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointInsertOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/PointsBatch" + }, + { + "$ref": "#/components/schemas/PointsList" + } + ] + }, + "PointsBatch": { + "type": "object", + "required": [ + "batch" + ], + "properties": { + "batch": { + "$ref": "#/components/schemas/Batch" + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "Batch": { + "type": "object", + "required": [ + "ids", + "vectors" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + } + }, + "vectors": { + "$ref": "#/components/schemas/BatchVectorStruct" + }, + "payloads": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + }, + "nullable": true + } + } + }, + "BatchVectorStruct": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + }, + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Vector" + } + } + } + ] + }, + "PointsList": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointStruct" + } + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointStruct": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + }, + "payload": { + "description": "Payload values (optional)", + "anyOf": [ + { + "$ref": "#/components/schemas/Payload" + }, + { + "nullable": true + } + ] + } + } + }, + "SetPayload": { + "description": "This data structure is used in API interface and applied across multiple shards", + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "$ref": "#/components/schemas/Payload" + }, + "points": { + "description": "Assigns payload to each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Assigns payload to each point that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "key": { + "description": "Assigns payload to each point that satisfy this path of property", + "type": "string", + "nullable": true + } + } + }, + "DeletePayload": { + "description": "This data structure is used in API interface and applied across multiple shards", + "type": "object", + "required": [ + "keys" + ], + "properties": { + "keys": { + "description": "List of payload keys to remove from payload", + "type": "array", + "items": { + "type": "string" + } + }, + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatus": { + "description": "Information about current cluster status and structure", + "oneOf": [ + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "disabled" + ] + } + } + }, + { + "description": "Description of enabled cluster", + "type": "object", + "required": [ + "consensus_thread_status", + "message_send_failures", + "peer_id", + "peers", + "raft_info", + "status" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "peers": { + "description": "Peers composition of the cluster with main information", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PeerInfo" + } + }, + "raft_info": { + "$ref": "#/components/schemas/RaftInfo" + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + }, + "message_send_failures": { + "description": "Consequent failures of message send operations in consensus by peer address. On the first success to send to that peer - entry is removed from this hashmap.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MessageSendErrors" + } + } + } + } + ] + }, + "PeerInfo": { + "description": "Information of a peer in the cluster", + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string" + } + } + }, + "RaftInfo": { + "description": "Summary information about the current raft state", + "type": "object", + "required": [ + "commit", + "is_voter", + "pending_operations", + "term" + ], + "properties": { + "term": { + "description": "Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "description": "The index of the latest committed (finalized) operation that this peer is aware of.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "description": "Number of consensus operations pending to be applied on this peer", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "leader": { + "description": "Leader of the current term", + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "role": { + "description": "Role of this peer in the current term", + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "description": "Is this peer a voter or a learner", + "type": "boolean" + } + } + }, + "StateRole": { + "description": "Role of the peer in the consensus", + "type": "string", + "enum": [ + "Follower", + "Candidate", + "Leader", + "PreCandidate" + ] + }, + "ConsensusThreadStatus": { + "description": "Information about current consensus thread status", + "oneOf": [ + { + "type": "object", + "required": [ + "consensus_thread_status", + "last_update" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "working" + ] + }, + "last_update": { + "type": "string", + "format": "date-time" + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped" + ] + } + } + }, + { + "type": "object", + "required": [ + "consensus_thread_status", + "err" + ], + "properties": { + "consensus_thread_status": { + "type": "string", + "enum": [ + "stopped_with_err" + ] + }, + "err": { + "type": "string" + } + } + } + ] + }, + "MessageSendErrors": { + "description": "Message send failures for a particular peer", + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "latest_error": { + "type": "string", + "nullable": true + }, + "latest_error_timestamp": { + "description": "Timestamp of the latest error", + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "SnapshotDescription": { + "type": "object", + "required": [ + "name", + "size" + ], + "properties": { + "name": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "partial-date-time", + "nullable": true + }, + "size": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "checksum": { + "type": "string", + "nullable": true + } + } + }, + "CountRequest": { + "description": "Count Request Counts the number of points which satisfy the given filter. If filter is not provided, the count of all points in the collection will be returned.", + "type": "object", + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "exact": { + "description": "If true, count exact number of points. If false, count approximate number of points faster. Approximate count might be unreliable during the indexing process. Default: true", + "default": true, + "type": "boolean" + } + } + }, + "CountResult": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "description": "Number of points which satisfy the conditions", + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "CollectionClusterInfo": { + "description": "Current clustering distribution for the collection", + "type": "object", + "required": [ + "local_shards", + "peer_id", + "remote_shards", + "shard_count", + "shard_transfers" + ], + "properties": { + "peer_id": { + "description": "ID of this peer", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "shard_count": { + "description": "Total number of shards", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "local_shards": { + "description": "Local shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalShardInfo" + } + }, + "remote_shards": { + "description": "Remote shards", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardInfo" + } + }, + "shard_transfers": { + "description": "Shard transfers", + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "LocalShardInfo": { + "type": "object", + "required": [ + "points_count", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Local shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "shard_key": { + "description": "User-defined sharding key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + }, + "points_count": { + "description": "Number of points in the shard", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ReplicaState": { + "description": "State of the single shard within a replica set.", + "type": "string", + "enum": [ + "Active", + "Dead", + "Partial", + "Initializing", + "Listener", + "PartialSnapshot", + "Recovery" + ] + }, + "RemoteShardInfo": { + "type": "object", + "required": [ + "peer_id", + "shard_id", + "state" + ], + "properties": { + "shard_id": { + "description": "Remote shard id", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "shard_key": { + "description": "User-defined sharding key", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKey" + }, + { + "nullable": true + } + ] + }, + "peer_id": { + "description": "Remote peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "state": { + "$ref": "#/components/schemas/ReplicaState" + } + } + }, + "ShardTransferInfo": { + "type": "object", + "required": [ + "from", + "shard_id", + "sync", + "to" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from": { + "description": "Source peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to": { + "description": "Destination peer id", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "sync": { + "description": "If `true` transfer is a synchronization of a replicas If `false` transfer is a moving of a shard from one peer to another", + "type": "boolean" + }, + "method": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardTransferMethod" + }, + { + "nullable": true + } + ] + }, + "comment": { + "description": "A human-readable report of the transfer progress. Available only on the source peer.", + "type": "string", + "nullable": true + } + } + }, + "ShardTransferMethod": { + "description": "Methods for transferring a shard from one node to another.", + "oneOf": [ + { + "description": "Stream all shard records in batches until the whole shard is transferred.", + "type": "string", + "enum": [ + "stream_records" + ] + }, + { + "description": "Snapshot the shard, transfer and restore it on the receiver.", + "type": "string", + "enum": [ + "snapshot" + ] + }, + { + "description": "Attempt to transfer shard difference by WAL delta.", + "type": "string", + "enum": [ + "wal_delta" + ] + } + ] + }, + "TelemetryData": { + "type": "object", + "required": [ + "app", + "cluster", + "collections", + "id", + "requests" + ], + "properties": { + "id": { + "type": "string" + }, + "app": { + "$ref": "#/components/schemas/AppBuildTelemetry" + }, + "collections": { + "$ref": "#/components/schemas/CollectionsTelemetry" + }, + "cluster": { + "$ref": "#/components/schemas/ClusterTelemetry" + }, + "requests": { + "$ref": "#/components/schemas/RequestsTelemetry" + } + } + }, + "AppBuildTelemetry": { + "type": "object", + "required": [ + "name", + "startup", + "version" + ], + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "features": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppFeaturesTelemetry" + }, + { + "nullable": true + } + ] + }, + "system": { + "anyOf": [ + { + "$ref": "#/components/schemas/RunningEnvironmentTelemetry" + }, + { + "nullable": true + } + ] + }, + "jwt_rbac": { + "type": "boolean", + "nullable": true + }, + "startup": { + "type": "string", + "format": "date-time" + } + } + }, + "AppFeaturesTelemetry": { + "type": "object", + "required": [ + "debug", + "recovery_mode", + "service_debug_feature", + "web_feature" + ], + "properties": { + "debug": { + "type": "boolean" + }, + "web_feature": { + "type": "boolean" + }, + "service_debug_feature": { + "type": "boolean" + }, + "recovery_mode": { + "type": "boolean" + } + } + }, + "RunningEnvironmentTelemetry": { + "type": "object", + "required": [ + "cpu_flags", + "is_docker" + ], + "properties": { + "distribution": { + "type": "string", + "nullable": true + }, + "distribution_version": { + "type": "string", + "nullable": true + }, + "is_docker": { + "type": "boolean" + }, + "cores": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "ram_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "disk_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "cpu_flags": { + "type": "string" + } + } + }, + "CollectionsTelemetry": { + "type": "object", + "required": [ + "number_of_collections" + ], + "properties": { + "number_of_collections": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectionTelemetryEnum" + }, + "nullable": true + } + } + }, + "CollectionTelemetryEnum": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectionTelemetry" + }, + { + "$ref": "#/components/schemas/CollectionsAggregatedTelemetry" + } + ] + }, + "CollectionTelemetry": { + "type": "object", + "required": [ + "config", + "id", + "init_time_ms", + "shards", + "transfers" + ], + "properties": { + "id": { + "type": "string" + }, + "init_time_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "config": { + "$ref": "#/components/schemas/CollectionConfig" + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReplicaSetTelemetry" + } + }, + "transfers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardTransferInfo" + } + } + } + }, + "ReplicaSetTelemetry": { + "type": "object", + "required": [ + "id", + "remote", + "replicate_states" + ], + "properties": { + "id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "local": { + "anyOf": [ + { + "$ref": "#/components/schemas/LocalShardTelemetry" + }, + { + "nullable": true + } + ] + }, + "remote": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteShardTelemetry" + } + }, + "replicate_states": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ReplicaState" + } + } + } + }, + "LocalShardTelemetry": { + "type": "object", + "required": [ + "optimizations", + "segments" + ], + "properties": { + "variant_name": { + "type": "string", + "nullable": true + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SegmentTelemetry" + } + }, + "optimizations": { + "$ref": "#/components/schemas/OptimizerTelemetry" + } + } + }, + "SegmentTelemetry": { + "type": "object", + "required": [ + "config", + "info", + "payload_field_indices", + "vector_index_searches" + ], + "properties": { + "info": { + "$ref": "#/components/schemas/SegmentInfo" + }, + "config": { + "$ref": "#/components/schemas/SegmentConfig" + }, + "vector_index_searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VectorIndexSearchesTelemetry" + } + }, + "payload_field_indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PayloadIndexTelemetry" + } + } + } + }, + "SegmentInfo": { + "description": "Aggregated information about segment", + "type": "object", + "required": [ + "disk_usage_bytes", + "index_schema", + "is_appendable", + "num_deleted_vectors", + "num_indexed_vectors", + "num_points", + "num_vectors", + "ram_usage_bytes", + "segment_type", + "vector_data" + ], + "properties": { + "segment_type": { + "$ref": "#/components/schemas/SegmentType" + }, + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_points": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_indexed_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "ram_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "disk_usage_bytes": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "is_appendable": { + "type": "boolean" + }, + "index_schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PayloadIndexInfo" + } + }, + "vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataInfo" + } + } + } + }, + "SegmentType": { + "description": "Type of segment", + "type": "string", + "enum": [ + "plain", + "indexed", + "special" + ] + }, + "VectorDataInfo": { + "type": "object", + "required": [ + "num_deleted_vectors", + "num_indexed_vectors", + "num_vectors" + ], + "properties": { + "num_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_indexed_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "num_deleted_vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "SegmentConfig": { + "type": "object", + "required": [ + "payload_storage_type" + ], + "properties": { + "vector_data": { + "default": {}, + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VectorDataConfig" + } + }, + "sparse_vector_data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SparseVectorDataConfig" + } + }, + "payload_storage_type": { + "$ref": "#/components/schemas/PayloadStorageType" + } + } + }, + "VectorDataConfig": { + "description": "Config of single vector data storage", + "type": "object", + "required": [ + "distance", + "index", + "size", + "storage_type" + ], + "properties": { + "size": { + "description": "Size/dimensionality of the vectors used", + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "distance": { + "$ref": "#/components/schemas/Distance" + }, + "storage_type": { + "$ref": "#/components/schemas/VectorStorageType" + }, + "index": { + "$ref": "#/components/schemas/Indexes" + }, + "quantization_config": { + "description": "Vector specific quantization config that overrides collection config", + "anyOf": [ + { + "$ref": "#/components/schemas/QuantizationConfig" + }, + { + "nullable": true + } + ] + }, + "multi_vec_config": { + "description": "Vector specific configuration to enable multiple vectors per point", + "anyOf": [ + { + "$ref": "#/components/schemas/MultiVectorConfig" + }, + { + "nullable": true + } + ] + }, + "datatype": { + "description": "Vector specific configuration to set specific storage element type", + "anyOf": [ + { + "$ref": "#/components/schemas/VectorStorageDatatype" + }, + { + "nullable": true + } + ] + } + } + }, + "VectorStorageType": { + "description": "Storage types for vectors", + "oneOf": [ + { + "description": "Storage in memory (RAM)\n\nWill be very fast at the cost of consuming a lot of memory.", + "type": "string", + "enum": [ + "Memory" + ] + }, + { + "description": "Storage in mmap file, not appendable\n\nSearch performance is defined by disk speed and the fraction of vectors that fit in memory.", + "type": "string", + "enum": [ + "Mmap" + ] + }, + { + "description": "Storage in chunked mmap files, appendable\n\nSearch performance is defined by disk speed and the fraction of vectors that fit in memory.", + "type": "string", + "enum": [ + "ChunkedMmap" + ] + } + ] + }, + "Indexes": { + "description": "Vector index configuration", + "oneOf": [ + { + "description": "Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "plain" + ] + }, + "options": { + "type": "object" + } + } + }, + { + "description": "Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.", + "type": "object", + "required": [ + "options", + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "hnsw" + ] + }, + "options": { + "$ref": "#/components/schemas/HnswConfig" + } + } + } + ] + }, + "MultiVectorConfig": { + "oneOf": [ + { + "type": "object", + "required": [ + "MaxSim" + ], + "properties": { + "MaxSim": { + "$ref": "#/components/schemas/MaxSimConfig" + } + }, + "additionalProperties": false + } + ] + }, + "MaxSimConfig": { + "type": "object" + }, + "VectorStorageDatatype": { + "description": "Storage types for vectors", + "type": "string", + "enum": [ + "float32", + "uint8" + ] + }, + "SparseVectorDataConfig": { + "description": "Config of single sparse vector data storage", + "type": "object", + "required": [ + "index" + ], + "properties": { + "index": { + "$ref": "#/components/schemas/SparseIndexConfig" + } + } + }, + "SparseIndexConfig": { + "description": "Configuration for sparse inverted index.", + "type": "object", + "required": [ + "index_type" + ], + "properties": { + "full_scan_threshold": { + "description": "We prefer a full scan search upto (excluding) this number of vectors.\n\nNote: this is number of vectors, not KiloBytes.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "index_type": { + "$ref": "#/components/schemas/SparseIndexType" + } + } + }, + "SparseIndexType": { + "description": "Sparse index types", + "oneOf": [ + { + "description": "Mutable RAM sparse index", + "type": "string", + "enum": [ + "MutableRam" + ] + }, + { + "description": "Immutable RAM sparse index", + "type": "string", + "enum": [ + "ImmutableRam" + ] + }, + { + "description": "Mmap sparse index", + "type": "string", + "enum": [ + "Mmap" + ] + } + ] + }, + "PayloadStorageType": { + "description": "Type of payload storage", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "in_memory" + ] + } + } + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "on_disk" + ] + } + } + } + ] + }, + "VectorIndexSearchesTelemetry": { + "type": "object", + "required": [ + "filtered_exact", + "filtered_large_cardinality", + "filtered_plain", + "filtered_small_cardinality", + "filtered_sparse", + "unfiltered_exact", + "unfiltered_hnsw", + "unfiltered_plain", + "unfiltered_sparse" + ], + "properties": { + "index_name": { + "type": "string", + "nullable": true + }, + "unfiltered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_hnsw": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_sparse": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_plain": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_small_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_large_cardinality": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "filtered_sparse": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "unfiltered_exact": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "OperationDurationStatistics": { + "type": "object", + "required": [ + "count", + "total_duration_micros" + ], + "properties": { + "count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "fail_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "avg_duration_micros": { + "description": "The average time taken by 128 latest operations, calculated as a weighted mean.", + "type": "number", + "format": "float", + "nullable": true + }, + "min_duration_micros": { + "description": "The minimum duration of the operations across all the measurements.", + "type": "number", + "format": "float", + "nullable": true + }, + "max_duration_micros": { + "description": "The maximum duration of the operations across all the measurements.", + "type": "number", + "format": "float", + "nullable": true + }, + "total_duration_micros": { + "description": "The total duration of all operations in microseconds.", + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "last_responded": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "PayloadIndexTelemetry": { + "type": "object", + "required": [ + "points_count", + "points_values_count" + ], + "properties": { + "field_name": { + "type": "string", + "nullable": true + }, + "points_values_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "points_count": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "histogram_bucket_size": { + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + } + } + }, + "OptimizerTelemetry": { + "type": "object", + "required": [ + "log", + "optimizations", + "status" + ], + "properties": { + "status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "optimizations": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "log": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TrackerTelemetry" + } + } + } + }, + "TrackerTelemetry": { + "description": "Tracker object used in telemetry", + "type": "object", + "required": [ + "name", + "segment_ids", + "start_at", + "status" + ], + "properties": { + "name": { + "description": "Name of the optimizer", + "type": "string" + }, + "segment_ids": { + "description": "Segment IDs being optimized", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + }, + "status": { + "$ref": "#/components/schemas/TrackerStatus" + }, + "start_at": { + "description": "Start time of the optimizer", + "type": "string", + "format": "date-time" + }, + "end_at": { + "description": "End time of the optimizer", + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "TrackerStatus": { + "description": "Represents the current state of the optimizer being tracked", + "oneOf": [ + { + "type": "string", + "enum": [ + "optimizing", + "done" + ] + }, + { + "type": "object", + "required": [ + "cancelled" + ], + "properties": { + "cancelled": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "RemoteShardTelemetry": { + "type": "object", + "required": [ + "searches", + "shard_id", + "updates" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "searches": { + "$ref": "#/components/schemas/OperationDurationStatistics" + }, + "updates": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + }, + "CollectionsAggregatedTelemetry": { + "type": "object", + "required": [ + "optimizers_status", + "params", + "vectors" + ], + "properties": { + "vectors": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "optimizers_status": { + "$ref": "#/components/schemas/OptimizersStatus" + }, + "params": { + "$ref": "#/components/schemas/CollectionParams" + } + } + }, + "ClusterTelemetry": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterStatusTelemetry" + }, + { + "nullable": true + } + ] + }, + "config": { + "anyOf": [ + { + "$ref": "#/components/schemas/ClusterConfigTelemetry" + }, + { + "nullable": true + } + ] + } + } + }, + "ClusterStatusTelemetry": { + "type": "object", + "required": [ + "commit", + "consensus_thread_status", + "is_voter", + "number_of_peers", + "pending_operations", + "term" + ], + "properties": { + "number_of_peers": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "term": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "commit": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "pending_operations": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "role": { + "anyOf": [ + { + "$ref": "#/components/schemas/StateRole" + }, + { + "nullable": true + } + ] + }, + "is_voter": { + "type": "boolean" + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0, + "nullable": true + }, + "consensus_thread_status": { + "$ref": "#/components/schemas/ConsensusThreadStatus" + } + } + }, + "ClusterConfigTelemetry": { + "type": "object", + "required": [ + "consensus", + "grpc_timeout_ms", + "p2p" + ], + "properties": { + "grpc_timeout_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "p2p": { + "$ref": "#/components/schemas/P2pConfigTelemetry" + }, + "consensus": { + "$ref": "#/components/schemas/ConsensusConfigTelemetry" + } + } + }, + "P2pConfigTelemetry": { + "type": "object", + "required": [ + "connection_pool_size" + ], + "properties": { + "connection_pool_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + } + } + }, + "ConsensusConfigTelemetry": { + "type": "object", + "required": [ + "bootstrap_timeout_sec", + "max_message_queue_size", + "tick_period_ms" + ], + "properties": { + "max_message_queue_size": { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + "tick_period_ms": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "bootstrap_timeout_sec": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "RequestsTelemetry": { + "type": "object", + "required": [ + "grpc", + "rest" + ], + "properties": { + "rest": { + "$ref": "#/components/schemas/WebApiTelemetry" + }, + "grpc": { + "$ref": "#/components/schemas/GrpcTelemetry" + } + } + }, + "WebApiTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + } + }, + "GrpcTelemetry": { + "type": "object", + "required": [ + "responses" + ], + "properties": { + "responses": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OperationDurationStatistics" + } + } + } + }, + "ClusterOperations": { + "anyOf": [ + { + "$ref": "#/components/schemas/MoveShardOperation" + }, + { + "$ref": "#/components/schemas/ReplicateShardOperation" + }, + { + "$ref": "#/components/schemas/AbortTransferOperation" + }, + { + "$ref": "#/components/schemas/DropReplicaOperation" + }, + { + "$ref": "#/components/schemas/CreateShardingKeyOperation" + }, + { + "$ref": "#/components/schemas/DropShardingKeyOperation" + }, + { + "$ref": "#/components/schemas/RestartTransferOperation" + } + ] + }, + "MoveShardOperation": { + "type": "object", + "required": [ + "move_shard" + ], + "properties": { + "move_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "MoveShard": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "method": { + "description": "Method for transferring the shard from one node to another", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardTransferMethod" + }, + { + "nullable": true + } + ] + } + } + }, + "ReplicateShardOperation": { + "type": "object", + "required": [ + "replicate_shard" + ], + "properties": { + "replicate_shard": { + "$ref": "#/components/schemas/MoveShard" + } + } + }, + "AbortTransferOperation": { + "type": "object", + "required": [ + "abort_transfer" + ], + "properties": { + "abort_transfer": { + "$ref": "#/components/schemas/AbortShardTransfer" + } + } + }, + "AbortShardTransfer": { + "type": "object", + "required": [ + "from_peer_id", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "DropReplicaOperation": { + "type": "object", + "required": [ + "drop_replica" + ], + "properties": { + "drop_replica": { + "$ref": "#/components/schemas/Replica" + } + } + }, + "Replica": { + "type": "object", + "required": [ + "peer_id", + "shard_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + } + } + }, + "CreateShardingKeyOperation": { + "type": "object", + "required": [ + "create_sharding_key" + ], + "properties": { + "create_sharding_key": { + "$ref": "#/components/schemas/CreateShardingKey" + } + } + }, + "CreateShardingKey": { + "type": "object", + "required": [ + "shard_key" + ], + "properties": { + "shard_key": { + "$ref": "#/components/schemas/ShardKey" + }, + "shards_number": { + "description": "How many shards to create for this key If not specified, will use the default value from config", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "replication_factor": { + "description": "How many replicas to create for each shard If not specified, will use the default value from config", + "type": "integer", + "format": "uint32", + "minimum": 1, + "nullable": true + }, + "placement": { + "description": "Placement of shards for this key List of peer ids, that can be used to place shards for this key If not specified, will be randomly placed among all peers", + "type": "array", + "items": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "nullable": true + } + } + }, + "DropShardingKeyOperation": { + "type": "object", + "required": [ + "drop_sharding_key" + ], + "properties": { + "drop_sharding_key": { + "$ref": "#/components/schemas/DropShardingKey" + } + } + }, + "DropShardingKey": { + "type": "object", + "required": [ + "shard_key" + ], + "properties": { + "shard_key": { + "$ref": "#/components/schemas/ShardKey" + } + } + }, + "RestartTransferOperation": { + "type": "object", + "required": [ + "restart_transfer" + ], + "properties": { + "restart_transfer": { + "$ref": "#/components/schemas/RestartTransfer" + } + } + }, + "RestartTransfer": { + "type": "object", + "required": [ + "from_peer_id", + "method", + "shard_id", + "to_peer_id" + ], + "properties": { + "shard_id": { + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "from_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "to_peer_id": { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "method": { + "$ref": "#/components/schemas/ShardTransferMethod" + } + } + }, + "SearchRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchRequest" + } + } + } + }, + "RecommendRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendRequest" + } + } + } + }, + "LocksOption": { + "type": "object", + "required": [ + "write" + ], + "properties": { + "error_message": { + "type": "string", + "nullable": true + }, + "write": { + "type": "boolean" + } + } + }, + "SnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "description": "Examples: - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot` - Local path `file:///qdrant/snapshots/test_collection-2022-08-04-10-49-10.snapshot`", + "type": "string", + "format": "uri" + }, + "priority": { + "description": "Defines which data should be used as a source of truth if there are other replicas in the cluster. If set to `Snapshot`, the snapshot will be used as a source of truth, and the current state will be overwritten. If set to `Replica`, the current state will be used as a source of truth, and after recovery if will be synchronized with the snapshot.", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/SnapshotPriority" + }, + { + "nullable": true + } + ] + }, + "checksum": { + "description": "Optional SHA256 checksum to verify snapshot integrity before recovery.", + "default": null, + "type": "string", + "nullable": true + } + } + }, + "SnapshotPriority": { + "description": "Defines source of truth for snapshot recovery: `NoSync` means - restore snapshot without *any* additional synchronization. `Snapshot` means - prefer snapshot data over the current state. `Replica` means - prefer existing data over the snapshot.", + "type": "string", + "enum": [ + "no_sync", + "snapshot", + "replica" + ] + }, + "CollectionsAliasesResponse": { + "type": "object", + "required": [ + "aliases" + ], + "properties": { + "aliases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AliasDescription" + } + } + } + }, + "AliasDescription": { + "type": "object", + "required": [ + "alias_name", + "collection_name" + ], + "properties": { + "alias_name": { + "type": "string" + }, + "collection_name": { + "type": "string" + } + } + }, + "WriteOrdering": { + "description": "Defines write ordering guarantees for collection operations\n\n* `weak` - write operations may be reordered, works faster, default\n\n* `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change\n\n* `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down", + "type": "string", + "enum": [ + "weak", + "medium", + "strong" + ] + }, + "ReadConsistency": { + "description": "Read consistency parameter\n\nDefines how many replicas should be queried to get the result\n\n* `N` - send N random request and return points, which present on all of them\n\n* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of them\n\n* `all` - send requests to all nodes and return points which present on all of them\n\nDefault value is `Factor(1)`", + "anyOf": [ + { + "type": "integer", + "format": "uint", + "minimum": 0 + }, + { + "$ref": "#/components/schemas/ReadConsistencyType" + } + ] + }, + "ReadConsistencyType": { + "description": "* `majority` - send N/2+1 random request and return points, which present on all of them\n\n* `quorum` - send requests to all nodes and return points which present on majority of nodes\n\n* `all` - send requests to all nodes and return points which present on all nodes", + "type": "string", + "enum": [ + "majority", + "quorum", + "all" + ] + }, + "UpdateVectors": { + "type": "object", + "required": [ + "points" + ], + "properties": { + "points": { + "description": "Points with named vectors", + "type": "array", + "items": { + "$ref": "#/components/schemas/PointVectors" + }, + "minItems": 1 + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointVectors": { + "type": "object", + "required": [ + "id", + "vector" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "vector": { + "$ref": "#/components/schemas/VectorStruct" + } + } + }, + "DeleteVectors": { + "type": "object", + "required": [ + "vector" + ], + "properties": { + "points": { + "description": "Deletes values from each point in this list", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedPointId" + }, + "nullable": true + }, + "filter": { + "description": "Deletes values from points that satisfy this filter condition", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "vector": { + "description": "Vector names", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + }, + "shard_key": { + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + } + } + }, + "PointGroup": { + "type": "object", + "required": [ + "hits", + "id" + ], + "properties": { + "hits": { + "description": "Scored points that have the same value of the group_by key", + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoredPoint" + } + }, + "id": { + "$ref": "#/components/schemas/GroupId" + }, + "lookup": { + "description": "Record that has been looked up using the group id", + "anyOf": [ + { + "$ref": "#/components/schemas/Record" + }, + { + "nullable": true + } + ] + } + } + }, + "GroupId": { + "description": "Value of the group_by key, shared across all the hits in the group", + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + { + "type": "integer", + "format": "int64" + } + ] + }, + "SearchGroupsRequest": { + "type": "object", + "required": [ + "group_by", + "group_size", + "limit", + "vector" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "vector": { + "$ref": "#/components/schemas/NamedVectorStruct" + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "group_by": { + "description": "Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.", + "type": "string", + "minLength": 1 + }, + "group_size": { + "description": "Maximum amount of points to return per group", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "limit": { + "description": "Maximum amount of groups to return", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "with_lookup": { + "description": "Look for points in another collection using the group ids", + "anyOf": [ + { + "$ref": "#/components/schemas/WithLookupInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "WithLookupInterface": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/WithLookup" + } + ] + }, + "WithLookup": { + "type": "object", + "required": [ + "collection" + ], + "properties": { + "collection": { + "description": "Name of the collection to use for points lookup", + "type": "string" + }, + "with_payload": { + "description": "Options for specifying which payload to include (or not)", + "default": true, + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vectors": { + "description": "Options for specifying which vectors to include (or not)", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + } + } + }, + "RecommendGroupsRequest": { + "type": "object", + "required": [ + "group_by", + "group_size", + "limit" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "positive": { + "description": "Look for vectors closest to those", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "negative": { + "description": "Try to avoid vectors like this", + "default": [], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendExample" + } + }, + "strategy": { + "description": "How to use positive and negative examples to find the results", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/RecommendStrategy" + }, + { + "nullable": true + } + ] + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "score_threshold": { + "description": "Define a minimal score threshold for the result. If defined, less similar results will not be returned. Score of the returned result might be higher or smaller than the threshold depending on the Distance function used. E.g. for cosine similarity only higher scores will be returned.", + "type": "number", + "format": "float", + "nullable": true + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + }, + "group_by": { + "description": "Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups.", + "type": "string", + "minLength": 1 + }, + "group_size": { + "description": "Maximum amount of points to return per group", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "limit": { + "description": "Maximum amount of groups to return", + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "with_lookup": { + "description": "Look for points in another collection using the group ids", + "anyOf": [ + { + "$ref": "#/components/schemas/WithLookupInterface" + }, + { + "nullable": true + } + ] + } + } + }, + "GroupsResult": { + "type": "object", + "required": [ + "groups" + ], + "properties": { + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PointGroup" + } + } + } + }, + "UpdateOperations": { + "type": "object", + "required": [ + "operations" + ], + "properties": { + "operations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateOperation" + } + } + } + }, + "UpdateOperation": { + "anyOf": [ + { + "$ref": "#/components/schemas/UpsertOperation" + }, + { + "$ref": "#/components/schemas/DeleteOperation" + }, + { + "$ref": "#/components/schemas/SetPayloadOperation" + }, + { + "$ref": "#/components/schemas/OverwritePayloadOperation" + }, + { + "$ref": "#/components/schemas/DeletePayloadOperation" + }, + { + "$ref": "#/components/schemas/ClearPayloadOperation" + }, + { + "$ref": "#/components/schemas/UpdateVectorsOperation" + }, + { + "$ref": "#/components/schemas/DeleteVectorsOperation" + } + ] + }, + "UpsertOperation": { + "type": "object", + "required": [ + "upsert" + ], + "properties": { + "upsert": { + "$ref": "#/components/schemas/PointInsertOperations" + } + } + }, + "DeleteOperation": { + "type": "object", + "required": [ + "delete" + ], + "properties": { + "delete": { + "$ref": "#/components/schemas/PointsSelector" + } + } + }, + "SetPayloadOperation": { + "type": "object", + "required": [ + "set_payload" + ], + "properties": { + "set_payload": { + "$ref": "#/components/schemas/SetPayload" + } + } + }, + "OverwritePayloadOperation": { + "type": "object", + "required": [ + "overwrite_payload" + ], + "properties": { + "overwrite_payload": { + "$ref": "#/components/schemas/SetPayload" + } + } + }, + "DeletePayloadOperation": { + "type": "object", + "required": [ + "delete_payload" + ], + "properties": { + "delete_payload": { + "$ref": "#/components/schemas/DeletePayload" + } + } + }, + "ClearPayloadOperation": { + "type": "object", + "required": [ + "clear_payload" + ], + "properties": { + "clear_payload": { + "$ref": "#/components/schemas/PointsSelector" + } + } + }, + "UpdateVectorsOperation": { + "type": "object", + "required": [ + "update_vectors" + ], + "properties": { + "update_vectors": { + "$ref": "#/components/schemas/UpdateVectors" + } + } + }, + "DeleteVectorsOperation": { + "type": "object", + "required": [ + "delete_vectors" + ], + "properties": { + "delete_vectors": { + "$ref": "#/components/schemas/DeleteVectors" + } + } + }, + "ShardSnapshotRecover": { + "type": "object", + "required": [ + "location" + ], + "properties": { + "location": { + "$ref": "#/components/schemas/ShardSnapshotLocation" + }, + "priority": { + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/SnapshotPriority" + }, + { + "nullable": true + } + ] + }, + "checksum": { + "description": "Optional SHA256 checksum to verify snapshot integrity before recovery.", + "default": null, + "type": "string", + "nullable": true + } + } + }, + "ShardSnapshotLocation": { + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "string" + } + ] + }, + "DiscoverRequest": { + "description": "Use context and a target to find the most similar points, constrained by the context.", + "type": "object", + "required": [ + "limit" + ], + "properties": { + "shard_key": { + "description": "Specify in which shards to look for the points, if not specified - look in all shards", + "anyOf": [ + { + "$ref": "#/components/schemas/ShardKeySelector" + }, + { + "nullable": true + } + ] + }, + "target": { + "description": "Look for vectors closest to this.\n\nWhen using the target (with or without context), the integer part of the score represents the rank with respect to the context, while the decimal part of the score relates to the distance to the target.", + "anyOf": [ + { + "$ref": "#/components/schemas/RecommendExample" + }, + { + "nullable": true + } + ] + }, + "context": { + "description": "Pairs of { positive, negative } examples to constrain the search.\n\nWhen using only the context (without a target), a special search - called context search - is performed where pairs of points are used to generate a loss that guides the search towards the zone where most positive examples overlap. This means that the score minimizes the scenario of finding a point closer to a negative than to a positive part of a pair.\n\nSince the score of a context relates to loss, the maximum score a point can get is 0.0, and it becomes normal that many points can have a score of 0.0.\n\nFor discovery search (when including a target), the context part of the score for each pair is calculated +1 if the point is closer to a positive than to a negative part of a pair, and -1 otherwise.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ContextExamplePair" + }, + "nullable": true + }, + "filter": { + "description": "Look only for points which satisfies this conditions", + "anyOf": [ + { + "$ref": "#/components/schemas/Filter" + }, + { + "nullable": true + } + ] + }, + "params": { + "description": "Additional search params", + "anyOf": [ + { + "$ref": "#/components/schemas/SearchParams" + }, + { + "nullable": true + } + ] + }, + "limit": { + "description": "Max number of result to return", + "type": "integer", + "format": "uint", + "minimum": 1 + }, + "offset": { + "description": "Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.", + "type": "integer", + "format": "uint", + "minimum": 0, + "nullable": true + }, + "with_payload": { + "description": "Select which payload to return with the response. Default: None", + "anyOf": [ + { + "$ref": "#/components/schemas/WithPayloadInterface" + }, + { + "nullable": true + } + ] + }, + "with_vector": { + "description": "Whether to return the point vector with the result?", + "anyOf": [ + { + "$ref": "#/components/schemas/WithVector" + }, + { + "nullable": true + } + ] + }, + "using": { + "description": "Define which vector to use for recommendation, if not specified - try to use default vector", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/UsingVector" + }, + { + "nullable": true + } + ] + }, + "lookup_from": { + "description": "The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection", + "default": null, + "anyOf": [ + { + "$ref": "#/components/schemas/LookupLocation" + }, + { + "nullable": true + } + ] + } + } + }, + "ContextExamplePair": { + "type": "object", + "required": [ + "negative", + "positive" + ], + "properties": { + "positive": { + "$ref": "#/components/schemas/RecommendExample" + }, + "negative": { + "$ref": "#/components/schemas/RecommendExample" + } + } + }, + "DiscoverRequestBatch": { + "type": "object", + "required": [ + "searches" + ], + "properties": { + "searches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DiscoverRequest" + } + } + } + }, + "VersionInfo": { + "type": "object", + "required": [ + "title", + "version" + ], + "properties": { + "title": { + "type": "string" + }, + "version": { + "type": "string" + }, + "commit": { + "type": "string", + "nullable": true + } + } + }, + "CollectionExistence": { + "description": "State of existence of a collection, true = exists, false = does not exist", + "type": "object", + "required": [ + "exists" + ], + "properties": { + "exists": { + "type": "boolean" + } + } + } + } + } +} diff --git a/docs/roadmap/README.md b/docs/roadmap/README.md new file mode 100644 index 0000000000000000000000000000000000000000..429d3b21040c0efdede7054edeca47dcfb94b0cf --- /dev/null +++ b/docs/roadmap/README.md @@ -0,0 +1,72 @@ +# Qdrant 2024 Roadmap + +Hi! +This document is our plan for Qdrant development in 2024. +Previous year roadmap is available here: + +* [Roadmap 2023](roadmap-2023.md) +* [Roadmap 2022](roadmap-2022.md) + +Goals of the release: + +* **Maintain easy upgrades** - we plan to keep backward compatibility for at least one minor version back (this stays the same in 2024). + * That means that you can upgrade Qdrant without any downtime and without any changes in your client code within one minor version. + * Storage should be compatible between any two consequent versions, so you can upgrade Qdrant with automatic data migration between consecutive versions. +* **Make serving easy on multi-billion scale** - Qdrant already can serve billions of vectors cheaply, using techniques as quantization. In the 2024 year, we plan to make it even easier to scale it. + * Faster and more reliable replications + * Out-of-the-box read-write segregation + * Specialized nodes and multi-region deployments +* **Better ecosystem** - in 2023 we introduced [fastembed](https://github.com/qdrant/fastembed) to simplify embedding generation but keep it out of the core. + In 2024 we plan to continue this trend: implement more advanced and specialized tools while keeping the core focused on the main use-case. + * Advanced support for sparse vectors - we plan to make sparse vectors inference as fast and easy as the dense one. + * Hybrid search out of the box with no overhead - something you can build with Qdrant today, but in a more convenient way. + * Practical RAG - battle-tested RAG practices with production-grade implementation. +* **Various similarity search scenarios** - develop vector similarity beyond just kNN search. + +## How to contribute + +If you are a Qdrant user - Data Scientist, ML Engineer, or MLOps, the best contribution would be the feedback on your experience with Qdrant. +Let us know whenever you have a problem, face an unexpected behavior, or see a lack of documentation. +You can do it in any convenient way - create an [issue](https://github.com/qdrant/qdrant/issues), start a [discussion](https://github.com/qdrant/qdrant/discussions), or drop up a [message](https://discord.gg/tdtYvXjC4h). +If you use Qdrant or Metric Learning in your projects, we'd love to hear your story! Feel free to share articles and demos in our community. + +For those familiar with Rust - check out our [contribution guide](../CONTRIBUTING.md). +If you have problems with code or architecture understanding - reach us at any time. +Feeling confident and want to contribute more? - Come to [work with us](https://qdrant.join.com/)! + +## Core Milestones + +* 📃 Hybrid Search and Sparse Vectors + * [x] Make Sparse Vectors serving as cheap and fast as Dense Vectors + * [x] Introduce Hybrid Search into Qdrant Client + * [x] Dense + Sparse + Fusion in one request + * [ ] Customizable Re-Ranking + +--- + +* 🏗️ Scalability + * [x] Faster shard synchronization + * [x] Non-blocking snapshotting + * [x] Incremental replication + * [ ] Specialized nodes + * [ ] Read-only nodes + * [ ] Indexing nodes + * [ ] Multi-region deployments + * [ ] Automatic replication over availability zones + +--- + +* ⚙️ Performance + * [ ] Specialized vector indexing for edge cases HNSW is not good at + * [ ] Text-index performance and resource consumption improvements + * [ ] IO optimizations for disk-bound workloads + +--- + +* 🏝️ New Data Exploration techniques + * [ ] Improvements in Discovery API to support more use-cases + * [ ] Diversity Sampling + * [ ] Better Aggregations + * [ ] Advanced text filtering + * [ ] Phrase queries + * [ ] Logical operators diff --git a/docs/roadmap/roadmap-2022.md b/docs/roadmap/roadmap-2022.md new file mode 100644 index 0000000000000000000000000000000000000000..8ab586c73156983962b7713b19f8aa8d671da6ff --- /dev/null +++ b/docs/roadmap/roadmap-2022.md @@ -0,0 +1,54 @@ +# Roadmap 2022 + +This document describes what features and milestones were planned and achieved in 2022. + +The main goals for the 2022 year were: + +* **Make API and Storage stable** - ensure backward compatibility for at least one major version back. + * Starting from the release, breaking changes in API should only be done with a proper deprecation notice + * Storage should be compatible between any two consequent major versions +* **Achieve horizontal scalability** - distributed deployment able to serve billions of points +* **Easy integration** - make the user experience as smooth as possible +* **Resource efficiency** - push Qdrant performance on the single machine to the limit + + +## Milestones + +* :earth_americas: Distributed Deployment + * [x] Distributed querying + * [x] Integration of [raft](https://raft.github.io/) for distributed consistency + * [x] Sharding - group segments into shards + * [x] Cluster scaling + * [x] Replications - automatic segment replication between nodes in cluster + +--- + +* :electric_plug: Integration & Interfaces + * [x] gPRC version of each REST API endpoint + * [x] Split REST Endpoints for better documentation and client generation + +--- + +* :truck: Payload Processing + * [x] Support storing any JSON as a Payload + * [ ] ~~Support more payload types, e.g.~~ + * ~~Data-time~~ + * [x] Support for `Null` values + * [x] Enable more types of filtering queries, e.g. + * [x] Filter by Score + * [x] Filter by number of stored elements + * [x] `isNull` or `isEmpty` query conditions + + +* Additionally + * [x] Full-text filtering support + * [x] Multiple vectors per record support + +--- + +* :racing_car: Performance improvements + * [x] Indexing of geo-payload + * [x] On the fly payload index + * [x] Multiprocessing segment optimization + * [x] Fine-tuned HNSW index configuration + diff --git a/docs/roadmap/roadmap-2023.md b/docs/roadmap/roadmap-2023.md new file mode 100644 index 0000000000000000000000000000000000000000..8447049eca3dbf79106d853d5341efe130ec8736 --- /dev/null +++ b/docs/roadmap/roadmap-2023.md @@ -0,0 +1,59 @@ +# Qdrant 2023 Roadmap + +Hi! +This document is our plan for Qdrant development in 2023. +Previous year roadmap is available here: + +* [Roadmap 2022](roadmap-2022.md) + +Goals of the release: + +* **Maintain easy upgrades** - we plan to keep backward compatibility for at least one minor version back. + * That means that you can upgrade Qdrant without any downtime and without any changes in your client code within one minor version. + * Storage should be compatible between any two consequent versions, so you can upgrade Qdrant with automatic data migration between consecutive versions. +* **Make billion-scale serving cheap** - qdrant already can serve billions of vectors, but we want to make it even more affordable. +* **Easy scaling** - our plan is to make it easy to dynamically scale Qdrant, so you could go from 1 to 1B vectors seamlessly. +* **Various similarity search scenarios** - we want to support more similarity search scenarios, e.g. sparse search, grouping requests, diverse search, etc. + +## How to contribute + +If you are a Qdrant user - Data Scientist, ML Engineer, or MLOps, the best contribution would be the feedback on your experience with Qdrant. +Let us know whenever you have a problem, face an unexpected behavior, or see a lack of documentation. +You can do it in any convenient way - create an [issue](https://github.com/qdrant/qdrant/issues), start a [discussion](https://github.com/qdrant/qdrant/discussions), or drop up a [message](https://discord.gg/tdtYvXjC4h). +If you use Qdrant or Metric Learning in your projects, we'd love to hear your story! Feel free to share articles and demos in our community. + +For those familiar with Rust - check out our [contribution guide](../CONTRIBUTING.md). +If you have problems with code or architecture understanding - reach us at any time. +Feeling confident and want to contribute more? - Come to [work with us](https://qdrant.join.com/)! + +## Milestones + +* :atom_symbol: Quantization support + * [x] Scalar quantization f32 -> u8 (4x compression) + * [x] Product quantization (4x, 8x, 16x, 32x, and 64x compression) + * [x] Binary quantization (32x compression, 40x speedup) + * [x] Support for binary vectors + +--- + +* :arrow_double_up: Scalability + * [ ] Automatic replication factor adjustment + * [ ] Automatic shard distribution on cluster scaling + * [x] Repartitioning support + +--- + +* :eyes: Search scenarios + * [ ] Diversity search - search for vectors that are different from each other + * [x] Discovery search - constrain the space in which the search is performed + * [x] Sparse vectors search - search for vectors with a small number of non-zero values + * [x] Grouping requests - search within payload-defined groups + * [x] Different scenarios for recommendation API + +--- + +* Additionally + * [ ] Extend full-text filtering support + * [ ] Support for phrase queries + * [ ] Support for logical operators + * [x] Simplify update of collection parameters