Commit Graph

28 Commits

Author SHA1 Message Date
George Panchuk
698db1d33f new: drop python3.9, replace union and optional with | where possible 2025-11-14 03:20:36 +07:00
George
c1678f3ebd Text any filter (#1091)
* new: add match text any local mode

* tests: add match text any tests
2025-11-02 17:29:18 +07:00
George
2afadf4cb5 fix: non-list conditions in filter clauses (#949)
* fix: non-list conditions in filter clauses

* r u happy mypy?
2025-04-15 16:43:22 +03:00
Luis Cossío
e704e4fe02 [score boosting] Support datetime expressions (#930)
* gen grpc

* generate rest client

* use float for formula evaluation, match multivalue behavior

* support datetime expressions

* populate inspection cache

* review remarks

* support datetime_key

* fix: address AI comments

* fix: regen inspection cache

* regen inspection cache with pydantic 2.10

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2025-04-03 14:51:14 +03:00
Luis Cossío
983fce8a1b [score boosting] support decay functions (#929)
* update grpc client

* generate rest client

* add decay expressions evaluation and fixtures

* add conversions

* validate in formula and fix test

* add fixtures

* new: update inspection cache

* Review remarks

* review nit

* fix rebase

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2025-03-24 15:38:22 -03:00
Luis Cossío
d938ca3f27 Score boosting local mode (#915)
* add local mode of formula scoring

* grpc<->rest conversions

* fixes for formula evaluation

* add mixed payload type to fixture payload

* update tests

* ignore math warnings (invalid operations raise an error anyway)

* fix conversions

* use same haversine distance as in core

* upd tests

* add fixtures for expressions

* fix import

* temporary hack for tests

* evaluation fixes

* satisfy mypy

* gen async client

* reduce flakiness

..by nesting less equations, so that floating point differences affect
less

* get_args_subscribed

* retriever match multivalue behavior

* review remarks

* more review remarks

* review nit

* no type ignore

* fix imports
2025-03-24 15:24:55 -03:00
George
baa3e264c8 Drop python 3.8 (#848)
* new: drop python 3.8 support, update type hints

* fix: remove 3.8 from ci

* fix: update type hints

* fix: make netlify use python3.10

* fix: try python3.9 for sphinx

* debug: try updating sphinx

* new: bump ffastembed to 0.4.2

* fix: install numpy<2 for mypy

* fix: install numpy via poetry
2024-11-15 15:54:32 +01:00
Luis Cossío
a6e2324884 chore: Update clients (#758)
* update rest client

* update grpc client with grpcio 1.65.4

* update grpc client with grpcio==1.49.1

* generate grpc client with grpcio==1.48.2

* generate grpc client with grpcio==1.66.1 and mypy-protobuf extension

* add mypy-protobuf to pyproject

* relax version for grpcio, but keep grpcio-tools at 1.48.2

* improve generation script

* fix bash script comment

Co-authored-by: George <george.panchuk@qdrant.tech>

* use old grpcio to generate client

* rollbakc mypy-protobuf

* regenerate with distance matrix

* new: update clients (#774)

* new: update clients

* rollback grpcio version

* feature: Facets (#759)

* facet in local_collection.py

* replace usages of calculate_payload_mask

* - qdrant remote
- qdrant base
- qdrant client
- conversions

* congruence tests + local mode fixes

* generate async client

* add type stubs and misc fixes

* fix mypy in Python 3.8

* generate async client

* review remarks

* gen async client

* update for bool facets

* Feature: Distance Matrix API (#769)

* add remote impls

* add client impl

* regen async client

* start local

* regen async

* local mode

* start congruence

* Fix local mode

* regen async of course

* test filtering

* fix min samples count

* simplify comparaison loop

* simplify samples loop

* add rest/gRPC conversion tests

* fix conversions + tests

---------

Co-authored-by: George <george.panchuk@qdrant.tech>
Co-authored-by: generall <andrey@vasnetsov.com>
Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2024-10-05 23:03:13 +02:00
Hossam Hagag
c107fb3f9f Tsk 757 add support for tuple in payload (#763)
* Add support for tuple in payload for grpc

* chore: delete health_check_pb2_grpc.py

* chore: Modify payload test case to test tuple datatype

* chore: Removed test case for tuple
We cannot test tuple as the return value is listvalue, so i only kept the list

* chore: Remove excess prints in info endpoint

* chore: Added tuple in random payload generator

* feat: convert the tuple payload of local mode to list for congruence
2024-09-13 17:19:55 +02:00
Hossam Hagag
2cf5dc8447 Test migration of multivectors and sparse vectors (#700)
* updated test migrate

* removed second remote client

* added back multiple vector test

* added single multi vector

* modified random_multivectors to support single vector

* fix: add version check for backward compatibility tests

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2024-07-31 00:45:29 +02:00
Luis Cossío
0075fef659 : int 2024-06-28 12:44:47 -04:00
Luis Cossío
c3e8ec00e5 Local mode for Query 2024-06-27 19:46:25 +02:00
Andrey Vasnetsov
815a784469 Update openapi v1 10 x (#622)
* update api with conversions

* introduce IDF modifier for sparse vectors in local mode

* generate stuff

* regen async

* Update tests/fixtures/points.py

* fix: address review comments

* upd models

* fix: update grpc overwrite payload conversion, fix order by conversion (#653)

---------

Co-authored-by: George <george.panchuk@qdrant.tech>
2024-06-20 17:55:35 +02:00
George
c8aa21c83d new: add sparse vectors support in discovery and recommend in local mode (#571)
* new: add sparse vectors support in discovery and recommend in local mode

* chore: remove redundant file

* chore: remove another redundant file

* fix: fix type hint for python3.8

* fix: remove redundant types from check

* refactoring: remove redundant union

* refactoring: remove redundant import

* fix: fix type hint

* fix: fix type hint

* refactoring: improve exception description

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

* refactoring: improve exception description

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

* refactoring: address review comments

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2024-04-05 12:13:20 +02:00
George
9e56ed62a8 fix: convert date to datetime in local mode to compare with datetime (#576) 2024-04-04 20:33:50 +02:00
George
303de4423e Add key set payload (#536)
* fix: fix mypy and pyright

* fix: fix nested key case, add tests

* fix: fix mypy

* fix: fix mypy again

* new: extend jsonpath support, update set and get value by key in local mode

* fix: uncomment tests, fix set payload call, fix corner case

* refactor: split payload_value extractor into several files

* docs: update docstring

* refactor: refactor local mode payload setter (#544)

* refactor: refactor local mode payload setter

* fix: fix mypy

* fix: return docstring

* fix: address review issues

* fix: fix extraction from by invalid keys

* fix: move payload tests to a separate folder to be recognized by pytest

* tests: add nested array filters

* review fixes

* fix: fix async

* fix: set payload by key handle escaped quotes

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-03-26 20:54:03 +01:00
George
848c63c1fd fix: make datetime range conditions tz aware (#538)
* fix: do not set tz if it is not provided in local mode

* refactor: remove commented out code

* fix: rollback tzinfo, add tzinfo to conditions in local mode

* fix: slightly increase chance of datetime payload generation
2024-03-13 15:51:49 +01:00
George
bc714a5521 new: add min should clause (#519)
* new: add min should clause

* fix: local mode fix payload filter type hint

* tests: extend conversion

* fix: fix param name

* fix: fix grpc structure, update name
2024-03-02 22:46:53 +01:00
Luis Cossío
46c17e170f Add support for datetime ranges (#517) 2024-03-01 20:57:27 -03:00
Luis Cossío
332777db2a Local mode of order_by parameter in scroll + datetime support (#491)
* generate rest client (only points_api)

* generate grpc client (points part only)

* add local mode implementation

* update collections_api.py

* add grpc conversions

* fix problematic StartFrom Union order

* add basic congruence test

* route order_by in qdrant clients

* fix local mode `start_from` logic

* add library stubs for dateutil

* generate async client

* generate the rest of the rest client 👻

* test datetime values too

* add int Range and int StartFrom

* update points.proto and points_pb2.py

* fix conversion of range interface

* add conversion fixtures and use better conversion of datetime to timestamp

* remove integer range

* restore `value_by_key()`

* OrderBy grpc to rest conversions

* generate async client

* use `OrderByInterface` instead of only `OrderBy`

* - use equivalent qdrant core datetime parsing,
- use type alias for OrderingValue, instead of custom class,
- better random date generation

* Drop custom datetime parser implementation

* nit fixes

* fix flakiness of the congruence test by subsorting

* better datetime to timestamp conversion

* uncomment conversion fixtures, add Direction

* restore poetry.lock and remove dateutil dep

* poetry lock --no-update

* rename datetime.py to datetime_utils.py

* add StrictInt to StartFrom union

* use more date formats in fixtures

* move conversion test to `test_validate_conversions.py`

* drop `%:z` formats

* add more complex timezones to payload fixtures, fix deserialization

* update datetime parsing test
2024-03-01 09:51:39 -03:00
George
a2adc2d2ad new: deprecate upload records, update tests, prohibit migration of co… (#447)
* new: deprecate upload records, update tests, prohibit migration of collections with custom shards

* Update qdrant_client/qdrant_client.py

* Update qdrant_client/async_qdrant_client.py

* new: replace autogenerated int ids with uuids (#448)

* fix: remove redundant kwargs

* fix: regen async

* fix: remove redundant import

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2024-01-19 20:11:31 +01:00
George
e90379f287 Fix sort sparse vectors (#442)
* fix: fix sparse vector sorting

* fix: fix sparse vector sort
2024-01-19 19:38:37 +01:00
Arnaud Gourlay
016032c28f Sparse vectors API and local mode (#378)
* draft

* thread sparse_vectors_config through

* test ingest sparse data

* make async_client consistent for create collection

* regen async

* align client hierarchy

* do not give up

* disable async consistency check for now

* regen

* workaround async client breakage

* generate gRPC

* new healtcheck proto files

* fix gen branch

* fix grpc generation - had to reinstall to downgrade grpcio

* bump test docker image

* wait for update when migrating

* regen REST + update config

* add sparse search congruence

* congruence scroll sparse vectors

* congruence test retrieve sparse

* more sparse tests and waiting on remote

* remove healthcheck service

* misc

* reinstate len check

* fix scoring if no overlap

* sparse distance as numpy float without rounding

* fix payload selector

* fix payload exclude

* dedicated collection name to not collide with openapi engine tests

* fix with_vector, scoring no overlap, closeness assetion

* convert float only once

* regen gRPC to exclude health_check

* code review cleanup

* validate and sort sparse vector before persistence

* regen REST

* test deletes and update with fix

* fix async client

* fix batch size

* fix async client

* don't give up

* remove validated todo

* fix sparse vectors loading test

* fix sparse vectors loading test

* rm empty

* mention sparse vectors in the fake local info

* fix upload collection wait propagation

* fix async. init_from tests

* resync async

* rework test sparse vector generation

* regen clients

* update to dev

* update REST models

* async client

* do not change it yet

* fix migration test

* do not create a sparse configuration by default

* fix backward compatibility by disabling serialization of none fields

* fix type imports

* regen gRPC

* test BatchVectorStruct REST to gRPC conversion

* test gRPC->REST conversion

* sparse grpc tests and conversions fix

* generate async client

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2023-12-02 20:45:49 +01:00
George
0fffa1abd4 Pydantic v2 (#214)
* new: update autogenerated code

* fix: fix config conversions

* new: add pydantic compat

* new: add types to pydantic_compat

* new: update dependencies

* new: use pydantic compat functions

* new: add pydantic v2 field check

* fix typing

* fix typing

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2023-07-16 01:23:21 +02:00
George
ea412c4959 Fix congruence upload (#183)
* fix: fix congruence upload collection list of np.array, fix type hints

* fix: update type hints, remove broken code

* tests: delete collection after test just in case

* fix: return Dict[str, NumpyArray], support it in local mode

* fix: update type
2023-07-08 15:40:36 +04:00
Andrey Vasnetsov
329b4150cf v1.2.0 (#173)
* wip: interface for new APIs

* upd docker version

* remove duplicated comments + extent interface

* start implementing remote client + remove duplicated comments there

* implement remote methods

* quantization converter

* extend coverege

* wip: saving and loading of optional vectors

* update and delete vectors test

* rm unused imports

* nested filters

* fix mypy

* fix pyright

* wip: add search groups and recommend groups (#174)

* wip: add search groups and recommend groups

* fix: fix signature

* fix: fix mypy

* simplify group-by and condition checks

* fix tests

---------

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

* add match except condition + improve group-by tests

* fix: lock typing exchanges due to broken release

* tests: add maybe and maybe_null checks to group tests

* new: add new methods to type stubs

---------

Co-authored-by: George <george.panchuk@qdrant.tech>
2023-05-24 11:06:10 +02:00
Andrey Vasnetsov
c6db1e092d upd to qdrant v1.1.1 + fix isEmpty in local mode (#152)
* upd to qdrant v1.1.1 + fix isEmpty in local mode

* fix mypy
2023-04-11 20:33:00 +02:00
Andrey Vasnetsov
392e3b6d1f Local qdrant (#137)
* base class for qdrant

* WIP: implement local qdrant client

* fix mypy

* fix mypy

* search tests

* search tests

* fix mypy

* scroll test

* filters: fixtures, tests, and fixes

* fix types

* fix types

* fix types

* fix: fix local CollectionInfo, add __test__ to avoid pytest complaints, fix typo

* fix: fix typo in import

* tests: add local upload tests (#139)

* new: make local collection info more similar to remote one

* new: add local upsert tests

* tests: moved compare collections

* scroll tests

* recommendations test

* tests: fix vector comparison in utils, add retrieve tests

* fix: fix types

* persistence test

* fix: fix types

* fix: fix db path creation

* tests: add delete points tests, refactoring (#140)

* skip local tests on old version

* test aliases

* test count

* tests: add delete payload tests, move set and overwrite payload tests

* tests: fix pytest warning

* cover some more stuff with tests

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2023-03-28 14:57:05 +02:00