diff options
author | randomdan <randomdan@localhost> | 2011-02-10 22:01:17 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2011-02-10 22:01:17 +0000 |
commit | 100e4ddbd35b9ce7ee296be1e1d582b4c4832041 (patch) | |
tree | c115cd307c2089ccdf1debfdc32a148967ca9a8d /gentoobrowse/views | |
parent | Add a common collection of data containing the poweredBy folk and replace the... (diff) | |
download | gentoobrowse-100e4ddbd35b9ce7ee296be1e1d582b4c4832041.tar.bz2 gentoobrowse-100e4ddbd35b9ce7ee296be1e1d582b4c4832041.tar.xz gentoobrowse-100e4ddbd35b9ce7ee296be1e1d582b4c4832041.zip |
Allow searching for bugs as well as packages
Diffstat (limited to 'gentoobrowse/views')
-rw-r--r-- | gentoobrowse/views/search.xml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gentoobrowse/views/search.xml b/gentoobrowse/views/search.xml index 820c3ea..87ce6eb 100644 --- a/gentoobrowse/views/search.xml +++ b/gentoobrowse/views/search.xml @@ -18,4 +18,17 @@ </filter> </sql> </project2:sqlrows> + <project2:sqlrows name="bugSearch" datasource="postgres-web"> + <sql> + SELECT b.bugid, b.severity, b.status, b.summary, b.firstseen + <filter name="freeText">, + ts_rank(to_tsvector('english', regexp_replace(summary, '-[0-9][^ ]*', '', 'g')), plainto_tsquery('english', <param name="criteria" />)) as rank + </filter> + FROM bugs b + <filter name="freeText"> + WHERE to_tsvector('english', regexp_replace(summary, '-[0-9][^ ]*', '', 'g')) @@ plainto_tsquery('english', <param name="criteria" />) + ORDER BY rank DESC, bugid DESC + </filter> + </sql> + </project2:sqlrows> </block> |