From b1b9b0aa5ae216961550c1b94dde8dade8c907cb Mon Sep 17 00:00:00 2001 From: Jacob Chapman <7908073+chapmanjacobd@users.noreply.github.com> Date: Tue, 30 Aug 2022 16:19:47 -0500 Subject: [PATCH] add test --- tests/test_fts.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/test_fts.py b/tests/test_fts.py index 477d599..589c134 100644 --- a/tests/test_fts.py +++ b/tests/test_fts.py @@ -556,6 +556,27 @@ def test_enable_fts_error_message_on_views(): " rank_bm25(matchinfo([books_fts], 'pcnalx'))" ), ), + ( + {'include_rank': True}, + "FTS5", + ( + "with original as (\n" + " select\n" + " rowid,\n" + " *\n" + " from [books]\n" + ")\n" + "select\n" + " [original].*,\n [books_fts].rank rank\n" + "from\n" + " [original]\n" + " join [books_fts] on [original].rowid = [books_fts].rowid\n" + "where\n" + " [books_fts] match :query\n" + "order by\n" + " [books_fts].rank" + ), + ), ], ) def test_search_sql(kwargs, fts, expected):