mirror of
https://github.com/asg017/sqlite-vec.git
synced 2026-04-26 09:16:22 +02:00
refactor some text knn filtering
This commit is contained in:
parent
1a216a684d
commit
10a2216845
3 changed files with 101 additions and 105 deletions
|
|
@ -1434,6 +1434,7 @@
|
|||
# name: test_stress.1
|
||||
OrderedDict({
|
||||
'sql': '''
|
||||
|
||||
select
|
||||
movie_id,
|
||||
title,
|
||||
|
|
@ -1448,6 +1449,7 @@
|
|||
and num_reviews between 100 and 500
|
||||
and mean_rating > 3.5
|
||||
and k = 5;
|
||||
|
||||
''',
|
||||
'rows': list([
|
||||
OrderedDict({
|
||||
|
|
@ -1875,12 +1877,6 @@
|
|||
]),
|
||||
})
|
||||
# ---
|
||||
# name: test_text_knn.10
|
||||
dict({
|
||||
'error': 'OperationalError',
|
||||
'message': 'Could not filter metadata fields',
|
||||
})
|
||||
# ---
|
||||
# name: test_text_knn.2
|
||||
dict({
|
||||
'v_chunks': OrderedDict({
|
||||
|
|
|
|||
|
|
@ -120,16 +120,6 @@ def test_text_knn(db, snapshot):
|
|||
== snapshot()
|
||||
)
|
||||
|
||||
# this break KNN :(
|
||||
db.execute("insert into v(vector, name) values ('[3.0]', '1234567890123')")
|
||||
assert (
|
||||
exec(
|
||||
db,
|
||||
"select rowid, name, distance from v where vector match '[.01]' and k = 5 and name != 'aaa'",
|
||||
)
|
||||
== snapshot()
|
||||
)
|
||||
|
||||
|
||||
def test_long_text_updates(db, snapshot):
|
||||
db.execute(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue