mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-05 09:24:16 -04:00
Implement rank function for SQLite FTS
This commit is contained in:
parent
671ac699f1
commit
0c36098c1f
3 changed files with 30 additions and 2 deletions
|
@ -72,7 +72,8 @@ class SearchStore(SQLBaseStore):
|
|||
)
|
||||
elif isinstance(self.database_engine, Sqlite3Engine):
|
||||
sql = (
|
||||
"SELECT 0 as rank, room_id, event_id FROM event_search"
|
||||
"SELECT rank(matchinfo(event_search)) as rank, room_id, event_id"
|
||||
" FROM event_search"
|
||||
" WHERE value MATCH ?"
|
||||
)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue