Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- rank,
- --q as query,
- id,
- guid,
- 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,
- documents.guid,
- documents.title,
- documents.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'
- AND documents.pubDate > '2011-05-01'
- ORDER BY rank DESC
- LIMIT 800
- ) AS foo
- ORDER BY DATE DESC;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement