Commit Graph
100 Commits
Author SHA1 Message Date
de3c4328ef fix: local mode text/phrase and is-null semantics diverge from server — CI congruence failures investigated (#1394)
* fix: mirror server token-aware text/phrase matching on unindexed fields

qdrant/qdrant#10341 (dev) changed MatchText and MatchPhrase on fields
without a text index from a substring scan to token-aware matching via
the default word tokenizer: every query token must appear as a whole
document token (text, order-independent; consecutive for phrase), empty
queries match nothing. Local mode still substring-scanned, so congruence
tests randomly failed whenever the filter generator drew a MatchText
whose word is a substring of another fixture word ("fly" in "butterfly",
"ant" in "elephant"). MatchTextAny keeps substring semantics, matching
the server.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R25zh9xS78xMHgPcoFaUdw

* fix: match null elements inside arrays in local IsNull condition

qdrant/qdrant#10101 (dev) made the unindexed IsNull check inspect array
elements: a value like [null, 1] now satisfies IsNull (one level deep).
Local mode only matched values that were null themselves. This was the
second divergence behind the congruence CI failures, previously masked
by the MatchText one because pytest runs with -x.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R25zh9xS78xMHgPcoFaUdw

* fix: close local client before reopening storage in persistence tests

The persistence tests released the storage lock with `del local_client`,
relying on garbage collection timing; when the lock outlived the del,
reopening the same directory raised "Storage folder is already accessed
by another instance". test_query.py was already fixed to call close()
(90913f8); apply the same fix to the remaining five persistence tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R25zh9xS78xMHgPcoFaUdw

* fix: bound remote group hits by exact local hits instead of equality

Server-side grouping is best-effort within a request budget (qdrant
lib/shard/src/grouping/driver.rs): once the budget is spent, a group may
be filled with worse points than its true best, or stay below
group_size. Local mode groups exhaustively, so asserting exact per-rank
score equality of deep group hits randomly failed when the fill budget
missed a group member (test_query_group, local 0.6926 vs remote 0.6798
at rank 4). Compare one-sided instead: at any rank the remote hit may be
worse than the exact local one, never better; the top hit stays strict.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R25zh9xS78xMHgPcoFaUdw

* test: move local text-match and is-null tests to their conventional homes

The two new test files sat at the tests/ root. Local-mode behavior belongs in
qdrant_client/local/tests, and filter corner cases in
tests/congruence_tests/test_complex_filters.py.

- the check_match assertions mirroring the server's unindexed_text_match_test.rs
  move into qdrant_client/local/tests/test_payload_filters.py, next to the other
  filter unit tests
- the client-level cases become congruence tests in test_complex_filters.py, so
  they compare local against a real server instead of asserting local behavior
  alone: text/phrase/text-any matching on an unindexed field, and IsNull over
  arrays holding a null

Both congruence tests fail against the pre-fix payload_filters and pass with it,
against qdrant 1.19.1-dev.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* tests: add non-consecutive case for match filter

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2026-09-16 00:25:42 +07:00
Andrey VasnetsovandGeorge Panchuk 07f19f7dee Per-request custom headers for tracing (#1173)
* implement thread-local header overwrite for setting headers for individual requests

* mypy

* fix: remove redundant import in init, remove redundant import in qdrant remote

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2026-05-11 20:53:38 +07:00
Andrey Vasnetsov 4234208b82 Update README.md (#1046) 2025-07-18 11:58:16 +03:00
Andrey Vasnetsov 85db0f50c9 Update README.md (#1021) 2025-06-14 00:39:14 +04:00
Andrey Vasnetsov b817c54a24 add tests and fix field schema conversion in case grpc is used (#910)
* add tests and fix field schema conversion in case grpc is used

* regen async client
2025-04-22 15:34:52 +03:00
generall 64311d3a19 bump version to v1.13.2 2025-01-22 17:05:04 +01:00
Andrey Vasnetsov 317e7d6517 use proper urljoin (#890) 2025-01-22 17:04:47 +01:00
generall 662acac321 bump version to v1.13.1 2025-01-22 16:31:48 +01:00
Andrey Vasnetsov f8ac59ab45 cover whole check with try catch, remove + "/", use proper urljoin (#889)
* cover whole check with try catch, remove + "/", use proper urljoin

* upd async client
2025-01-22 16:29:32 +01:00
Andrey VasnetsovandGeorge a0d6c4bfdb 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-16 13:38:51 +01:00
Andrey Vasnetsov d53958bfcc make api names consistent with grpc + fix a BUG (#805) 2024-10-07 23:37:01 +02:00
generall 5290d17ef3 bump version to v1.10.0 2024-07-01 23:11:50 +02:00
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
Andrey VasnetsovandGeorge afb8d2d11d 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-07-01 22:48:48 +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
Andrey VasnetsovandGeorge Panchuk 6b001b8819 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:29:52 +02:00
Andrey VasnetsovandGeorge Panchuk eee34e8b6e deprecate recreate_collection (#601)
* add deprecation warning

* async client

* fmt

* fix: replace logging.warning with warnings.warn

* refactoring: update warning

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2024-04-22 12:28:26 +02:00
Andrey VasnetsovandGeorge Panchuk 0ce5ca022d do not use vectors_count in test and in local mode (#600)
* do not use vectors_count in test and in local mode

* fix: remove indexed vectors count comparison in sparse vector tests

* tests: return tests for full snapshot, increase timeout

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2024-04-22 12:28:19 +02:00
Andrey VasnetsovandGeorge 0d7e46ce63 WIP: hybrid search with fastembed (#553)
* WIP: hybrid search with fastembed

* hybrid queries with fastembed

* test for hybrid

* fix typo

* new: extend hybrid search tests, fix mypy, small refactoring (#554)

* refactor: align model name parameters in setters, update tests

* fix: fix async

* fix: add a good test, fix sparse vectors in query batch

* refactoring: reduce branching, refactor fastembed tests

---------

Co-authored-by: George <george.panchuk@qdrant.tech>
2024-03-27 14:01:53 +01:00
Andrey Vasnetsov 3964a49db6 include fastembed model into the list of all models (#412) 2024-01-19 21:43:29 +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
generall 8875b45fea bump version 1.6.9 2023-11-15 22:50:22 +01:00
generall 994dc01a74 fix force_disable_check_same_thread for LocalCollection load again 2023-11-15 22:49:46 +01:00
generall 59b8f91644 bump version 1.6.8 2023-11-15 21:56:17 +01:00
generall a3748acf46 fix async_qdrant_local 2023-11-15 21:56:02 +01:00
generall c5c02eafe8 bump version 1.6.7 2023-11-15 21:53:39 +01:00
generall ff7a152b28 fix LocalCollection initialization 2023-11-15 21:53:14 +01:00
generall f1faca44f3 bump version 1.6.6 2023-11-15 15:22:15 +01:00
Andrey Vasnetsov 91d44df4b2 force_disable_check_same_thread flag (#376) 2023-11-15 15:21:42 +01:00
generall e207d1de41 bump version 1.6.5 2023-11-15 11:27:53 +01:00
generall a54448b97a bump version 1.6.3 2023-10-16 23:32:58 +02:00
generall 3de2d67a6a regen async 2023-10-16 23:32:36 +02:00
generall 3ba3c1f4d3 fix _embed_documents performance 2023-10-16 23:32:32 +02:00
generall 98c2de194a bump version 1.6.2 2023-10-16 19:18:50 +02:00
generall cb2159e2e8 bump version 1.6.1 2023-10-16 19:02:40 +02:00
generall 30788edbd5 update async readme 2023-10-16 19:01:01 +02: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
generall 056e5a10a9 bump version 1.6.0 2023-10-06 22:15:24 +02:00
Andrey Vasnetsov 66ae8f72d3 update payload selector and tests (#330)
* update payload selector and tests

* fix mypy
2023-10-06 22:12:39 +02:00
Andrey Vasnetsov d2a8b43a1b python 3.12 support (#326) 2023-10-06 22:08:43 +02:00
Andrey VasnetsovandLuis Cossío 4ebc8288d9 Recommendation api update + local mode (#314)
* WIP: recommendation api update

* implement local new reco + add new tests

* refactor calculate_best_scores, normalize score assertion

* fix raw vectors in new recommend

* fix mypy errors, add new reco on group recommend

* fix more lints from ci

* fix pyright lint

* formattng

* Add descriptions to enums

* no mutable default argument

* edit score comparison precision based on magnitude

* Address review comments

* remove custom message for type ignore

* add coverage test

* improve coverage test a little

* add more fixtures for conversion test

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2023-10-06 22:08:38 +02:00
generall 82ecb104ed bump version 1.5.4 2023-09-12 20:39:52 +02:00
generall 9777800694 bump version 1.5.3 2023-09-12 20:37:19 +02:00
Andrey Vasnetsov 27d4e2197b fix fastembed for pydantic 1.x (#285)
* fix fastembed for pydantic 1.x

* add extras setup in readme

* move fastembed from group to extras

* lock
2023-09-11 17:19:57 +04:00
Andrey Vasnetsov c1e640ff25 V1.5.0 (#281)
* up version

* up integration tests version
2023-09-07 12:37:35 +02:00
generall cc34721c6f fix README for fastembed 2023-09-07 12:30:38 +02:00
Andrey Vasnetsov 41fd8015b7 sync API (#280)
* sync API

* fix tests

* backward compatibility version up
2023-09-07 12:23:46 +02:00
Andrey Vasnetsov 67d2538233 add tests for vector operations (#275)
* add tests for vector operations

* rename vectors->points in vector update API

* fix tests
2023-09-07 12:23:36 +02:00
generall 38b9ef2168 sync indexed_only and binary quant params 2023-09-07 12:23:07 +02:00
generall fd0f52a273 add pull request template 2023-08-21 13:50:10 +02:00
Andrey VasnetsovandGeorge 22f851d1a3 new: add get args for subscripted generics (#260) (#262)
* new: add get args for subscripted generics

* refactoring: remove redundant type (#261)

Co-authored-by: George <george.panchuk@qdrant.tech>
2023-08-21 12:48:41 +02:00
Andrey Vasnetsov 898de18a11 disable forcing of http2 for cloud connections (#258) 2023-08-21 11:31:48 +02:00
Andrey Vasnetsovandtimvisee 31252b7650 V1.4.0 (#238)
* new models conversions

* new models conversions

* Add update collection test

* ignore collection update test

* fix type check

* fix python 3.7

---------

Co-authored-by: timvisee <tim@visee.me>
2023-08-03 11:02:11 +02:00
generall 6616e1838d fix types 2023-07-22 11:58:37 +02:00
generall aacd291ff3 more timeouts 2023-07-21 23:15:25 +02:00
Andrey Vasnetsov 13b0a9ec63 MacOS CI (#226)
* increase collection timeout

* fix

* more timeouts
2023-07-21 22:13:47 +02:00
Andrey Vasnetsov 730ed8d239 add missing init_from param (#205) 2023-07-17 10:05:20 +02:00
Andrey Vasnetsov 7fa25c8e77 Include license 2023-06-26 14:11:06 +02:00
Andrey Vasnetsov 1ec45bd97b V1.3.0 (#194)
* wip: implement release checnges

* lookup tests

* fix mypy
2023-06-23 14:52:04 +02:00
Andrey Vasnetsov 0d3448c9af fix parsing of localhost:6333 as url 2023-06-09 19:12:27 +02:00
Andrey Vasnetsov d42bd635e4 test for empty vectors 2023-06-08 23:56:43 +02:00
Andrey VasnetsovandGeorge 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 b9b8d96aa9 v1.1.7 2023-05-09 17:39:50 +02:00
Andrey VasnetsovandKacper Łukawski 071b190573 test for large vectors persistence (#167)
* test for large vectors persistence

* large vectors for tests

* use sqlite for persistence

* mypy + migration error reporting

* fix sphinx version

* Local persistence test fixes (#169)

* Reload the collections to support multiple clients

* Extend the test_local_persistence.py with assertions

* prevent parallel access

* fix types

---------

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

---------

Co-authored-by: Kacper Łukawski <kacperlukawski@users.noreply.github.com>
2023-05-09 17:38:17 +02:00
Andrey Vasnetsov c309d1bf8f readme + version 2023-04-26 00:03:19 +02:00
Andrey Vasnetsov 2650c350ac expose raw async grpc client (#159)
* expose raw async grpc client

* fix intercepters in async channels
2023-04-25 23:51:06 +02:00
Andrey Vasnetsov b68cbd5e79 fix typing 2023-04-20 11:35:20 +02:00
Andrey Vasnetsov 6c31b1b9bd allow api key with http 2023-04-19 16:27:32 +02:00
Andrey Vasnetsov ddede52acc redundent test 2023-04-13 10:51:14 +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 8afc8d6d31 fix collections test 2023-04-10 15:47:19 +02:00
Andrey Vasnetsov 9ec4136e8f fix get_collections in local mode 2023-04-08 16:50:39 +02:00
Andrey Vasnetsov d784afaff6 add test 2023-04-07 14:12:04 +02:00
Andrey Vasnetsov 7fe659bb1c colab example 2023-03-31 00:17:22 +02:00
Andrey Vasnetsov aa5a1a36e2 up version 2023-03-30 23:21:29 +02:00
Andrey Vasnetsov 3a0141aba6 fix pypi link 2023-03-30 23:04:27 +02:00
Andrey Vasnetsov 843edd1299 pipy badge 2023-03-30 23:03:07 +02:00
Andrey Vasnetsov fd3d997c64 update url 2023-03-30 21:57:16 +02:00
Andrey Vasnetsov 0e88c48854 wip: universal entry point (#142)
* wip: universal entry point

* init entry points

* fix types

* fix types

* fix types

* fix types

* rename qdrant_impl to _client

* upd readme

* big picture

* fix wording
2023-03-30 21:40:28 +02:00
Andrey VasnetsovandGeorge Panchuk 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
Andrey VasnetsovandGeorge Panchuk 8840f2b5bf V1.1.0 (#134)
* WIP: generate models and conversions

* update quantization param + match any condition + test

* update versions

* consistent naming

* use old grpc types generator

* fix: update type hints

* disable match-any in backward comp test

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2023-03-17 20:06:10 +01:00
Andrey Vasnetsov 3ef675f573 upd to v1.0.5 2023-03-12 14:48:34 +01:00
Andrey Vasnetsov b9ae526f03 add check for http in host param 2023-03-12 14:47:51 +01:00
Andrey Vasnetsov 8100ea4d0e skip validation while converting scored points (#128) 2023-03-12 12:49:23 +01:00
Andrey Vasnetsov 1878ce7df4 Update README.md 2023-03-11 21:05:47 +01:00
Andrey Vasnetsov b7a6828b96 v1.0.3 2023-03-01 15:00:06 +01:00
Andrey Vasnetsov 848ef68f8e fix scroll request next page id with gprc (#122)
* fix scroll request next page id with gprc

* fix types

* ignore mypy whining

* types
2023-02-28 12:57:35 +01:00
Andrey Vasnetsov 9d3119032d add urllib3 to deps + version up 2023-02-24 14:36:36 +01:00
Andrey Vasnetsov 2e3addc6a8 Update README.md (#118) 2023-02-24 13:33:40 +01:00
Andrey Vasnetsov 93422b29c1 allow specify start method for parallel process 2023-02-15 16:22:17 +01:00
Andrey Vasnetsov fb3e3e172a up version in pyproject 2023-02-08 11:12:20 +01:00
Andrey VasnetsovandGeorge Panchuk c3389e3c20 update api to v1.0.0 (#101)
* update api

* upd openapi fix bugs

* pylance fix

* fix: add TypeAlias to some common types

* fix: update models import for pylance

* fix: fix Batch test

* fix: update mypy config

* fix: define Payload before Batch

* fix: add missing .result to requests, add assert None for responses (#102)

* pylance fix in generator

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2023-02-08 11:11:25 +01:00
Andrey Vasnetsov 7ef11264bd add batch to test cases 2023-02-05 22:08:19 +01:00
Andrey Vasnetsov 58fa65156e fix snapshot restore API 2023-01-22 13:39:55 +01:00
Andrey Vasnetsov f829ed9745 upd to v0.11.7 2023-01-13 16:06:28 +01:00
Andrey Vasnetsov 9b64ada9f5 explicit timeout param (#86) 2022-12-30 16:02:51 +01:00
Andrey Vasnetsov b4c49fd5e5 v0.11.6 (#82) 2022-12-27 14:44:34 +01:00
Andrey Vasnetsov f08f41c291 Update __init__.py 2022-12-08 19:49:01 +01:00
Andrey Vasnetsov 8502755352 update to v0.11.5 (#81)
* update to v0.11.5

* fix backward compatibility

* fix backward compatibility again
2022-12-06 21:41:16 +01:00
Andrey Vasnetsov 31b4a8c85d V0.11.4 (#80)
* upd to qdrant v0.11.4

* upd qdrant version in tests
2022-11-25 17:07:09 +01:00