mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-30 20:06:22 -05:00
Files can be searched.
This commit is contained in:
parent
a5e8ef16b6
commit
643c86e9a4
7 changed files with 187 additions and 87 deletions
|
|
@ -126,6 +126,9 @@ def refresh_files():
|
|||
|
||||
|
||||
def search(search_str: str, limit: int, offset: int):
|
||||
"""
|
||||
Search the "title" of each file. The title is the words in the file's stem.
|
||||
"""
|
||||
with get_db_curs() as curs:
|
||||
stmt = '''
|
||||
SELECT id, ts_rank_cd(textsearch, websearch_to_tsquery(%(search_str)s)), COUNT(*) OVER() AS total
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue