Commit Graph

101 Commits

Author SHA1 Message Date
Gabriel
3392407f6a API for checking collection exists (#3472)
* saving progress

* tests assertions are working

* fixed lint

* fixed typo, existance -> existence

* added timing on grpc

* added timing on grpc

* fixed double time
2024-03-05 16:55:27 +01:00
xzfc
a11c6f6a5b add optional checksum to snapshot recovery request (#3381)
* add optional checksum to snapshot recovery request

* Update openapi yaml files

* Add pytests for snapshots restoration
2024-03-05 16:52:38 +01:00
Shrinibas Mahanta
13b24c9516 fixes gRPC API return status code. (#3423)
* This changes the returning of StorageError::BadInput to StorageError::AlreadyExists.

* This adds AlreadyExists error type to StorageError enum

* This implements already_exists function to handle AlreadyExists StorageError.

* This adds error to status code for StorageError::AlreadyExists using tonic::Code::AlreadyExists

* This adds Error type for actix to handle AlreadyExists Storage error using Error::CONFLICT

* This adds using HttpResponse::Conflict for building HttpResp in case of StorageError

* This adds StatusCode and description for HttpError caused by StorageError

* fix integration test

* rename is_collection_exists -> collection_exists

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2024-03-05 16:52:04 +01:00
Tim Visée
41b7a55e16 Fix multiple vector updates on same point in batch not working (#3386)
* Fix merge of vector operations, don't drop earlier updates on same point

* Add unit test for vector struct merging

* Add integration test for fix, also covering bug report
2024-03-05 16:47:28 +01:00
Kumar Shivendu
0fe19cfb60 feat: Expose git commit id in the health check endpoint (#3346)
* feat: Expose git commit id in the health check endpoint

* fix: CI errors

* test: Add test for health check api

* feat: Add / endpoint to openapi schema

* Make git commit hash optional

* ci: Enable debugging setup-protoc action

* Install later protobuf compiler through GitHub Action

* Disable debug mode for setup-protoc job

* refactor: Use commit instead of commit_id

* fix: Use commit instead of commit_id gRPC docs

* test: Update ping API test

* refactor: Rename ping api to root api

---------

Co-authored-by: timvisee <tim@visee.me>
2024-03-05 16:46:04 +01:00
Andrey Vasnetsov
6632ba002c fix missing indexing values on set-payload operation (#3251)
* fix missing indexing values on set-payload operation

* Update function documentation, use conventional warning

* Don't deep match statements

* test: Update of payload on already indexed payload should work (#3253)

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Kumar Shivendu <kshivendu1@gmail.com>
2023-12-19 19:31:00 +00:00
Arnaud Gourlay
4bc6ef6011 Test large index for sparse vectors (#3226)
* sparse vectors with large indices support

* fix unit tests

* are you happy clippy

* review remarks; acc test for inverted index

* Test large index for sparse vectors

set unique name to the test collection

Revert "fix consensus tests"

This reverts commit 93afe59f6ba663d5a89bbf25e3418b873fd72b16.

fix rebase mistake

---------

Co-authored-by: Ivan Pleshkov <pleshkov.ivan@gmail.com>
2023-12-19 19:29:15 +00:00
Roman Titov
cb46a73609 Extend /readyz with shards readiness check (#3053, #3084)
Co-authored-by: generall <andrey@vasnetsov.com>
Co-authored-by: timvisee <tim@visee.me>
2023-12-06 17:20:29 +01:00
Arnaud Gourlay
9bfda58973 Test sparse vector configuration update (#3159)
* Test sparse vector configuration update

* clean ef_construct
2023-12-06 17:20:01 +01:00
Arnaud Gourlay
74793bd404 Integration test for sparse vector post processing (#3138) 2023-12-06 17:18:44 +01:00
Arnaud Gourlay
b54dd66d1e Sparse vectors sanity integration checks (#3126) 2023-12-06 17:18:19 +01:00
Kaan C. Fidan
8f19257f70 Manhattan distance (#3079)
* implemented Manhattan distance

* updated quantization dependency

* fixed negative distances and doc consistency

* fixed neon implementation

* updated quantization dependency

* updated quantization dependency

* removed redundant copy operation

* updated quantization dependency

* Change back to upstream quantization dependency

---------

Co-authored-by: timvisee <tim@visee.me>
2023-12-06 17:17:34 +01:00
Arnaud Gourlay
85c96cdd9a Integration tests sparse vector validation (#3122)
* Integration test for sparse vector validations

* cleanup

* clean again
2023-12-06 17:16:12 +01:00
Ivan Pleshkov
3fc1f96564 Sparse index segment and collection config (#2802)
* quantization storage as separate entity

sparse index try to extend segment types

fix build

fix async scorer

codespell

update openapi

update vector index

remove code duplications

more fixes

more fixes

fix build

fix deserialization test

remove transform_into

are you happy clippy

update openapi

update openapi

are you happy clippy

fix build

optional serialize

more defaults

update openapi

fix comments

generic transpose_map_into_named_vector

rename fields in tests

remove obsolete parts

only named sparse config

VectorStruct without unnamed sparse

NamedVectorStruct without unnamed sparse

remove obsolete test

update openapi

mmap index

revert preprocess function

are you happy fmt

update openapi

fix build

fix tests

are you happy fmt

fix for client generation

fix sparse segment creation

fix basic sparse test

fix conflicts

remove obsolete convertion

fix build

config diffs

update openapi

review remarks

update openapi

fix batch upsert

add failing test showing bad ids matching

fix sparse vector insertion

remove on_disk flag

update openapi

revert debug assert

simplify conversions

update openapi

remove on disk storage flag

update openapi

default for vector config

update openapi comment

remove diffs

update openapi

* enable consensus test

* add comment

* update openapi
2023-12-06 17:16:06 +01:00
Luis Cossío
3fd3ff215a refactor: turn offset into an option (#3082)
* refactor: make offset optional

* update openapi

* add simple test
2023-12-06 17:11:00 +01:00
Andrey Vasnetsov
2810672598 Huge refactoring to make read requests aware of shard key selector (#3004)
* huge refactoring to make read requests avare of shard key selector

* fix integration test

* review fixes

* allow lookup_from specific shards
2023-12-06 17:02:20 +01:00
Luis Cossío
5ab190dad2 fix test_discover_same_target (#2962) 2023-12-06 16:58:16 +01:00
Luis Cossío
91eb3f36e2 Discovery API (#2861)
* create and connect discovery http and grpc interfaces

* add openapi tests

* fix bad rebase

* Add better descriptions

* remove numpy from openapi tests

* fix rebase artifact

* remove already addressed TODO

* add more tests

* 🤡🔫 (cfg batch handler)

* add timeout query param for discover requests

* More gRPC validation

* make fields pydantic_openapi_generator_v3 friendly

* `context_pairs` -> `context` with struct for pairs

* discovery api is only discovery or context,
move struct description to fields

---------

Co-authored-by: timvisee <tim@visee.me>
2023-12-06 16:57:14 +01:00
Luis Cossío
d8241a3fe5 Fix recommend best_score formula (#2904)
* fix recommend best score formula

* fix integration test

* review fixes

* rebase and fix conflicts

* correct proptest comment
2023-12-06 16:53:26 +01:00
Luis Cossío
87524275d4 Expose timeout query param for search requests (#2748)
* add timeout query param for search requests

* enable timeout for recommend requests

* Add query timeout for group by requests

* update openapi models

* Don't decrease timeout after recommend preprocessing

* Add openapi test

* code review

* add timeout to individual group by requests, non-decreasing

* handle timeout for discover

* Update timeout field tag in SearchBatchPoints
message
2023-12-06 16:52:49 +01:00
Arnaud Gourlay
3d73125661 Allow JsonPath for PayloadSelector (#2756)
* Allow JsonPath for PayloadSelector

* code review

* mention Entry API in performance note

* pre-process exclude list to avoid incorrect side-effects

* remove support for array paths

* review refactoring

* add test for implicit/explicit array notation

* [skip ci] panic -> unreachable

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2023-10-06 12:45:04 +02:00
Arnaud Gourlay
921f00062c Make GeoPolygon interiors optional (#2766) 2023-10-06 12:44:50 +02:00
Zein Wen
3bc91780b0 Extend GeoPolygon to support interiors (#2315)
* Extend GeoPolygon to support interiors (#2315)

Per GeoJson, we should support polygon with exterior and interiors (holes on the surface) in Geo Filter by Polygon(#795). This commit extend current GeoPolygon filter to accept interiors. It includes:

1. changes to proto and internal GeoPolygon struct, and validation fn
2. add and refactor some tests
3. add integration test

* add gRPC geo_polygon validation

---------

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2023-10-06 12:43:49 +02:00
Arnaud Gourlay
822a7c3f58 Validate empty filter condition (#2745)
* Validate empty filter condition

* Validate filter objects in other requests

* Propagate nested filter validation

* add gRPC validation

* make match exhaustive with explicit variants

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2023-10-06 12:43:41 +02:00
Luis Cossío
fd214c1d80 Allow vectors in recommend API (#2693)
* allow raw vectors in recommend

* add openapi test

* keep point id input separately forever in grpc

* minor fix

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2023-10-06 12:39:08 +02:00
Luis Cossío
275320d1e6 Expose new recommend scorer via recommend strategy (#2662) 2023-10-06 12:38:47 +02:00
Luis Cossío
3200b1f8af make unused import lint happy (#2667) 2023-10-06 12:36:02 +02:00
Josh Soref
a18573b265 Spelling (#2658)
* spelling: accumulating

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: and

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: back

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: batching

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: been

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: benchmark

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: collections

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: confusion

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: consensus

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: decrease

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: equal

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: github

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: minimal

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: nonexistent

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: oversampling

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: paths

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: points

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: prevent

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: protobuf

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: proxied

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: randomness

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: recover

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

---------

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-10-06 12:35:23 +02:00
Andrey Vasnetsov
383fecf64b do not use top-level array in API request (#2596)
* do not use top-level array in API request

* fix integration tests

* fix integration tests
2023-09-05 15:46:20 +02:00
Andrey Vasnetsov
68abd89923 openapi definitions for shard shashots API (#2571)
* openapi definitions for shard shashots API

* review fixes
2023-09-04 16:45:00 +02:00
Tim Visée
a3afe9c166 Add healthz, livez and readyz endpoints for Kubernetes (#2409)
* Add healthz, livez and readyz endpoints

* Describe healthz, livez and readyz endpoints in OpenAPI definition

* Add integration test for healthz, livez and readyz endpoints

* Fix typo
2023-09-04 16:44:49 +02:00
Tim Visée
b6aec0c179 Limit vector dimension to 65536 (#2544)
* Limit vector dimension to 65536

* Add integration test for new dimension limit
2023-09-04 16:42:42 +02:00
Tim Visée
dca9698540 Fix missing points, vectors and payload (#2514)
* On segment flush, read-lock all segments to prevent CoW between flushes

For example, we have a point on an immutable segment. If we use a
set-payload operation, we do copy-on-write. The point from immutable
segment A is deleted, the updated point is stored on appendable segment
B.

Because of flush ordering segment B (appendable) is flushed before
segment A (not-appendable). If the copy-on-write operation happens in
between, the point is deleted from A but the new point in B is not
persisted. We cannot recover this by replaying the WAL in case of a
crash because the point in A does not exist anymore, making
copy-on-write impossible.

Locking all segments prevents copy-on-write operations from occurring in
between flushes.

* Return proper status on set payload operations in segment

* Disable propagating point deletions to its vectors, it looses vectors

* Update vector tests after disabling point delete propagation to vectors

* Implement retry with exponential backoff for read-locking all segments

* Use try_read_for rather than sleeping after lock attempts

* Simplify locking many, just lock one by one

Refs: <https://github.com/qdrant/qdrant/pull/2527>
Co-authored-by: generall <andrey@vasnetsov.com>

* Comment out now obsolete test

* Error handling in method getting segment locks by ID

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2023-09-04 16:42:42 +02:00
Tim Visée
cee569828f Fix incorrect file URI handling in snapshot recovery (#2414)
* Fix URI to path conversion, respond with proper error if non existant

* Add integration test for snapshot recover from file URI errors
2023-08-10 14:13:10 +02:00
Tim Visée
89da9a989d Parameterize integration tests (#2375)
* Clean up imports

* Clean up whitespace

* Use drop collection function from helpers

* Use parameterized integration tests to test on_disk variations

* Promote on_disk_vectors parameter into dedicated fixture

* Merge basic retrieve test with parameterization

* Flatten functions

* Split validation test functions

* Don't parameterize on_disk states when testing validation

* Parameterize init_from_collection test sequence

* Parameterize on_disk_payload in tests with fixture

* Parameterize new batch update tests

* Fix integration test collection setup distance after incorrect merge
2023-08-10 14:12:47 +02:00
Jesse
57ef69f954 Add batch update endpoint for points API (#1951)
* Add batch update endpoint for points API

* Add validation to batch update operation

* Update gRPC

* Add update and delete vector operations to point update batch

* Improve batch point update tests, add multivec, extract into module

---------

Co-authored-by: timvisee <tim@visee.me>
2023-08-10 14:11:02 +02:00
Tim Visée
aae707c08f update collection: on_disk parameters (#2097)
* Add on_disk_payload field to collections params diff

* Add on_disk flag to update collection vector params

* Add on_disk parameters to collection update integration test

* Update and extend unit tests

* monitor on-disk params in optimizr

* fmt

* review fix

* fmt

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2023-07-31 11:44:47 +02:00
Tim Visée
029c21e3f7 Update collection: quantization config (#2090)
* Reoptimize segments on quantization mismatch

* Add collection quantization params to collection update REST endpoint

* Do not require rebuild of quantization for on_disk change

* Add collection quantization params to collection update gRPC endpoint

* Add option to update vector specific quantization config to REST API

* Add option to update vector specific quantization config to gRPC API

* Update OpenAPI and gRPC specification

* Fix quantization mismatch detecting not working as expected

* Fix config mismatch optimizer not using vector specific quantization

* Add unit test for quantization in config mismatch optimizer

* Add some quantization params to collection update integration test

* Reformat

* Apply suggestions from code review

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

* Remove if-statement, simply return

* Move quantization params in named vector in integration test

* Test updating quantization params in multivec integration test

* Fix gRPC docs

* Fix quantization rebuild on changing enabled state on indexed segment

* allow disabling quantization config

* fmt

* clippy

* compare all params of the quantization for rebuild

* explicitly use params on update

* test for disabling quantization

---------

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
Co-authored-by: generall <andrey@vasnetsov.com>
2023-07-31 11:42:38 +02:00
Andrey Vasnetsov
d328f961e6 Fix for updating vector-specific config params (#2328)
* unit-test for updating multivec config

* Remove single vector support from vector params update in REST API

With this change, a user is always required to specify vector names when
updating their parameters. Updating vector parameters in a collection
with a single vector is still possible by providing an empty name. This
is very reasonable as updating vector parameters on a single vector
collection is a bad pattern, since parameters can be set on the
collection itself.

* Update integration tests to reflect REST API change

* Update OpenAPI specification

* Remove obsolete VectorsConfigDiff functions, update docs

* Update OpenAPI specification

* Add name validation to update collection endpoint for vector params

---------

Co-authored-by: timvisee <tim@visee.me>
2023-07-31 11:42:06 +02:00
Tim Visée
482301cd00 Update collection: vector HNSW config (#2087)
* Add update vector config type

* Add mutable getter to update vector config

* Add update vector config to update collection REST operation, reorder

* Add logic to update vector HNSW in collection

* Update OpenAPI specification

* If HNSW diff is empty, consider it as unset

* Update descriptions to clarify an empty HNSW diff unsets

* Make new vector HNSW diff update existing diff

This means that the existing vector HNSW diff is kept intact. Specified
fields are updated in the existing diff. An empty HNSW diff object may
be provided to unset the diff.

* Add update vector config to update collection gRPC operation

* Update gRPC docs

* Use vector specific HNSW config in integration test

* Extract & improve gRPC type conversions, fix collection update with None

* Validate vector specific HNSW config in collection update gRPC endpoint

* Explicitly test we do not rebuild on on_disk change

* Use new method to recreate optimizers

* Don't test on_disk change anymore

* Reuse collection write lock to save, do not relock

* Fix invalid update collection request body in OpenAPI test

* Simplify update collection test

* Add update collection test for HNSW parameters

* Extract vector param update logic into local functions

* Reformat

* Transform UpdateVectorParams into VectorParamsDiff

* Transform UpdateVectorsConfig into VectorsConfigDiff

* Combine serde attributes

* Make HNSW diff empty check generic over DiffConfig types

* Move DiffConfig implementation

* Fix typo
2023-07-31 11:41:48 +02:00
Tim Visée
7baa296d8b Update collection: HNSW config (#2083)
* Add field to REST collection update to change HNSW config

* Add field to gRPC collection update to change HNSW config

* Update OpenAPI specification

* Update gRPC docs

* Improve optimizer filtering for excluded segment IDs

* Add config mismatch optimizer detecting basic HNSW mismatches

* Trigger optimizers when changing collection HNSW config

* Make config mismatch optimizer aware of vector specific HNSW configs

* Extract triggering optimizers after collection update into function

* Add config mismatch optimizer test for changing HNSW config

* Simplify config mismatch optimizer test

* Add config mismatch optimizer test for vector specific HNSW change

* Reformat

* Update collection HNSW params in integration test

* Validate HNSW config in collection update gRPC endpoint

* Improve description of update collection request

* Do not require to rebuild HNSW when on_disk flag changes

Ref: https://github.com/qdrant/qdrant/pull/2083#discussion_r1231002072

* Do rebuild segment with on_disk change

* Trigger optimizers in parallel

* Recreate optimizers only once on collection update

* Reformat

* Fix incorrect usage of self

* Fix deadlock in collection state config update

* Also rebuild index on full scan threshold change

* decompose worst_segment condition check

* review refactor

* Update lib/storage/src/content_manager/collection_meta_ops.rs

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

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

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

* upd grpc docs

* upd grpc docs

* update openapi

---------

Co-authored-by: generall <andrey@vasnetsov.com>
Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>
2023-07-31 11:39:36 +02:00
Yaroslav Halchenko
462ce6ba05 codespell: workflow, config, typos fixed (#2248)
* Add github action to codespell master on push and PRs

* Add rudimentary codespell config

* some skips

* fix some ambigous typos

* [DATALAD RUNCMD] run codespell throughout

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^

* Add dev branch as target for the workflow
2023-07-31 11:37:32 +02:00
Luis Cossío
112005e32c Expose & benchmark binary index (#2174)
* expose boolean index

* benchmark against keyword and no index

* add integration tests

* rename benchmark groups
2023-07-31 11:37:24 +02:00
Ivan Pleshkov
396714f7fa Add missed vector preprocess (#2203)
* test missed preprocess after segment update

* missed preprocess

* remove preprocess_named_vectors fn

* are you happy clippy

* fix integration tests

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2023-07-12 15:39:50 +02:00
Andrey Vasnetsov
38651baf09 run all integration tests with on_disk=true and false (#2125)
* run all integration tests with on_disk=true and false

* fix env reading
2023-06-23 11:00:15 +02:00
Andrey Vasnetsov
2a6cbc4680 more accurate check for collections compatibility (#2104)
* more accurate check for collections compatibility

* add tests

---------

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2023-06-23 10:55:50 +02:00
Luis Cossío
ce3a108312 Lookup: expose feature to REST and gRPC interfaces (#2011)
* rename `Lookup` -> `RetrievedLookup`

* feat: expose lookup in groups

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

* chore: remove allow(dead_code) from builder

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

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

* fix: update grpc docs

* add tests and set better defaults

* remove `RetrievedLookup` from proto

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

* cargo fmt

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

* update grpc docs

* Remove WithLookupInterface sugar from grpc

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

* update integration tests

* use singular lookup

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-06-19 15:18:19 +02:00
Andrey Vasnetsov
49db7125fd remove outdated check (#1941)
* remove outdated check

* disable module fixtures
2023-05-22 23:17:25 +02:00
Andrey Vasnetsov
f5dfeeff4c Fixes for group-by (#1938)
* fix payload seletor

* clippy

* except cardinality estimation

* implement match except iterator and api

* use except instead of must-not + test

* Fix doc error

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* fix: reset review suggestion

* Remove unnecessary move

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

* is-null -> is-empty

* de-comment drop_collection

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Tim Visée <tim+github@visee.me>
Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>
Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2023-05-22 23:17:21 +02:00
Andrey Vasnetsov
2e5e0292cc Rewrite nested filters again (#1935)
* working nested filters

* rm unused file

* add comment example

* todo

* remove nester checkers

* Box recursive generic Fn types

* Box recursive generic Fn types [2/2]

* Add optional ID tracker to check_payload, remove boxed closure (#1939)

* Add optional ID tracker to check_payload, remove boxed closure

* Replace some match with or_else

* Some nested filter improvements (#1940)

* Replace starts_with/substring with strip_prefix

* Transform for-if-let-check-return into any iterator

* Transform for-if-return into any iterator

* Add comment to describe why check_payload has no ID tracker

See: https://github.com/qdrant/qdrant/pull/1935#discussion_r1200437675

* Update lib/segment/src/payload_storage/query_checker.rs

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

* Update lib/segment/src/payload_storage/query_checker.rs

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

* fix clippy

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Tim Visée <tim+github@visee.me>
Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>
2023-05-22 23:17:15 +02:00