mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-10 13:52:58 +00:00
Better handle empty results from tantivy (#155)
Closes #154 --------- Co-authored-by: Chang She <chang@lancedb.com>
This commit is contained in:
@@ -82,3 +82,10 @@ def test_create_index_multiple_columns(tmp_path, table):
|
||||
assert len(df) == 10
|
||||
assert "text" in df.columns
|
||||
assert "text2" in df.columns
|
||||
|
||||
|
||||
def test_empty_rs(tmp_path, table, mocker):
|
||||
table.create_fts_index(["text", "text2"])
|
||||
mocker.patch("lancedb.fts.search_index", return_value=([], []))
|
||||
df = table.search("puppy").limit(10).to_df()
|
||||
assert len(df) == 0
|
||||
|
||||
Reference in New Issue
Block a user