it looks like a bug to me, could you please, share your dataset with me, so I could reproduce the behaviour.
Regards,
Oleg
On Sun, Aug 7, 2016 at 11:05 AM, Andreas Joseph Krogh <andreas@visena.com> wrote:
På søndag 07. august 2016 kl. 08:27:06, skrev Oleg Bartunov <obartunov@gmail.com>:
[snip]
have you considered <=| and |=> operators ? <=> in ORDER BY works like KNN.
I don't get how these operators should work. Neither give me the expected results.
Using <=>
SELECT
del.entity_id, del.folder_id, del.received_timestamp
FROM origo_email_delivery del
WHERE del.fts_all @@ to_tsquery('simple', 'andreas:*&jose:*')
ORDER BY '2000-01-01' :: TIMESTAMP <=> del.received_timestamp
LIMIT 10;
SELECT
del.entity_id, del.folder_id, del.received_timestamp
FROM origo_email_delivery del
WHERE del.fts_all @@ to_tsquery('simple', 'andreas:*&jose:*')
ORDER BY '2000-01-01' :: TIMESTAMP <=| del.received_timestamp
LIMIT 10;