chore: upgrade Lance and rename score to _distance (#398)

BREAKING CHANGE: The `score` column has been renamed to `_distance` to
more accurately describe the semantics (smaller means closer / better).

---------

Co-authored-by: Lei Xu <lei@lancedb.com>
This commit is contained in:
Will Jones
2023-08-11 21:42:33 -07:00
committed by GitHub
parent 902a402951
commit 722462c38b
10 changed files with 32 additions and 28 deletions

View File

@@ -73,8 +73,8 @@ class LanceQueryBuilder:
... .select(["b"])
... .limit(2)
... .to_df())
b vector score
0 6 [0.4, 0.4] 0.0
b vector _distance
0 6 [0.4, 0.4] 0.0
"""
def __init__(
@@ -205,7 +205,7 @@ class LanceQueryBuilder:
"""
Execute the query and return the results as a pandas DataFrame.
In addition to the selected columns, LanceDB also returns a vector
and also the "score" column which is the distance between the query
and also the "_distance" column which is the distance between the query
vector and the returned vector.
"""
@@ -217,7 +217,7 @@ class LanceQueryBuilder:
[Apache Arrow Table](https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table).
In addition to the selected columns, LanceDB also returns a vector
and also the "score" column which is the distance between the query
and also the "_distance" column which is the distance between the query
vector and the returned vectors.
"""
vector = self._query if isinstance(self._query, list) else self._query.tolist()