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 1l2FZf-0003bq-RP for pgsql-bugs@arkaria.postgresql.org; Wed, 20 Jan 2021 15:39:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l2FZe-0000fb-BV for pgsql-bugs@arkaria.postgresql.org; Wed, 20 Jan 2021 15:39:10 +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 1l2FZe-0000fG-5E for pgsql-bugs@lists.postgresql.org; Wed, 20 Jan 2021 15:39:10 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2FZX-00026n-6i for pgsql-bugs@lists.postgresql.org; Wed, 20 Jan 2021 15:39:09 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 10KFcr9h595534; Wed, 20 Jan 2021 10:38:53 -0500 From: Tom Lane To: christian@games.no cc: pgsql-bugs@lists.postgresql.org Subject: Re: Bug Report | Using ts_headline with the <-> operator In-reply-to: <011a01d6ef29$0e8e1b20$2baa5160$@games.no> References: <011a01d6ef29$0e8e1b20$2baa5160$@games.no> Comments: In-reply-to message dated "Wed, 20 Jan 2021 12:37:46 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <595532.1611157133.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 20 Jan 2021 10:38:53 -0500 Message-ID: <595533.1611157133@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk writes: > 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 is behaving as designed, and I don't really think it's wrong. See previous discussion at https://www.postgresql.org/message-id/flat/16744-861496b4f8f941f2%40postgr= esql.org It is unfortunate that the only way to customize this type of decision is to build your own new text search parser. Perhaps someday someone will put in the work to make that stuff a bit more modular and easier to change. regards, tom lane