diff options
-rw-r--r-- | p2pvr/daemon/si.cpp | 2 | ||||
-rw-r--r-- | p2pvr/daemon/sql/SI_eventSearch.sql | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/p2pvr/daemon/si.cpp b/p2pvr/daemon/si.cpp index 26f7808..9bda6c4 100644 --- a/p2pvr/daemon/si.cpp +++ b/p2pvr/daemon/si.cpp @@ -133,7 +133,7 @@ SI::EventSearch(const IceUtil::Optional<std::string> & keywords, const IceUtil:: { DVBSI::Events rtn; SqlContainerCreator<DVBSI::Events, DVBSI::Event> cc(rtn); - cc.populate(Select(SI_eventSearch, from, to, serviceId, serviceId, keywords, keywords, keywords).second); + cc.populate(Select(SI_eventSearch, from, to, serviceId, serviceId, keywords, keywords, keywords, keywords).second); return rtn; } 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 |