Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- rank,
- --q as query,
- id,
- DATE,
- SOURCE,
- ts_headline('dutch', title, q) AS title,
- ts_headline('dutch', text, q) AS text
- FROM (
- SELECT
- ts_rank_cd(fts, q) AS rank,
- sources.SECTION AS SOURCE,
- documents.id,
- title,
- text,
- pubdate+pubtime AS DATE,
- q
- FROM
- documents,
- sources,
- to_tsquery('dutch',
- '
- hämolytisch-urämische |
- EHEC-Darminfektionen |
- (EHEC & Darminfektionen) |
- Magen-Darm |
- Bauchschmerzen |
- (blutiger & Durchfall)
- '
- ) q
- WHERE
- sources.id=documents.source_id AND
- documents.fts @@ q
- AND documents.LANGUAGE='de'
- ORDER BY rank DESC
- LIMIT 800
- ) AS foo
- ORDER BY DATE DESC;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement