Advertisement
Guest User

Untitled

a guest
May 24th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. select *, posts.id as post_id ,
  2. ts_headline('english',posts.text , plainto_tsquery('english', 'potato') , $$StartSel='<span class="text-highlight">',StopSel=</span>, HighlightAll=true$$) as text,
  3. ts_headline('english',posts.attachment_description, plainto_tsquery('english', 'potato') , $$StartSel='<span class="text-highlight">',StopSel=</span>, HighlightAll=true$$) as attachment_description,
  4. ts_headline('english',posts.attachment_title, plainto_tsquery('english', 'potato') , $$StartSel='<span class="text-highlight">',StopSel=</span>, HighlightAll=true$$) as attachment_title
  5. from vision2.posts12 as posts join vision2.organizations on organizations.id=posts.organization_id where chunks @@ plainto_tsquery('english', 'potato') and Date(posts.created) >= '2017-05-18' and Date(posts.created) <= '2017-05-20' and posts.partition_date >= '2017-05-18' and posts.partition_date <= '2017-05-20' order by posts.created desc offset 0 limit 40
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement