Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2DPq-00065s-9o for pgsql-bugs@arkaria.postgresql.org; Wed, 20 Jan 2021 13:20:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l2DPp-0006RT-5s for pgsql-bugs@arkaria.postgresql.org; Wed, 20 Jan 2021 13:20:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2Cka-0000xq-FP for pgsql-bugs@lists.postgresql.org; Wed, 20 Jan 2021 12:38:16 +0000 Received: from delivery.mailspamprotection.com ([146.66.121.88]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2CkV-0000gx-NX for pgsql-bugs@lists.postgresql.org; Wed, 20 Jan 2021 12:38:15 +0000 Received: from 86.53.214.35.bc.googleusercontent.com ([35.214.53.86] helo=c76484.sgvps.net) by se24.mailspamprotection.com with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.92) (envelope-from ) id 1l2CkK-0005Kk-Jl for pgsql-bugs@lists.postgresql.org; Wed, 20 Jan 2021 06:38:08 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=games.no; s=default; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From: Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=e9dzHzPsBNqvJB7pHKI9zQImuzM3CQOLxaixb5E8nTo=; b=x0MWeoF44h1BxIcGvPZTy+zL7Y pizB9S5HmKksH1f4Iaus2r0/m/jkun8lo4hJRv+EFdDXWx8WTn6BS8H9OPOxwtlxTd0IpIMxKyrz4 R2YlH0LO/4W0LmP1byBbgAiNslsq6nn7Q/kIw/E/c6VhVV9EynMnW85EB87fJjMjVOiE873PbIanR G7/Ur/PoJI7vOKtxkb9mCBK15c420t/V4ppkh1wXoIi5qzkuO8oJAKcsf5nCorIfJk2dVhrclWN3N 8bH8TiYUVBRrxV94eC19P/lQCsbfIWwVTAtR4aIMdltP5qHHF/bzZsBhN675v/caDDJZg/vQr7J+Q pfSjqYkw==; Received: from [82.7.176.27] (port=53725 helo=organizer) by c76484.sgvps.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90.1) (envelope-from ) id 1l2CkK-000FCW-AY for pgsql-bugs@lists.postgresql.org; Wed, 20 Jan 2021 12:38:00 +0000 From: To: Subject: Bug Report | Using ts_headline with the <-> operator Date: Wed, 20 Jan 2021 12:37:46 -0000 Message-ID: <011a01d6ef29$0e8e1b20$2baa5160$@games.no> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_011B_01D6EF29.0E8E9050" X-Mailer: Microsoft Outlook 16.0 Thread-Index: AdbvKPJQvmVvIOXnRfmMtKA24appLg== Content-Language: en-gb X-Originating-IP: 35.214.53.86 X-SpamExperts-Domain: c76484.sgvps.net X-SpamExperts-Username: 35.214.53.86 Authentication-Results: mailspamprotection.com; auth=pass smtp.auth=35.214.53.86@c76484.sgvps.net X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: Combined (0.26) X-Recommended-Action: accept X-Filter-ID: Pt3MvcO5N4iKaDQ5O6lkdGlMVN6RH8bjRMzItlySaT8/vOnP/eJUJjj44dtwL6xfPUtbdvnXkggZ 3YnVId/Y5jcf0yeVQAvfjHznO7+bT5wI5EExSjQuWYuA/7wPTFjBGIpECxRcWFqBXPoC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MYYgNuhJIw YHsQrzdjRmDk90X0sB9s+w== X-Report-Abuse-To: spam@quarantine1.mailspamprotection.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multipart message in MIME format. ------=_NextPart_000_011B_01D6EF29.0E8E9050 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit PostgreSQL version: 10.15 Operating system: Linux/Ubuntu Bug when using ts_headline with the <-> operator Assuming the following query: SELECT ts_headline('simple','The Cyberpunk launch did not go as expected for Cyberpunk Fans around the world', phraseto_tsquery('simple','Cyberpunk Fans')::tsquery); The returned result is: The Cyberpunk launch did not go as expected for Cyberpunk Fans around the world This highlights the Cyberpunk alone in addition to Cyberpunk Fans. However, the expected output would be: The Cyberpunk launch did not go as expected for Cyberpunk Fans around the world Which only highlights *Cyberpunk Fans* due to the <-> operator in phraseto_tsquery. SELECT phraseto_tsquery('simple','Cyberpunk Fans'); The above returns 'cyberpunk<-> 'fans' as expected, so presumably this is an issue with the ts_headline function. I would be great to see this fixed/improved in the near future. Christian ------=_NextPart_000_011B_01D6EF29.0E8E9050 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

PostgreSQL version: = 10.15

Operating system:   = Linux/Ubuntu

 

Bug when using ts_headline with the <-> = operator

 

Assuming the following query:

SELECT ts_headline('simple','The Cyberpunk launch did = not go as expected for Cyberpunk Fans around the world', = phraseto_tsquery('simple','Cyberpunk Fans')::tsquery);

 

The = returned result is:

The = <b>Cyberpunk</b> launch did not go as expected for = <b>Cyberpunk</b> <b>Fans</b> around the = world

 

This highlights the Cyberpunk alone in addition to = Cyberpunk Fans.

 

However, = the expected output would be:

The = Cyberpunk launch did not go as expected for <b>Cyberpunk</b> = <b>Fans</b> around the world

 

Which = only highlights *Cyberpunk Fans* due to the <-> operator in = phraseto_tsquery.

 

SELECT = phraseto_tsquery('simple','Cyberpunk Fans');

The above returns 'cyberpunk<-> 'fans' as = expected, so presumably this is an issue with the ts_headline = function.

 

I would be great to see this fixed/improved in the = near future.

 

Christian

------=_NextPart_000_011B_01D6EF29.0E8E9050--