fix dsl term with multi fields (#3403)

Signed-off-by: zongyufen <zongyufen@foxmail.com>
This commit is contained in:
ThreadDao 2020-08-22 16:41:31 +08:00 committed by GitHub
parent 2633319c9d
commit 49218f5490
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1261,9 +1261,8 @@ class TestSearchDSL(object):
term = update_term_expr({"term": {}}, [term_first, term_second])
expr = {"must": [gen_default_vector_expr(default_query), term]}
query = update_query_expr(default_query, expr=expr)
res = connect.search(collection, query)
assert len(res) == nq
assert len(res[0]) == 0
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
# TODO
@pytest.mark.level(2)
@ -1327,8 +1326,8 @@ class TestSearchDSL(object):
expr = {"must": [gen_default_vector_expr(default_query), range]}
query = update_query_expr(default_query, expr=expr)
res = connect.search(collection, query)
assert len(res) == nq
assert len(res[0]) == 0
with pytest.raises(Exception) as e:
res = connect.search(collection, query)
"""
******************************************************************