Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select *, posts.id as post_id ,
- ts_headline('english',posts.text , plainto_tsquery('english', 'potato') , $$StartSel='<span class="text-highlight">',StopSel=</span>, HighlightAll=true$$) as text,
- ts_headline('english',posts.attachment_description, plainto_tsquery('english', 'potato') , $$StartSel='<span class="text-highlight">',StopSel=</span>, HighlightAll=true$$) as attachment_description,
- ts_headline('english',posts.attachment_title, plainto_tsquery('english', 'potato') , $$StartSel='<span class="text-highlight">',StopSel=</span>, HighlightAll=true$$) as attachment_title
- 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