Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- rank,
- q AS query,
- SOURCE,
- id,
- 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,
- q
- FROM
- documents,
- sources,
- to_tsquery('dutch', 'Bauchschmerzen') q
- WHERE
- sources.id=documents.source_id AND
- documents.fts @@ q
- AND documents.LANGUAGE='de'
- ORDER BY rank DESC
- LIMIT 20
- ) AS foo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement