surreal-orm-lite 0.37.5__tar.gz → 0.37.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/CHANGELOG.md +21 -0
  2. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/PKG-INFO +1 -1
  3. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/pyproject.toml +1 -1
  4. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/__init__.py +1 -1
  5. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/query_set.py +10 -6
  6. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/.gitignore +0 -0
  7. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/LICENSE +0 -0
  8. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/Makefile +0 -0
  9. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/README.md +0 -0
  10. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/_sdk.py +0 -0
  11. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/aggregations.py +0 -0
  12. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/auth.py +0 -0
  13. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/cache.py +0 -0
  14. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/changefeed.py +0 -0
  15. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/concurrency.py +0 -0
  16. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/connection_config.py +0 -0
  17. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/connection_manager.py +0 -0
  18. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/constants.py +0 -0
  19. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/decoding.py +0 -0
  20. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/define_parser.py +0 -0
  21. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/edge.py +0 -0
  22. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/embedded.py +0 -0
  23. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/encoding.py +0 -0
  24. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/enum.py +0 -0
  25. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/exceptions.py +0 -0
  26. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/functions.py +0 -0
  27. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/geo.py +0 -0
  28. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/hybrid.py +0 -0
  29. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/introspection.py +0 -0
  30. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/live.py +0 -0
  31. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/model_auth.py +0 -0
  32. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/model_base.py +0 -0
  33. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/model_ddl.py +0 -0
  34. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/model_generator.py +0 -0
  35. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/py.typed +0 -0
  36. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/q.py +0 -0
  37. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/routing.py +0 -0
  38. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/schema.py +0 -0
  39. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/schema_state.py +0 -0
  40. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/search.py +0 -0
  41. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/signals.py +0 -0
  42. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/subquery.py +0 -0
  43. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/surql_literal.py +0 -0
  44. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/testing/__init__.py +0 -0
  45. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/testing/database.py +0 -0
  46. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/testing/fixtures.py +0 -0
  47. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/time_travel.py +0 -0
  48. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/transaction.py +0 -0
  49. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/types.py +0 -0
  50. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/utils.py +0 -0
  51. {surreal_orm_lite-0.37.5 → surreal_orm_lite-0.37.6}/src/surreal_orm_lite/vector.py +0 -0
@@ -5,6 +5,27 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.37.6] - 2026-10-27
9
+
10
+ Follow-up to the review of v0.37.0 (#340): `hybrid_search()`'s docstring words its cross-line guarantee as
11
+ README section 38 does, and an empty `text_query` is tested against a server. No new public API.
12
+
13
+ ### Fixed
14
+
15
+ - **`hybrid_search()`'s docstring states the cross-line guarantee with its condition** (#343).
16
+ `help(QuerySet.hybrid_search)` said the records, scores and order are the same on every line;
17
+ it now says that the same two lists give the same records, scores and order on every line, and
18
+ that the lists themselves can differ (the HNSW search is approximate, the full-text list follows
19
+ the line's BM25 scores). The `dist` argument names the exact scan's ties at the `vector_limit`-th
20
+ place on SurrealDB 2.x and the embedded engine, which the ORM keeps by id since v0.37.4.
21
+
22
+ ### Changed
23
+
24
+ - A server test now covers an empty `text_query`: it matches nothing, so the vector list alone is
25
+ fused and every `_search_score` is `None`, with the HNSW index and with an exact scan, over
26
+ WebSocket and HTTP and on the embedded engine. Measured on SurrealDB 2.7.0 and 3.3.4; 3.1.5
27
+ behaves as 3.3.4.
28
+
8
29
  ## [0.37.4] - 2026-10-27
9
30
 
10
31
  Follow-up to the review of v0.37.0 (#340): the exact scan (`dist=`) of `similar_to()` and
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: surreal-orm-lite
3
- Version: 0.37.5
3
+ Version: 0.37.6
4
4
  Summary: Lightweight Django-style ORM for SurrealDB using the official Python SDK. Async support with Pydantic validation.
5
5
  Project-URL: Homepage, https://github.com/EulogySnowfall/SurrealDB-ORM-lite
6
6
  Project-URL: Documentation, https://github.com/EulogySnowfall/SurrealDB-ORM-lite
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "surreal-orm-lite"
3
- version = "0.37.5"
3
+ version = "0.37.6"
4
4
  description = "Lightweight Django-style ORM for SurrealDB using the official Python SDK. Async support with Pydantic validation."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -1,4 +1,4 @@
1
- __version__ = "0.37.5"
1
+ __version__ = "0.37.6"
2
2
 
3
3
  from ._sdk import BoundExcluded, BoundIncluded
4
4
  from .aggregations import Aggregation, Avg, Count, Max, Min, Sum
@@ -2159,14 +2159,15 @@ class QuerySet:
2159
2159
  counted from 1, and the records come back best first; equal scores keep the vector list's order first, then
2160
2160
  the full-text list's for the records it alone found. SurrealDB 3.x fuses the lists with its ``search::rrf()``;
2161
2161
  SurrealDB 2.x and the embedded engine have no such function, so the ORM fuses them with the same formula: the
2162
- records, scores and order are the same on every line. The vector and the text are bound as query variables,
2163
- never written into the statement.
2162
+ same two lists give the same records, scores and order on every line. Each list is SurrealDB's own, so the
2163
+ lists themselves can differ between lines: the HNSW search is approximate, and the full-text list follows the
2164
+ line's BM25 scores (a term found in more than half the documents scores ``0.0`` on SurrealDB 3.x and below
2165
+ zero on 2.x and the embedded engine, README section 36). The vector and the text are bound as query
2166
+ variables, never written into the statement.
2164
2167
 
2165
2168
  Each record is a dict — the full SurrealDB-ORM's result: its fields keyed by their Python names and
2166
2169
  ``_rrf_score``, plus ``_knn_distance`` (its distance, ``None`` when only the full-text search found it) and
2167
- ``_search_score`` (its BM25 score, ``None`` when only the vector search found it). An exact scan (``dist=``)
2168
- gives identical calls one vector list on every line: records at an equal distance at the ``vector_limit``-th
2169
- place are kept by id on SurrealDB 2.x and the embedded engine, as ``similar_to(dist=...)`` keeps them.
2170
+ ``_search_score`` (its BM25 score, ``None`` when only the vector search found it).
2170
2171
 
2171
2172
  Each search needs its index. Without a full-text index on ``text_field``, SurrealDB 3.3, 2.x and the embedded
2172
2173
  engine refuse the search (``SurrealDbError`` naming the field), while SurrealDB 3.1 and 3.2 match nothing.
@@ -2197,7 +2198,10 @@ class QuerySet:
2197
2198
  ef: The HNSW search's candidate list: ``None`` (100) or an ``int`` from 1 to 10000, raised to
2198
2199
  ``vector_limit``.
2199
2200
  dist: An exact scan by this distance instead of the index's search: ``EUCLIDEAN``, ``COSINE``,
2200
- ``MANHATTAN``, ``CHEBYSHEV`` or ``HAMMING``, in any case; not with ``ef``.
2201
+ ``MANHATTAN``, ``CHEBYSHEV`` or ``HAMMING``, in any case; not with ``ef``. SurrealDB 2.x's and the
2202
+ embedded engine's own scan picks among records at an equal distance at the ``vector_limit``-th place
2203
+ in no fixed order, so there the ORM ranks it by distance, then id, as ``similar_to(dist=...)`` does:
2204
+ the tied records are kept by id, and identical calls get one vector list on every line.
2201
2205
 
2202
2206
  Returns:
2203
2207
  list[dict[str, Any]]: The fused records, best first, each a dict of its fields and ``_rrf_score``,