feat: add distance_type() parameter to python sync query builders and metric() as an alias (#2073)

This PR aims to fix #2047 by doing the following things:
- Add a distance_type parameter to the sync query builders of Python
SDK.
- Make metric an alias to distance_type.
This commit is contained in:
Vaibhav
2025-01-28 13:59:53 -08:00
committed by GitHub
parent 0a9e1eab75
commit dac0857745
6 changed files with 74 additions and 16 deletions

View File

@@ -366,7 +366,7 @@ def test_query_sync_maximal():
with query_test_table(handler) as table:
(
table.search([1, 2, 3], vector_column_name="vector2", fast_search=True)
.metric("cosine")
.distance_type("cosine")
.limit(42)
.offset(10)
.refine_factor(10)