Commit Graph
489 Commits
Author SHA1 Message Date
Ivan Pleshkov 81a423b867 test missed preprocess after segment update 2023-07-04 12:41:58 +02:00
cacc942b36 Add binary index (#2107)
* nitpick: use CardinalityEstimation::exact() instead of explicit struct

* wip: implement binary index

* persist binary index

* add tests, refactor binary memory

* use bitflags for BinaryItem, use early return from @timvisee 's review

* fix iterator's end +1

* fix indexed_count, keep track of falses and trues counts

* Fix true/false counts if flag for point was set already

* Remove match in filter structure

* - rename `*_count()`
- fix set_or_insert to actually set
- add more tests

* review suggestions for binary index (#2186)

* small taste refactors

* move memory into its own module

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-07-03 12:49:53 -04:00
Zein Wen a009257884 Add fn polygon_hashes and its helper functions (#2162)
This is one of a series of commits for the new feature Geo Filter by Polygon(#795) that add function polygon_hashes that retrieves as-high-as-possible with maximum of max_regions number of geo-hash guaranteed to contain the whole polygon.

It also includes two helper functions: 1) check_polygon_intersection and 2) minimum_bounding_rectangle_for_polygon.

Test cases validate the functionality for different scenarios.
2023-07-03 18:14:49 +02:00
Andrey Vasnetsov 8e1f228349 handle inconsistent vector storage in sync operation (#2185) 2023-07-03 12:38:18 +02:00
dependabot[bot] 91112ceaa4 Bump num_cpus from 1.15.0 to 1.16.0 (#2182)
Bumps [num_cpus](https://github.com/seanmonstar/num_cpus) from 1.15.0 to 1.16.0.
- [Release notes](https://github.com/seanmonstar/num_cpus/releases)
- [Changelog](https://github.com/seanmonstar/num_cpus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/num_cpus/compare/v1.15.0...v1.16.0)

---
updated-dependencies:
- dependency-name: num_cpus
  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-07-03 09:52:50 +02:00
dependabot[bot] 12e9271263 Bump num-derive from 0.3.3 to 0.4.0 (#2179)
Bumps [num-derive](https://github.com/rust-num/num-derive) from 0.3.3 to 0.4.0.
- [Changelog](https://github.com/rust-num/num-derive/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-derive/compare/num-derive-0.3.3...num-derive-0.4.0)

---
updated-dependencies:
- dependency-name: num-derive
  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-07-03 09:51:29 +02:00
Luis Cossío dcbddebd0b fix condition to select duration measurer (#2183) 2023-07-02 13:10:32 +02:00
Andrey Vasnetsov 247ea20a4e split search_existing_point_on_level and regular search_on_level functions (#2167) 2023-06-28 18:11:21 +02:00
Tim Visée cb9dbbff87 Validate oversampling (#2100)
* Use unwrap_or_default rather than constructing it manually

* Validate oversampling parameter and surrounding structs

* Validate search limit to be 1 or higher

* Validate hnsw_ef parameter to be 4 or higher

* Also validate parameters in in gRPC

* Update OpenAPI specification

* Add unlikely to reach comment

* Remove hnsw_ef validation rules for now

* Update OpenAPI specification
2023-06-28 14:57:26 +02:00
Tim Visée 30d24c717a Add debug message when segment storage has point and vector count mismatch (#2071) 2023-06-28 14:56:33 +02:00
dependabot[bot] a1d38a497b Bump uuid from 1.3.4 to 1.4.0 (#2159)
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.3.4 to 1.4.0.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/1.3.4...1.4.0)

---
updated-dependencies:
- dependency-name: uuid
  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-06-28 08:45:00 +02:00
Zein Wen bdd65c7037 Add GeoPolygon and tests (#2139)
This commit introduces the GeoPolygon struct, representing a polygon defined by a list of coordinates. It includes the check_point method to determine if a given point is inside the polygon. Test cases validate the functionality for different scenarios.
2023-06-27 10:58:32 +02:00
dependabot[bot] a3c4cf1a4b Bump geo from 0.25.0 to 0.25.1 (#2154)
Bumps [geo](https://github.com/georust/geo) from 0.25.0 to 0.25.1.
- [Changelog](https://github.com/georust/geo/blob/main/CHANGES.md)
- [Commits](https://github.com/georust/geo/compare/geo-0.25.0...geo-0.25.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-06-26 22:35:06 +02:00
dependabot[bot] b8c3067d0b Bump memmap2 from 0.7.0 to 0.7.1 (#2152)
Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs) from 0.7.0 to 0.7.1.
- [Changelog](https://github.com/RazrFalcon/memmap2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/RazrFalcon/memmap2-rs/compare/v0.7.0...v0.7.1)

---
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-06-26 21:28:25 +02:00
dependabot[bot] 8a1bd35d88 Bump itertools from 0.10.5 to 0.11.0 (#2135)
Bumps [itertools](https://github.com/rust-itertools/itertools) from 0.10.5 to 0.11.0.
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-itertools/itertools/compare/v0.10.5...v0.11.0)

---
updated-dependencies:
- dependency-name: itertools
  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-06-26 09:02:22 +02:00
Andrey Vasnetsov fe53fdeb82 delete points from id tracker on flush only (#2136)
* delete points from id tracker on flush only

* move delete-on-flush logic to db wrapper
2023-06-22 23:27:08 +02:00
4f875f5d48 Configurable location of temporary snapshot files (#1960)
* Issue 1905: Configurable location for the tmp snapshot files

* Apply suggestions from code review

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

* fix code review suggestions

* clippy fix

* Propagate temp path, use configured dir for snapshot creation

* Use real temp dir in snapshot tests

* Mention default temporary snapshot file path in configuration

* Use temp everywhere rather than a mix of temp and tmp

* Use consistent naming for temporary snapshot directories

* Extract logic for temporary storage path into toc method

* Resolve clippy warnings

* Apply suggestions from code review

Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>
2023-06-21 22:53:19 +02:00
Tim Visée 2d6f6a4019 Improve vector compatibility checks, fix dimensionality panic (#2124)
* Before inserting vector update, check for correct dimensions

* Improve vector name and data checking on segment level

* Optimize vector compatibility checking

* Remove obsolete vector dimensionality check

* Add test to ensure all segment functions catch bad input

* Test vector checking functions directly as well
2023-06-21 21:10:45 +02:00
Andrey Vasnetsov 1093401353 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-21 21:09:34 +02:00
Andrey Vasnetsov 0f10a7c635 check integrity of snapshot (#2122)
* check integrity of snapshot

* rename check_symlinks to find_symlink
2023-06-21 17:02:31 +02:00
Tim Visée 847f08c96f Fix unused io_uring warning on non-Linux platforms (#2110) 2023-06-20 13:18:04 +02:00
Tim Visée 858b3b3dbe Fix deleted.dat missing in mmap storage snapshot (#2112)
* Fix deleted.dat not being in snapshots

* Update storage test to assert the deleted file is listed

* Remove unused method
2023-06-20 12:44:22 +02:00
Andrey VasnetsovandRoman Titov 010e1686f3 oversampling (#2070)
* wip: add rest param

* WIP: Refactor `search_with_graph` to use oversampling

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

Fix `search_with_graph` quantization config handling

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

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

* schrink -> truncate

* protection against wrong oversampling value

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

Accidentally commited the wrong file 🤦‍♀️

* fix max method notation

* rollbacK: max notation

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

* Simplify `oversampled_top` calculation

* `./tools/generate_grpc_docs.sh`

* `./tools/generate_openapi_models.sh`

---------

Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>
2023-06-15 11:57:57 +02:00
Luis Cossío 431f59c41b Optimize is_empty (#2073)
* optimize is_empty condition for hitting index

* Optimize is_null too, simplify checker

* refactor: introduce values_is_empty() for indexes
- use `.then()` instead of `&&`

* cargo fmt

* improve comments

* Revert "Optimize is_null too, simplify checker"

This reverts commit b9ebfe5ff2.

* changes from review

* update `test_is_empty_conditions` test for comparing indexed vs not indexed results
2023-06-14 13:56:16 -04:00
Roman TitovandAndrey Vasnetsov de47d40180 Enable Segment::prefault_mmap_pages after load and optimization (#1791) (#1992)
* Enable `Segment::preheat_disk_cache` after load and optimization

* Add `black_box` to prevent compiler from optimizing memmap reads (#2081)

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-06-14 17:02:35 +02:00
Tim Visée 07dba86d08 Improve counting vectors in SegmentInfo (#2072)
* Correctly count vectors in segment info for normal segment

* Correctly count vectors in segment info for proxy segment

* Simplify available point count method

* Minor improvements

* Add unit test for point and vector counts in segment

* Add unit test for point and vector counts in proxy segment

* Improve vector counting for proxy segment
2023-06-14 12:57:06 +02:00
Andrey VasnetsovandRoman Titov 02d105db06 Uring error handelling (#2067)
* prevent garbage leak in case of uring read failure

* fmt

* Simplify `UringReader` error handling

---------

Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>
2023-06-13 16:13:40 +02:00
Tim Visée aa16840ac7 Assume points with no mapping/delete flag are deleted (#2061)
* In scorers, assume a point is deleted if it has no deleted flag

* Cleanup
2023-06-13 15:44:57 +02:00
Andrey VasnetsovandRoman Titov 98184f1d02 WIP: Async uring vector storage (#2024)
* async raw scorer

* fmt

* Disable `async_raw_scorer` on non-Linux platforms

* Refactor `async_raw_scorer.rs`

* Conditionally enable `async_raw_scorer` in `segment` crate

* Add `async_scorer` config parameter to the config...

...and enable `async_raw_scorer`, if config parameter is set to `true`

* fixup! Add `async_scorer` config parameter to the config...

Fix tests

* Add basic `async_raw_scorer` test

* Extend `async_raw_scorer` tests to be more extensive

* Async uring vector storage io uring (#2041)

* replace tokio-uring with just low level io-uring

* fnt

* minor fixes

* add sync

* wip: try to use less submissions

* fmt

* fix uring size

* larger buffer

* check for overflow

* submit with re-try

* mmap owns uring context

* large disk parallelism

* rollbacK: large disk parallelism

* fix windows build

* explicitly panic on uring fail

* fix windows build again

* use async scorer in the quantization re-scoring

* refactor

* rename UringReader

* refactor buffers

* fix for windows

* error checking

* fix handing

---------

Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>
2023-06-12 19:53:23 +02:00
Arnaud Gourlay 5bb721e1fb Add debug info for flaky test Windows (#2039) 2023-06-09 13:45:50 +02:00
dependabot[bot] 114a8dcc87 Bump memmap2 from 0.6.2 to 0.7.0 (#2049)
Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs) from 0.6.2 to 0.7.0.
- [Changelog](https://github.com/RazrFalcon/memmap2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/RazrFalcon/memmap2-rs/compare/v0.6.2...v0.7.0)

---
updated-dependencies:
- dependency-name: memmap2
  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-06-09 08:03:36 +02:00
Andrey Vasnetsov a75420ddcc Fix batch request with duplicated filter (#2051)
* fix double usage of iterator

* tests
2023-06-09 00:05:00 +02:00
dependabot[bot] b261ae6e6d Bump tempfile from 3.5.0 to 3.6.0 (#2042)
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.5.0 to 3.6.0.
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.5.0...v3.6.0)

---
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-06-08 08:43:55 +02:00
Arnaud Gourlay fcf55b8943 merge integration binaries (segment) (#2033) 2023-06-07 08:46:49 +02:00
Roman Titov f4cfac0bde Add prefault_mmap_pages method to the GraphLinksMmap (#1791) (#2012)
* Add `prefault_mmap_pages` method to the `HNSWIndex`

* Add name to the thread spawned by `Segment::prefault_mmap_pages`
2023-06-05 11:28:46 +02:00
Tim 0ca6c647e1 Fix warnings pointed out by cargo doc (#1997) 2023-06-05 10:20:21 +02:00
Luis Cossío aac0a286b2 Lookup: add lookup feature to group_by (#1996)
* feat: add GroupBy builder
- move PointGroup to `collection` crate
- make GroupBy struct to add lookup feature in a builder pattern

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

* update openapi schema

* fix rebase

* tests: minor refactor

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

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

* refactor: remove `RetrievedLookup` enum

* update openapi
2023-06-02 14:26:50 -04:00
Roman Titov d9f8bb20b2 Implement Segment::prefault_mmap_pages method (#1791) (#1912)
* WIP: Implement simple `MMAP_POPULATE`/`MADV_WILLNEED` test/benchmark

* WIP: Implement memmapped file disk-cache preheat

* Implement memmapped file disk-cache preheat using global worker

* Implement memmapped file disk-cache preheat using explicitly propagated worker

* Implement memmapped file disk-cache preheat using global lock

* Simplify `preheat_disk_cache` implementation

* Revert few unnecessary changes

* Rename `preheat_disk_cache` to `prefault_mmap_pages`

* Simplify iteration in `prefault_mmap_pages` with `slice::chunks` (thanks, @timvisee!)

* Switch logs in `prefault_mmap_pages` from `debug` to `trace`
2023-06-01 12:55:49 +02:00
dependabot[bot] bf84c5b451 Bump chrono from 0.4.25 to 0.4.26 (#2005)
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.25 to 0.4.26.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.25...v0.4.26)

---
updated-dependencies:
- dependency-name: chrono
  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-06-01 09:42:55 +02:00
Roman TitovandAndrey Vasnetsov 502d6ab2e7 Extend SerdeWal to better track the last truncated-to WAL index (#1815) (#1868)
* Skip applied WAL operations on shard load

* fixup! Skip applied WAL operations on shard load

- Skip WAL operation up to the *minimal* persisted version
- Add explanation comment

* fixup! Skip applied WAL operations on shard load

- "beautify" `skip_while` expression
- handle version `0` corner case (and add explanation)

* Update `Segment::handle_version` comment

* Simplify `Segment::handle_version` a bit

* Refactor `check_unprocessed_points`

* fixup! Refactor `check_unprocessed_points`

Optimized `check_unprocessed_points`

* Revert `LocalShard::load_from_wal` and `check_unprocessed_points` changes

* Downgrade failure in `check_unprocessed_points` to a warning

* Persist/track the first un-truncated index in `SerdeWal`...

...and use it as first index for WAL operations

* fixup! Downgrade failure in `check_unprocessed_points` to a warning

Downgrade failure in `check_unprocessed_points` to a warning *during `LocalShard::load_from_wal`* 🙈

* fixup! Persist/track the first un-truncated index in `SerdeWal`...

Words...

* Fix a bug in `SerdeWal::truncated_prefix_entries_num` and add explanation comment

* Fix a bug in `SerdeWal::ack`

* prevent unnesessary savings, use json, never decrease ack index

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-05-31 23:15:55 +02:00
Tim Visée d40ef29680 Update Cargo.toml, specify license and other things (#1943)
* Add Apache 2.0 license to crates

* Remove cargo reference comments

* Use consistent authors list in crates

* Specify README, homepage and repository links in root crate

* Update authors
2023-05-31 20:56:38 +02:00
Luis Cossío b92d3f45cd Lookup internals (#1981)
* feat: add lookup_ids function
- rename GroupId -> PseudoId
- impl try_from PseudoId to PointIdType
- create lookup_ids function
- add tests

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

* refactor: make new type for PseudoId

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

* changes from review, thanks @agourlay
2023-05-31 14:23:46 -04:00
Tim Visée d67bf1ce37 Update memmap2 to remove Windows specific edge case (#1964)
* Bump memmap2 to 0.6.2

* Remove empty mmap edge case handling for Windows, now fixed in memmap2
2023-05-31 10:41:59 +02:00
dependabot[bot] 1290f4dbb5 Bump chrono from 0.4.24 to 0.4.25 (#1987)
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.24 to 0.4.25.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.24...v0.4.25)

---
updated-dependencies:
- dependency-name: chrono
  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-05-30 08:37:55 +02:00
Andrey Vasnetsov c38d6e6d1d re-assign entry point for hnsw point insertion on each level (#1974) 2023-05-25 17:41:58 +02:00
Tim Visée 11ad14fea8 Use const fn where possible for serde defaults (#1949) 2023-05-25 16:41:03 +02:00
dependabot[bot] 137def6650 Bump criterion from 0.4.0 to 0.5.0 (#1955)
Bumps [criterion](https://github.com/bheisler/criterion.rs) from 0.4.0 to 0.5.0.
- [Changelog](https://github.com/bheisler/criterion.rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bheisler/criterion.rs/compare/0.4.0...0.5.0)

---
updated-dependencies:
- dependency-name: criterion
  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-05-24 09:57:18 +02:00
Andrey Vasnetsov d8c6231228 remove outdated check (#1941)
* remove outdated check

* disable module fixtures
2023-05-22 23:15:41 +02:00
d624512a94 Fixes for group-by (#1938)
* fix payload seletor

* clippy

* except cardinality estimation

* implement match except iterator and api

* use except instead of must-not + test

* Fix doc error

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* fix: reset review suggestion

* Remove unnecessary move

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

* is-null -> is-empty

* de-comment drop_collection

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Tim Visée <tim+github@visee.me>
Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>
Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2023-05-22 20:32:35 +02:00
60ce060a78 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 20:08:12 +02:00