diff options
author | Erik Johnston <erik@matrix.org> | 2015-10-23 15:27:51 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-10-23 15:27:51 +0100 |
commit | b8e37ed94416d88db6853cefd349ce8805ec2295 (patch) | |
tree | a8a8100ee5e888ee477afcb8e838a08f94be8629 /synapse/storage/search.py | |
parent | Merge pull request #323 from matrix-org/daniel/sizelimits (diff) | |
parent | Implement rank function for SQLite FTS (diff) | |
download | synapse-b8e37ed94416d88db6853cefd349ce8805ec2295.tar.xz |
Merge pull request #327 from matrix-org/erikj/search
Implement rank function for SQLite FTS
Diffstat (limited to 'synapse/storage/search.py')
-rw-r--r-- | synapse/storage/search.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/storage/search.py b/synapse/storage/search.py index 9608b5d6a7..cdf003502f 100644 --- a/synapse/storage/search.py +++ b/synapse/storage/search.py @@ -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: |