Commit Graph
390 Commits
Author SHA1 Message Date
Andrey Vasnetsov 0a8973c85d make is-empty condition consistent with all other conditions (#1698)
* make is-empty condition consistent with all other conditions

* review and clippy
2023-04-11 18:21:27 +02:00
Tim Visée 868626f409 Add vector specific quantization configuration (#1680)
* Add QuantizationConfigDiff type

* Add quantization config diff to vector parameters

* Prefer vector config over collection config for quantization

* Update OpenAPI specification

* Validate quantization configuration quantile in 0.5-1.0 range

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

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

* Alias quantization to quantization_config in vector parameters

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

* Regenerate OpenAPI specification and gRPC docs

* Fix compilation error

* Add error handling to quantization config conversions

* Fix quantization integration test, make HNSW test stricter
2023-04-11 14:31:34 +02:00
Luis CossíoandAndrey Vasnetsov e1d494d6be Include "last_responded" in telemetry (#1668)
* feat: include "last_queried" in /telemetry

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

* fix: anonymize the last_queried field

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

* tests: add and fix telemetry test

* refactor: rename last_queried -> last_responded

* cargo fmt

* update openapi models

* refactor: rename last_request_time -> last_response_date

* tests: update test

* review changes

* add chrono to schemars

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-04-11 14:31:28 +02:00
Tim Visée c3c968881b General improvements (#1687)
* Change file mode of some .sh files to make them executable

* Remove whitespace on empty lines from YAML configurations

* Fix unused import warning on Windows
2023-04-11 14:31:22 +02:00
Tim ViséeandAndrey Vasnetsov 66ba8f17af Add vector specific HNSW configuration (#1675)
* Validate VectorConfig/VectorParams, remove obsolete validation

* Add HNSW config diff to vector parameters

* Validate params in collection config

* Add HNSW config to segment vector data config

* Add VectorsConfig params iterator for more elegant conversions

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

* Base segment vector param HNSW config on collection config

* General improvements

* Rewrite HNSW ef_construct extract function to also consider vector configs

* Update OpenAPI specification

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

* review changes

* review changes

* Regenerate gRPC docs

* Fix test on Windows

* Regenerate OpenAPI specification

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-04-11 14:31:18 +02:00
Tim Visée e8002b2781 Verify quantization configuration on collection creation (#1681)
* Verify quantization configuration on collection creation

* Update OpenAPI specification

* Update range in doc to match validation definition

* Update OpenAPI specification
2023-04-11 14:30:54 +02:00
Andrey Vasnetsov 623f3bffe1 Try to fix dying shards (#1682)
* use common channel pool for healthcheck requests

* add dynamic channel pool

* fmt

* lower parallel connections num

* fmt

* fix clippy

* fix clippy

* better status error message

* smarter channel dropping conditions

* per-channel stats

* refactor pool

* rollback dockerfile

* health-check timeout

* prevent reporting last active peer as dead

* introduce update rate limit

* only rate-limit client requests

* ability to save snapshot without locking wal (#1685)

* ability to save snapshot without locking wal

* fix empty wal saving

* skip waiting on local shard in listener mode even if it is a direct request to listener shard

* snapshot recovery test + better handling of segment versions

* use latest wal

* review changes
2023-04-11 14:30:50 +02:00
Ivan Pleshkov 199ecc6099 additional deleted checks in raw scorers (#1674) 2023-04-11 14:30:40 +02:00
Ivan Pleshkov 1eb4ec4885 fix search one day bug (#1672) 2023-04-11 14:30:33 +02:00
Andrey Vasnetsov e43e24deb2 Restore is empty functions as before (#1657)
* is_empty should match with value=null

* fmt
2023-04-11 13:46:16 +02:00
Ivan Pleshkovandtimvisee f0f92292e0 Add Actix and config validation (#1463)
* actix validation

* add check for memmap/indexing_threshold

* fix actix json settings

* Validate settings configuration on start, print pretty warnings on fail

* Add more validation rules for settings and nested types

* Move shared validation logic into collection/operations

* Show validation warning in log when loading some internal configs

* Show prettier actix JSON validation errors

* Stubs for pretty handling of query errors, reformat validation errors

* Use crate flatten function, the hard work was already done for us

We don't have to flatten validation errors into their qualified field
names ourselves because there is a utility function for this.

* Configure actix path validator

* Actix endpoints don't require public

* Extend validation to more actix types

* Validate all remaining actix path and query properties

* Rephrase range validation messages to clearly describe they're inclusive

* Validate all query params to respond with pretty deserialize errors

* Nicely format JSON payload deserialize error responses

* Improve error reporting for upsert point batches

* Add basic validation test that checks a path, query and payload value

* Add some validation constraints

* Add simple validation error render test

* Update Cargo.lock

---------

Co-authored-by: timvisee <tim+github@visee.me>
2023-04-11 13:41:06 +02:00
Ibrahim M. Akrab 2ddce557b2 add isNull condition for payload filtering (#1617)
* add minimal working is_null filter

* add is_null condition to grpc api (backward compatible)

* add unit tests is_null and is_empty conditions

* add is_null to  points.proto file

* add some failing OpenAPI tests

* fix a failing test due to change in collection data

* refactor MultiValue's check for is_null

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

* remove duplicate OpenAPI integration test

* reuse same variable in condition checker tests

* update grpc docs

* fix is_null cardinality estimation to match is_empty

* update openapi specs

* remove unused debug statements

* add new test points to original test_collection

* fix failing tests according to newly added points

* add the `"key":[null]` test_case
2023-04-11 13:40:59 +02:00
dependabot[bot] bc8666209f Bump tempfile from 3.4.0 to 3.5.0 (#1623)
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/Stebalien/tempfile/releases)
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/NEWS)
- [Commits](https://github.com/Stebalien/tempfile/commits)

---
updated-dependencies:
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-11 13:39:46 +02:00
Arnaud Gourlay 67c81f6851 Handle ties scores in test assertions (#1597) 2023-04-11 13:38:47 +02:00
dependabot[bot] 71a0b2b594 Bump geo from 0.24.0 to 0.24.1 (#1599)
Bumps [geo](https://github.com/georust/geo) from 0.24.0 to 0.24.1.
- [Release notes](https://github.com/georust/geo/releases)
- [Changelog](https://github.com/georust/geo/blob/main/CHANGES.md)
- [Commits](https://github.com/georust/geo/compare/geo-0.24.0...geo-0.24.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-11 13:38:31 +02:00
dependabot[bot] 3e09d169a5 Bump ordered-float from 3.5.0 to 3.6.0 (#1596)
Bumps [ordered-float](https://github.com/reem/rust-ordered-float) from 3.5.0 to 3.6.0.
- [Release notes](https://github.com/reem/rust-ordered-float/releases)
- [Commits](https://github.com/reem/rust-ordered-float/compare/v3.5.0...v3.6.0)

---
updated-dependencies:
- dependency-name: ordered-float
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-11 13:37:44 +02:00
dependabot[bot] f88731aea0 Bump ordered-float from 3.4.0 to 3.5.0 (#1590)
Bumps [ordered-float](https://github.com/reem/rust-ordered-float) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/reem/rust-ordered-float/releases)
- [Commits](https://github.com/reem/rust-ordered-float/compare/v3.4.0...v3.5.0)

---
updated-dependencies:
- dependency-name: ordered-float
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-11 13:35:19 +02:00
dependabot[bot] 9f0746b4c4 Bump walkdir from 2.3.2 to 2.3.3 (#1574)
Bumps [walkdir](https://github.com/BurntSushi/walkdir) from 2.3.2 to 2.3.3.
- [Release notes](https://github.com/BurntSushi/walkdir/releases)
- [Commits](https://github.com/BurntSushi/walkdir/compare/2.3.2...2.3.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-17 14:11:41 +01:00
Ivan Pleshkov 25709c449e fix remove geo index (#1566) 2023-03-15 16:32:27 +01:00
Ivan PleshkovandAndrey Vasnetsov e3448c0056 Remove deleted flags from vector storage (#1561)
* remove deleted flags from vector storage

* remove deleted flags from mmap

* new simple vector storage format

* are you happy clippy

* remove id_tracker from raw_scorer

* revert vector storage format changes

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-03-15 16:32:06 +01:00
dependabot[bot] e4fa6e0741 Bump semver from 1.0.16 to 1.0.17 (#1560)
Bumps [semver](https://github.com/dtolnay/semver) from 1.0.16 to 1.0.17.
- [Release notes](https://github.com/dtolnay/semver/releases)
- [Commits](https://github.com/dtolnay/semver/compare/1.0.16...1.0.17)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-15 16:31:39 +01:00
dependabot[bot]andIvan Pleshkov dcc36c38cf Bump geo from 0.23.1 to 0.24.0 (#1545)
Bumps [geo](https://github.com/georust/geo) from 0.23.1 to 0.24.0.
- [Release notes](https://github.com/georust/geo/releases)
- [Changelog](https://github.com/georust/geo/blob/main/CHANGES.md)
- [Commits](https://github.com/georust/geo/compare/geo-0.23.1...geo-0.24.0)

---
updated-dependencies:
- dependency-name: geo
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ivan Pleshkov <pleshkov.ivan@gmail.com>
2023-03-15 16:31:25 +01:00
dependabot[bot]andIvan Pleshkov 5935d55bcd Bump rayon from 1.6.1 to 1.7.0 (#1525)
Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.6.1 to 1.7.0.
- [Release notes](https://github.com/rayon-rs/rayon/releases)
- [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md)
- [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.6.1...rayon-core-v1.7.0)

---
updated-dependencies:
- dependency-name: rayon
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ivan Pleshkov <pleshkov.ivan@gmail.com>
2023-03-15 16:30:57 +01:00
Ivan Pleshkov 699ab0d60f Don't update payload if point was not upserted (#1564)
* fix values count loading in geoindex

* don't update payload if point was not upserted

* remove debug comments

* post-check of internal id

* revert changes from geo indexing branch
2023-03-15 16:30:45 +01:00
Ivan PleshkovandAndrey Vasnetsov 97fafce25f Fix values count loading in geoindex (#1563)
* fix values count loading in geoindex

* WIP: fix loading statistics in geo-index

* WIP: fmt

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-03-15 16:30:35 +01:00
Andrey Vasnetsov 36c46a8dbf Fix histogram for large integer values (#1562)
* make histogram generic

* fmt
2023-03-15 16:30:25 +01:00
Andrey Vasnetsov 12c8d89d1f ensure segment flushing order + extend logging (#1551)
* ensure segment flushing order + extend logging

* fix review
2023-03-15 16:30:12 +01:00
Ivan Pleshkov c60ef44836 Enum vector index (#1539)
* separate payload and vector index bases

* vector index as enum
2023-03-15 16:29:54 +01:00
Andrey Vasnetsov 9cfbfe7637 add benchmark for random vector scoring 2023-03-15 16:29:09 +01:00
Ivan PleshkovandAndrey Vasnetsov 9639df1998 Remove vector scorer trait (#1546)
* remove vector scorer

* nits

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-03-15 16:29:02 +01:00
Tim Visée 82b123e054 Fix clippy warnings (#1542) 2023-03-15 16:27:37 +01:00
Andrey Vasnetsov 8b7e508d27 Quantization re scoring param (#1538)
* parameter to disable rescoring with quantization

* fix

* fix default

* review fixes

* upd api autogen
2023-03-15 16:27:32 +01:00
Ivan Pleshkov 9bb29c26a6 Vector storages enum (#1533)
* separate scoring and data containing

* vector storage enum

* fix test build

* are you happy clippy

* review fixes
2023-03-15 16:27:25 +01:00
Ivan PleshkovandAndrey Vasnetsov 128e49fcc3 integrate quantized data to storages (#1311)
* integrate quantized data to storages

* revert gitignore

* are you happy clippy

* quantize in optimizer

* provide flag

* fix segfault

* skip quantization flag, update scores

* use quantization flag

* are you happy fmt

* use quantization flag

* quantized search test

* are you happy fmt

* refactor test, refactor scorer choosing

* are you happy fmt

* run quantization on segment builder

* decrease testing parameters

* simplify segment

* update version

* remove use_quantization flag

* provide quantization config

* quantization version up

* euclid dist

* add euclid test

* saveload

* fix initialization bugs

* quantization lib version up

* fix arm build

* refactor scorer selecting

* quant lib version up

* are you happy fmt

* are you happy fmt

* are you happy clippy

* add save/load test for simple storage

* add comments

* quantiles

* quantization mmap

* remove f32

* mmap test

* fix mmap slice

* fix mmap test

* use chunks for quantization storage

* fix build

* are you happy fmt

* update quantization library

* update quantization lib

* update quantization lib

* integrate api changes

* are you happy fmt

* change quantization api

* additional checks in tests

* update quantization version

* fix unit tests

* add quantization to storage config

* use quantization for all cardinality search cases

* Integrate quantization suggestions 2 (#1520)

* review api

* wip: refactor quantization integrations

* wip: refactor quantization integrations

* wip: fmt

* include quantization into snapshot

* fmt

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-03-15 16:26:00 +01:00
Ivan Pleshkov c2316db156 fix windows warning unused parallel_graph_build (#1513) 2023-03-15 16:25:39 +01:00
dependabot[bot] 1136d12164 Bump atomicwrites from 0.3.1 to 0.4.0 (#1511)
Bumps [atomicwrites](https://github.com/untitaker/rust-atomicwrites) from 0.3.1 to 0.4.0.
- [Release notes](https://github.com/untitaker/rust-atomicwrites/releases)
- [Commits](https://github.com/untitaker/rust-atomicwrites/compare/0.3.1...0.4.0)

---
updated-dependencies:
- dependency-name: atomicwrites
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-15 16:25:33 +01:00
dependabot[bot] 945a88ab2d Bump schemars from 0.8.11 to 0.8.12 (#1505)
Bumps [schemars](https://github.com/GREsau/schemars) from 0.8.11 to 0.8.12.
- [Release notes](https://github.com/GREsau/schemars/releases)
- [Changelog](https://github.com/GREsau/schemars/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GREsau/schemars/compare/v0.8.11...v0.8.12)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-15 16:24:39 +01:00
dependabot[bot] fc6d50bb62 Bump tempfile from 3.3.0 to 3.4.0 (#1506)
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/Stebalien/tempfile/releases)
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/NEWS)
- [Commits](https://github.com/Stebalien/tempfile/commits)

---
updated-dependencies:
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-15 16:24:33 +01:00
Arnaud Gourlay a93a55e900 Fix condition check for values_count (#1502) 2023-03-15 16:24:25 +01:00
Arnaud GourlayandAndrey Vasnetsov 3d8b5131bd Nested payload filters (#1487)
* Nested payload filters

* close ToDo + add parsing of multuiple array values

* fmt

* improve testing nested arrays

* fix NumericIndex to accumulate points_to_values mapping

* revert numberic index + strict array field access

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-03-15 16:24:04 +01:00
dependabot[bot] 9bfdd60c5c Bump memmap2 from 0.5.9 to 0.5.10 (#1491)
Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs) from 0.5.9 to 0.5.10.
- [Release notes](https://github.com/RazrFalcon/memmap2-rs/releases)
- [Changelog](https://github.com/RazrFalcon/memmap2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.9...v0.5.10)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-15 16:21:51 +01:00
dependabot[bot] ccfec30098 Bump memmap2 from 0.5.8 to 0.5.9 (#1479)
Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs) from 0.5.8 to 0.5.9.
- [Release notes](https://github.com/RazrFalcon/memmap2-rs/releases)
- [Changelog](https://github.com/RazrFalcon/memmap2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.8...v0.5.9)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-15 16:21:12 +01:00
Arnaud Gourlay 3ad2e86e5e Access payload key through nested Array (#1465)
* Access payload key through nested Array

* support removal through array index

* propagate type changes

* fmt

* avoid allocating Vec of one element
2023-03-15 16:21:05 +01:00
Luis CossíoandAndrey Vasnetsov c414a77105 feat: add "any" to "match" statements (#1466)
* feat: add "any" to "match" statements

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

* enable proper counting in cardinality estimation

* fmt

* upd OpenAPI

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-03-15 16:20:11 +01:00
dependabot[bot] 94c5b30468 Bump rocksdb from 0.20.0 to 0.20.1 (#1464)
Bumps [rocksdb](https://github.com/rust-rocksdb/rust-rocksdb) from 0.20.0 to 0.20.1.
- [Release notes](https://github.com/rust-rocksdb/rust-rocksdb/releases)
- [Changelog](https://github.com/rust-rocksdb/rust-rocksdb/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-rocksdb/rust-rocksdb/compare/v0.20.0...v0.20.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-15 16:19:24 +01:00
dependabot[bot]andIvan Pleshkov 56d7e67b2f Bump rocksdb from 0.19.0 to 0.20.0 (#1461)
* Bump rocksdb from 0.19.0 to 0.20.0

Bumps [rocksdb](https://github.com/rust-rocksdb/rust-rocksdb) from 0.19.0 to 0.20.0.
- [Release notes](https://github.com/rust-rocksdb/rust-rocksdb/releases)
- [Changelog](https://github.com/rust-rocksdb/rust-rocksdb/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-rocksdb/rust-rocksdb/compare/v0.19.0...v0.20.0)

---
updated-dependencies:
- dependency-name: rocksdb
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* fix api changes

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ivan Pleshkov <pleshkov.ivan@gmail.com>
2023-03-15 16:19:18 +01:00
Andrey Vasnetsov d146457794 Fix flacky windows test (#1448)
* use async sleep

* fmt

* disablee test_parallel_graph_build on CI on windows untill there is a way to reproduce
2023-03-05 13:04:24 +01:00
Roman Titov 9e685483da Reimplement ExtendedPointId deserialization (#1453)
Reimplement `ExtendedPointId` deserialization, to produce better error message when deserialization fails
2023-03-05 13:00:12 +01:00
Andrey Vasnetsov 1a39990ee9 rollback custom deserialization for point id 2023-02-08 13:58:02 +01:00
Andrey Vasnetsov 2bcba1de7a Windows support (#1432)
* windows-support

* fmt

* install protoc with action

* upd WAL revision
2023-02-06 15:22:24 +01:00