feat(python): expose group-by search to Python API (#561)
Co-authored-by: jiliang.ljl <jiliang.ljl@alibaba-inc.com>
This commit is contained in:
co-authored by
jiliang.ljl
parent
2d00cb718b
commit
1afdea8dc5
@@ -172,7 +172,9 @@ class TestFtsOnlyCollectionLifecycle:
|
||||
class TestFtsOnlyCollectionQueryValidation:
|
||||
def test_vector_query_rejected(self, fts_collection: Collection):
|
||||
"""Vector query on a no-vector collection must raise."""
|
||||
with pytest.raises(ValueError, match="No vector field found"):
|
||||
with pytest.raises(
|
||||
ValueError, match="Vector field 'content' not found in schema"
|
||||
):
|
||||
fts_collection.query(
|
||||
queries=Query(field_name="content", vector=[0.1, 0.2, 0.3]),
|
||||
topk=5,
|
||||
@@ -181,7 +183,9 @@ class TestFtsOnlyCollectionQueryValidation:
|
||||
def test_id_query_rejected(self, fts_collection: Collection):
|
||||
"""ID-based query on a no-vector collection must raise."""
|
||||
fts_collection.insert(_make_docs()[:1])
|
||||
with pytest.raises(ValueError, match="No vector field found"):
|
||||
with pytest.raises(
|
||||
ValueError, match="Vector field 'content' not found in schema"
|
||||
):
|
||||
fts_collection.query(
|
||||
queries=Query(field_name="content", id="pk_0"),
|
||||
topk=5,
|
||||
|
||||
Reference in New Issue
Block a user