27 Commits

Author SHA1 Message Date
George
e9ec2c0d2b new: update models to 1.18, add create_named_vector and delete_named_vector (#1201)
* new: update models to 1.18, add create_named_vector and delete_named_vector

* fix: add missing strict mode config updates

* fix: fix local mode create and delete vector name

* new: update turbo quant fields

* fix: persist vector deletion
2026-05-11 20:53:44 +07:00
George
e50eb17f49 Update models 1.17 (#1154)
* new: update models, add conversions, add conversion tests

* new: add list shard keys, add get_optimizations

* new: add weights to rrf

* new: add cluster telemetry

* new: add update_mode usage

* fix: fix mypy

* fix: populate inspection cache

* use RRF ranking as in the core

* timeouts propagation

* gen async clients

* implement score threshold for formular

* new: add tests for update mode

* fix: fix test skip comment

* Relevance feedback local mode (#1152)

* AI: implement local computation

prompt: Considering the implementation in the server, make the local
python implementation of the same scores calculation in this file:
[@distances.py](...), consider that the local mode calculates for all
points at once, while the server does it point by point.

Server impl:
```
...
```

* use constant for MARGIN

* relevance feedback integration and test

* do not exclude relevance context from result

* Revert "do not exclude relevance context from result"

This reverts commit 9c2a5cedc0.

---------

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

* fix: fix conversion test

---------

Co-authored-by: generall <andrey@vasnetsov.com>
Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>
2026-02-19 22:33:00 +07:00
George
9e61a69652 Drop python3.9 (#1110)
* new: remove vectors_count, update http and grpc models

* fix: update inspection cache

* new: add conversions and update interface

* fix: fix some conversions

* fix: fix typo

* fix: fix isinstance

* fix: regen async

* fix: fix update_filter usage, fix isinstance

* tests: collection metadata test

* fix: address backward compatibility in test

* new: update models, add max payload index count and copy vectors

* fix; update _inspection_cache

* new: add read consistency to count points

* Allow uuids in interface (#1085)

* new: direct uuid support

* tests: add uuid tests

* fix: update inspection cache

* new: add collection metadata and tests to local mode (#1089)

* new: add collection metadata and tests to local mode

* fix: regen async client

* new: implement parametrized rrf in local mode (#1087)

* new: implement parametrized rrf in local mode

* refactoring: use a variable for a magic value

* fix: adjust conversion according to AI

* Update filter (#1090)

* new: add missing update_filter, implement it in local mode

* fix: fix type hint, fix update operation, fix rest uploader, add tests

* fix: fix update filter is None case

* fix: mypy was not a good boy

* Text any filter (#1091)

* new: add match text any local mode

* tests: add match text any tests

* new: update models, remove init_from and locks (#1100)

* new: update models, remove init_from and locks

* deprecate: remove init from tests

* deprecate: remove lock tests

* new: convert ascii_folding

* fix: fix type stub

* new: convert acorn

* new: convert shard key with fallback

* new: update grpcio and grpcio tools in generator (#1106)

* new: update grpcio and grpcio tools in generator

* fix: bind grpcio and tools versions to 1.62.0 in generator

* Remove deprecated methods (#1103)

* deprecate: remove old api methods

* deprecate: remove type stub for removed methods

* deprecate: remove old api methods from test_qdrant_client

* deprecate: replace search with query points in test_in_memory

* deprecate: replace search methods in fastembed mixin with query points

* deprecate: replace old api methods in test async qdrant client

* deprecate: replace search with query points in test delete points

* deprecate: replace discover and context with query points in test_discovery

* deprecate: replace recommend_groups with query_points_groups in test_group_recommend

* deprecate: replace search_groups in test_group_search

* deprecate: replace recommend with query points in test_recommendation

* deprecate: replace search with query points in test search

* deprecate: replace context and discover with query points in test sparse discovery

* deprecate: replace search with query points in test sparse idf search

* deprecate: replace recommend with query points in test sparse recommend

* deprecate: replace search with query points in test sparse search

* deprecate: replace missing search request with query request in qdrant_fastembed

* deprecate: replace search with query points in test multivector search queries

* deprecate: replace upload records with upload points in test_updates

* deprecate: remove redundant structs (#1104)

* deprecate: remove redundant structs

* fix: do not use removed conversions in local mode

* fix: remove redundant conversions, simplify types.QueryRequest

* deprecate: replace old style grpc vector conversion to a new one (#1105)

* deprecate: replace old style grpc vector conversion to a new one

* fix: ignore union attr in conversion

* review fixes

---------

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

---------

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

---------

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

* new: deprecate add, query, query_batch in fastembed mixin (#1102)

* new: deprecate add, query, query_batch in fastembed mixin

* 1.16 -> 1.17

---------

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

---------

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

* new: yet another update

* new: add initial_state to create shard key (#1109)

* new: drop python3.9, replace union and optional with | where possible

* fix: fix missing type hints, regen async

* fix: remove redundant optional

* fix: fix ai comments

* fix: update type hints from merge

* new: update pyproject and lock

* new: replace optional and union with |

* new: remove optional and union from qdrant local

* new: replace union with | in client classes

* fix: replace remaining union, optional, etc, address review comments

* new: adjust numpy versioning

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-12-12 17:21:08 +07:00
George
18ec0adb48 new: expose the remaining cluster methods (#1123)
* new: expose the remaining cluster methods

* fix: fix type hints

* new: add deadline info to the first hw

* fix: fix review comments
2025-11-24 20:12:46 +07:00
George
02b8ce4071 new: expose cluster operations (#1114)
* new: expose cluster operations

* fix: fix cluster collection update return result, add tests

* fix test

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-11-14 20:29:41 +01:00
George
0cbb174b56 new: remove vectors_count, update http and grpc models (#1069)
* new: remove vectors_count, update http and grpc models

* fix: update inspection cache

* new: add conversions and update interface

* fix: fix some conversions

* fix: fix typo

* fix: fix isinstance

* fix: regen async

* fix: fix update_filter usage, fix isinstance

* tests: collection metadata test

* fix: address backward compatibility in test

* new: update models, add max payload index count and copy vectors

* fix; update _inspection_cache

* new: add read consistency to count points

* Allow uuids in interface (#1085)

* new: direct uuid support

* tests: add uuid tests

* fix: update inspection cache

* new: add collection metadata and tests to local mode (#1089)

* new: add collection metadata and tests to local mode

* fix: regen async client

* new: implement parametrized rrf in local mode (#1087)

* new: implement parametrized rrf in local mode

* refactoring: use a variable for a magic value

* fix: adjust conversion according to AI

* Update filter (#1090)

* new: add missing update_filter, implement it in local mode

* fix: fix type hint, fix update operation, fix rest uploader, add tests

* fix: fix update filter is None case

* fix: mypy was not a good boy

* Text any filter (#1091)

* new: add match text any local mode

* tests: add match text any tests

* new: update models, remove init_from and locks (#1100)

* new: update models, remove init_from and locks

* deprecate: remove init from tests

* deprecate: remove lock tests

* new: convert ascii_folding

* fix: fix type stub

* new: convert acorn

* new: convert shard key with fallback

* new: update grpcio and grpcio tools in generator (#1106)

* new: update grpcio and grpcio tools in generator

* fix: bind grpcio and tools versions to 1.62.0 in generator

* Remove deprecated methods (#1103)

* deprecate: remove old api methods

* deprecate: remove type stub for removed methods

* deprecate: remove old api methods from test_qdrant_client

* deprecate: replace search with query points in test_in_memory

* deprecate: replace search methods in fastembed mixin with query points

* deprecate: replace old api methods in test async qdrant client

* deprecate: replace search with query points in test delete points

* deprecate: replace discover and context with query points in test_discovery

* deprecate: replace recommend_groups with query_points_groups in test_group_recommend

* deprecate: replace search_groups in test_group_search

* deprecate: replace recommend with query points in test_recommendation

* deprecate: replace search with query points in test search

* deprecate: replace context and discover with query points in test sparse discovery

* deprecate: replace search with query points in test sparse idf search

* deprecate: replace recommend with query points in test sparse recommend

* deprecate: replace search with query points in test sparse search

* deprecate: replace missing search request with query request in qdrant_fastembed

* deprecate: replace search with query points in test multivector search queries

* deprecate: replace upload records with upload points in test_updates

* deprecate: remove redundant structs (#1104)

* deprecate: remove redundant structs

* fix: do not use removed conversions in local mode

* fix: remove redundant conversions, simplify types.QueryRequest

* deprecate: replace old style grpc vector conversion to a new one (#1105)

* deprecate: replace old style grpc vector conversion to a new one

* fix: ignore union attr in conversion

* review fixes

---------

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

---------

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

---------

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

* new: deprecate add, query, query_batch in fastembed mixin (#1102)

* new: deprecate add, query, query_batch in fastembed mixin

* 1.16 -> 1.17

---------

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

---------

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

* new: yet another update

* new: add initial_state to create shard key (#1109)

* chore: remove obsolete imports

* fix: add metadata parameter to recreate collection in local

* fix: fix metadata handling in local more

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-11-14 18:06:31 +07:00
George
edde944bb3 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
2025-01-16 13:38:04 +01:00
George
c5fd1ea648 new: extend signatures with images and inference objects (#842)
* new: extend signatures with images and inference objects

* fix: remove draft code
2025-01-16 13:33:37 +01:00
Andrey Vasnetsov
d53958bfcc make api names consistent with grpc + fix a BUG (#805) 2024-10-07 23:37:01 +02:00
Luis Cossío
bdbe43db00 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-07 11:07:49 +02:00
Hossam Hagag
00bcc68a38 Change upload points async (#730)
* made upload_points sync

* updated base_client_generator

* fix: remove excess file

* refactoring: fix timeout type, remove redundant import

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2024-08-12 16:29:55 +02:00
Arnaud Gourlay
7a84e6e802 universal-search: Query Group API and local mode (#690)
* universal-search: Query Group API and local mode

* requires different logic for gRPC error assertion

* you come to me at runtime for a compile time issue

* suddenly throwing a different error

* test more group key types

* extend limit of prefetches during group_by

* rescoring is the issue

* one problem at a time please

* code review

* regen clients

* code review

* add lookup_from to query_points_groups

* test with_lookup

* test and fix gRPC

* drop dedicated conversion

* Update qdrant_client/qdrant_client.py

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

* regen async

* Distribution-based score fusion in local mode (#703)

* pre-implement dbsf

* add dbsf congruence tests

* mypy lints

* add conversions

* tests: add test for dbsf conversion

---------

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

* Random sample in local mode (#705)

* pre-implement random sampling

* generate models

* add conversions and tests

* fix mypy lints

* tests: add test for sample random conversion

* use camelcase Sample.Random

* review fixes

* fix mypy

---------

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

* fix: add type ignore for mypy

* fix: fix type hints for 3.8

* fix: do not run mypy on async client generator in CI, simplify condition

* Grpc comparison in tests (#726)

* add parametrized fixture for using grpc too

* compare grpc and http without running each setup twice

* fix: fix exception types in invalid types test

* fix: remove random seed which led to a erroneous sequence

---------

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

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2024-08-12 16:29:40 +02:00
George
97a8b353aa new: add info endpoint (#678)
* new: add info endpoint

* fix: fix async generator

* fix: remove crutch, update openapi

* fix: regen async

* fix: regen client with recommend strategy fix
2024-08-12 16:29:28 +02:00
George Panchuk
7d120eea90 new: update query signature, id type and return type 2024-07-01 22:49:22 +02:00
Andrey Vasnetsov
f1dcf557a5 rollback fast-embed query method (#658)
* rollback fastembed query method

* un-deprecate query

* fix: regen async, roll back generator tmp workaround

* fix: don't skip fastembed tests

* new: add query batch points interface, fix minor bugs (#660)

* new: add query batch points interface, fix minor bugs

* fix: do not exclude ids from lookup collection from search (#661)

* Update qdrant_client/qdrant_client.py

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

---------

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

* fix: regen async

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2024-07-01 22:49:18 +02:00
George
39bed1bd02 new: add query interface draft (#655)
* new: add query interface draft

* fix: temporarily update fastembed generator

* review fixes

* generate async client

* generate async client

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-07-01 22:49:12 +02:00
Andrey Vasnetsov
0470536bbf Drop black (#623)
* replace black with ruff

* use line length

* remove isort

* regen async

* regen async

* fix ruff version [no-ci]
2024-06-20 13:00:51 +02:00
George
5de0f3dbcb 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-27 14:01:48 +01:00
George
ee67ccfd16 new: add collection exists interface (#518)
* new: add collection exists interface

* tests: fix version comparison

* tests: add collection exists type stub, add async test
2024-03-04 19:09:50 +01:00
Luis Cossío
ee22ab2919 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-04 19:07:31 +01:00
George
2b8f3d2723 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 21:45:39 +01:00
George
6cc515c548 new: add wait parameters to snapshots, update status codes, update type hints, remove excess asserts (#370)
* wip: add wait parameters to snapshots, update type hints, remove excess assert statements

* fix: fix mypy

* new: fix async client generator, update async client

* fix: update snapshot recover docstrings

* new: update async client

* new: update response code in models

* new: regen async client
2023-12-07 13:37:03 +01:00
Andrey Vasnetsov
e53bc6fa20 Manhattan and shard key (#391)
* support for manhattan distance

* conversion for shard_key_selector

* use shard_key_selector in read api

* allow shard_keys

* regen async

* fix tests

* type checker

* type checker

* tests for custom sharding

* async

* review fixes

* review fixes

* review fixes
2023-12-07 13:36:33 +01:00
Arnaud Gourlay
cbc9ddab30 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-07 13:34:25 +01:00
Luis Cossío
298e67bcdc Add Discovery API and local mode (#368)
* add score calculations

* fix type errors, route scorers accordingly

* generate grpc client (only discovery stuff)

* generate rest client

* discover preprocessing + local mode handling

* implement discover for remote client

* add failing tests, fix some stuff

* update rest client and local mode

* fixes and more tests

* fix mypy errors

* generate async client

* tiny edit docstring

* simplify custom distance calculation,
fix euclidean case for recommend best score

* fix python version for generating grpc client

* update grpc (select only discovery changes)

* generate grpc: add also ShardKey changes,
fix conversion changes for deprecated PointsUpdateOperation operations

* fix coverage on conversions

* generate async client

* generate async client with python 3.11

* change dict -> typings.Dict

* add deprecated field handling for grpc.PointsUpdateOperation

* update grpc client

* fix grpc conversion issues and review comments

* increase coverage

* also test for prefer_grpc = True

* fix has_field

* unflake test_context_many_pairs

* don't convert if None in model conversions

* move docstring to qdrant_client.py

* handle request timeout on all other interfaces

* oopsie: define timeout param in search_batch

* generate async client
2023-12-07 13:32:55 +01:00
Andrey Vasnetsov
0cfc45a340 update interface and version for fastembed (#340)
* update interface and version for fastembed

* fix types

* fix types

* regen async

* use python 3.11 to check compatibility

* fix docstring

* regen async

* propagate batch size
2023-10-16 19:00:47 +02:00
George
2a07215787 Async qdrant client (#319)
* new: manually implemented async qdrant client

* fix: remove await before sync call

* fix: make upload collection, records and migrate synchronous

* fix: add init method to async client base

* refactoring: remove redundant import

* new: add super().__init__ in qdrant remote, update import in http

* new: mvp async qdrant client generator

* new: fix mypy, update generator script, refactoring

* fix: fix test script

* new: update generator launch script, update async files

* new: refactor async client generator

* refactoring: remove redundant operations, add comments, refactor

* new: add isort, black and autoflake to dev dependencies

* fix: add more checks, fix type hints

* fix: do not check types in async client generator for python3.8

* new: do not type check async_qdrant_fastembed

* fix: fix pyright run

* new: update async client tests

* fix: update versions in CI

* new: update pre-commit python version, update autogenerated files

* new: update generated files, add tests for async generator, update generator script

* fix: exclude generator test from 3.8

* fix: fix python version condition

* fix: add python target version for black

* fix: generate async client only on python 3.9
2023-10-16 19:00:21 +02:00