Skip to content

Commit 381cc73

Browse files
authored
add include_rank parameter to Table.search
1 parent 577078f commit 381cc73

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sqlite_utils/db.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2641,6 +2641,7 @@ def search(
26412641
offset: Optional[int] = None,
26422642
where: Optional[str] = None,
26432643
where_args: Optional[Union[Iterable, dict]] = None,
2644+
include_rank: bool = False,
26442645
quote: bool = False,
26452646
) -> Generator[dict, None, None]:
26462647
"""
@@ -2654,6 +2655,7 @@ def search(
26542655
:param offset: Optional integer SQL offset.
26552656
:param where: Extra SQL fragment for the WHERE clause
26562657
:param where_args: Arguments to use for :param placeholders in the extra WHERE clause
2658+
:param include_rank: Select the search rank column in the final query
26572659
:param quote: Apply quoting to disable any special characters in the search query
26582660
26592661
See :ref:`python_api_fts_search`.
@@ -2673,6 +2675,7 @@ def search(
26732675
limit=limit,
26742676
offset=offset,
26752677
where=where,
2678+
include_rank=include_rank,
26762679
),
26772680
args,
26782681
)

0 commit comments

Comments
 (0)