Commit Graph

79 Commits

Author SHA1 Message Date
George
fc6ce2f587 Merge branch 'dev' into drop-python3.9 2025-12-02 11:51:15 +07:00
George
fddf1185ae 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:02:44 +07:00
George
9ce7346e05 new: convert cluster operations to grpc (#1116)
* new: convert cluster operations to grpc

* fix: rollback coverage html

* fix: address ai comments

* fix: address review comments
2025-11-20 13:38:17 +07:00
George
27acfd0d75 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 17:01:17 +07:00
George Panchuk
698db1d33f new: drop python3.9, replace union and optional with | where possible 2025-11-14 03:20:36 +07:00
George
2529d21185 new: add initial_state to create shard key (#1109) 2025-11-13 14:12:57 +01:00
George
ff7f584d33 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>
2025-11-11 21:17:08 +07:00
George Panchuk
11fae12558 new: update models, add max payload index count and copy vectors 2025-10-29 16:39:07 +07:00
George Panchuk
ae40f2ccf1 fix: fix typo 2025-10-29 16:39:07 +07:00
George Panchuk
406318072d new: add conversions and update interface 2025-10-29 16:39:07 +07:00
George Panchuk
165476119d new: remove vectors_count, update http and grpc models 2025-10-29 16:39:07 +07:00
George
e4c7bfaf4f fix: fix grpc document, image, inference object without options conversion (#1052) 2025-07-31 20:41:32 +03:00
Luis Cossío
1a63b86e51 better FieldCondition conversion (#1051) 2025-07-29 11:17:56 -04:00
Luis Cossío
7b17db5a7e MMR integration and local mode (#1044)
* generate rest client

* gen grpc client

* conversions

* inpection cache

* wip implement mmr

* upd openapi models

* tests: add mmr tests

* wip: implement mmr

* new: use postprocessed scores

* fix maxsim asymmetry and empty sparse intersection

* fix: fix conversions

* fix: fix type hints

* chore: update inspection cache

* fix: revert changes to add points and update named vectors

---------

Co-authored-by: generall <andrey@vasnetsov.com>
Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2025-07-18 12:06:50 +03:00
George
4da06b08d6 new: update models for v1.15, add conversions (#1038)
* new: update models for v1.15, add conversions

* rename SnowballParameters to SnowballParams

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2025-07-15 15:39:48 +02:00
Ed Jinks
162a199a52 Fix/add geo polygon support for grpc (#950)
* add geo point to grpc conversion, add rpc recovery, add test

* rm whitespace

* add whitespace

* run pre-commit

* update polygon in test, add missing interiors conversion

* fix: nit fix in geo polygon conversoin, update conversion tests

---------

Co-authored-by: ed <ed@extrac.ai>
Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2025-04-15 11:07:25 +03:00
George
5a454a7402 Recommend sum score (#940)
* new: add sum_scores strategy, fix lookup from in query_batch_points, fix euclid between multivectors local mode

* new: recommend average multivectors, fix tests, add new tests for multivectors

* fix: address review comments

* fix: regen async

* tests: uncomment tests

* new: update poetry lock, require pydantic >=2.11 for populate inspection cache

* fix: tmp disable euclidean multivec search tests, fix multivec with nan test

* fix: align euclid and manhattan with core, add tests

* fix: fix type hints

* tests: use atol in comparison

* tests: remove manhattan tests

* tests: reduce number of multivectors

* remove float comparison relaxation

* explain why it is different for euclid and manhattan

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2025-04-07 11:45:33 +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
6d8509afee optimize schema parser recursion calls, update models (#924)
* fix: optimize schema parser recursive calls

* fix: fix mypy

* new: update models, regenerate cache (#925)

* new: update models, regenerate cache

* new: update conversions

* fix: fix strict mode config in migrate

* new: update field condition conversion with is_null, is_empty

* fix: apply ruff
2025-03-16 19:59:55 +03:00
Arnaud Gourlay
321d2a8073 Regen REST and gRPC clients (#903)
* Regen REST and gRPC clients

* update inspection cache

* update dev doc

* add conversions for new strict mode fields

* handle empty strict mode fields + test

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-02-17 18:32:17 +01:00
George
dffab2e208 update clients (#880)
* update clients

* new: update conversions

* fix: update inspection cache

* update grpc

* bump fastembed to 0.5.1

* update poetry lock

* update poetry lock
2025-01-16 13:01:27 +01:00
Andrey Vasnetsov
3f56da7d02 Update API to v1.13 (#874)
* update openapi and grpc + conversions

* add strict mode to conversions + coverage

* add strict mode to collection creation

* add local mode for has_vectors condition

* regen async with python 3.10

* tests for has-vector

* fix filters in tests

* fix conversion

* fix test

* Has vector tests (#878)

* new: add has vector fixture

* tests: add has vector multivector test

* fix: add missing strict mode config usage and conversion (#877)

* fix: add missing strict mode config usage and conversion

* fix: pass strict mode config in update collection

* fix: add strict mode config to recreate collection

---------

Co-authored-by: George <george.panchuk@qdrant.tech>
2025-01-06 11:44:25 +00: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
George
8d6bee2434 new: make model name mandatory in inference structures (#846) 2024-11-12 19:09:44 +01:00
George
e15b21e5fb Alter image structure (#845)
* new: assign image.image Any type in grpc

* new: update image structure, rename embed utils Path to FieldPath
2024-11-11 18:03:26 +01:00
George
636f3e86fb Inference grpc (#838)
* new: update proto

* fix: rollback too recent changes to proto

* new: add and fix conversions

* fix: fix type hints

* fix: fix comment

* fix: convert options

* fix: fix vector output conversion

* tests: add custom conversion case for new vector fields
2024-11-06 14:32:10 +01:00
George
589772635b fix: fix prefetch conversion, fix local mode query batch points offset, add tests (#812) 2024-10-15 11:25:06 +02:00
George
4bcdedddcc new: add mmap geo index (#804) 2024-10-07 17:53:40 +02: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
George
eec1d5aa92 fix: add sharding method to collection params conversion (#790) 2024-09-24 19:07:51 +02:00
George
54440c0ea4 fix: fix modifier.none conversion (#748) 2024-08-20 22:47:47 +02:00
George
0259a80a71 new: regenerate clients (#729)
* new: regenerate clients

* new: add conversions for payload indices

* regen with latest grpc

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-08-09 19:41:37 +02:00
Arnaud Gourlay
44bbded8f2 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-09 17:03:28 +02:00
George
59a1569438 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-08 16:56:21 +02:00
George
fb7e396e67 fix: fix grpc conversion bugs for sparse and multi vectors (#682)
* fix: fix grpc conversion bugs for sparse and multi vectors

* fix: fix mypy
2024-07-08 20:12:53 +03:00
George
f594c7d156 fix: fix sparse vector config conversion in collection params (#674) 2024-07-03 16:41:29 +03:00
Andrey Vasnetsov
6ff600c94b 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-06-26 17:13:40 +03:00
George
00da88e947 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-06-25 09:21:28 +02:00
George
31aca81b88 new: update prefetch structure, fix start from pydantic v1 bug (#656)
* new: update prefetch structure, fix start from pydantic v1 bug

* fix: fix missing multivec_config replacement in local mode
2024-06-24 12:19:12 +02:00
George
9ea4db1291 new: add conversions pt.1 (#654)
* new: add conversions pt.1

* fix: fix multivec param name

* fix: fix other multivec config param

* fix: fix sparse index config conversion, multivector config typo

* fix: fix empty vectors conversion, fix sparse vector test

* fix: fix legacy sparse vectors usage

* new: add convert query interface

* fix: fix order value conversion

* fix: fix conversion bugs, add tests

* fix: increase coverage

* fix: increase test coverage 2

* fix: fix bugs, increase test coverage

* fix: fix query isinstance check in tests

* minor refactoring

* new: convert flat filter

* fix: add missing min should check

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-06-23 15:36: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
af4941ec51 fix: fix integer index conversion (#640) 2024-06-07 17:29:33 +02:00
Andrey Vasnetsov
720746321f V1.9.x (#608)
* update models

* up backward compatibility version

* refactoring: address review comment

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2024-04-22 14:28:02 +02:00
George
16814b4bb9 fix: fix field schema type conversion (#605)
* fix: fix field schema type conversion

* fix: fix names

* fix: fix payload schema type datetime call
2024-04-17 18:36:02 +02:00
George
bd6e755619 fix: fix date object grpc conversion (#580)
* fix: fix date object grpc conversion

* fix: fix date to datetime conversion in filters in local mode

* fix: fix date isinstance check
2024-04-05 11:52:48 +02:00
George
2e6233800b fix: fix sparse vector conversion (#569) 2024-04-03 11:29:01 +02: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
09d51e65af Remove deprecated field conversions (#502) 2024-03-01 13:12:53 -03:00