diff options
Diffstat (limited to 'p2pvr/daemon/sql/SI_eventSearch.sql')
-rw-r--r-- | p2pvr/daemon/sql/SI_eventSearch.sql | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/p2pvr/daemon/sql/SI_eventSearch.sql b/p2pvr/daemon/sql/SI_eventSearch.sql index 5d14a98..3a43b41 100644 --- a/p2pvr/daemon/sql/SI_eventSearch.sql +++ b/p2pvr/daemon/sql/SI_eventSearch.sql @@ -27,6 +27,8 @@ from events e where tsrange(?, ?, '[)') && tsrange(e.starttime, e.stoptime) and (e.serviceId = ? or ?::int is null) and (event_tsvector(e) @@ plainto_tsquery(?) or ?::text is null) -order by max(ts_rank(event_tsvector(e), plainto_tsquery(?::text))) over(order by title, subtitle, description) desc, +order by + max(ts_rank(event_tsvector(e), plainto_tsquery(?))) over(partition by title) desc, + max(ts_rank(event_tsvector(e), plainto_tsquery(?))) over(partition by title, subtitle, description) desc, e.title, e.subtitle, e.starttime, e.serviceId, e.eventId |