Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iKVPP-0004U7-Jm for pgsql-general@arkaria.postgresql.org; Tue, 15 Oct 2019 22:35:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iKVPN-00027r-RS for pgsql-general@arkaria.postgresql.org; Tue, 15 Oct 2019 22:35:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iKVPN-00027i-Bu for pgsql-general@lists.postgresql.org; Tue, 15 Oct 2019 22:35:13 +0000 Received: from athena.simkin.ca ([2607:f040:1001:2::ff:2]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iKVPG-0004SM-9R for pgsql-general@lists.postgresql.org; Tue, 15 Oct 2019 22:35:12 +0000 Received: from skynet.simkin.ca (d205-250-70-177.bchsia.telus.net [205.250.70.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by athena.simkin.ca (Postfix) with ESMTPSA id 1177ADC696E8 for ; Tue, 15 Oct 2019 15:35:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.simkin.ca; s=athena; t=1571178904; bh=koGyYWffPE2yEWz+pGa0I/yJcrAiMeen43WG8a/vZKw=; h=Subject:From:To:Date:From:To:Subject:Date:Reply-To; b=CvUQdcYm0TzfjSXBw2g43Zabxkgq1IQPNEGhHxiVzJRYM4019ffriqylq9xCRgODV E08aQIxpbjcK8/Pk8+V6Y1XEA3f7ZW/y757SrutsDudTtnrWzo7YNNEQDQ8F5YgSoN NF1h1dnu4L4rphhAe2z3AOa4UbQ7J2rDWvLSdyJKVQ2dTjy5A5loiNdQL20i9ecJqm DaItsO67BmmFcVDzgLxdtwdt4BZCbpRhuWZZ0EPPI9YHK7odjaerNCSC5vhE7lSaTn 5GCy+IWC5gb/P7ggyqZTaZnEOz40PFyG19f05MfDR+OHgleU/Is0BFAH2zHAYUq2yD 8mgEn/ArXryjw== Received: from skynet.simkin.ca (skynet.simkin.ca [IPv6:::1]) by skynet.simkin.ca (Postfix) with ESMTP id 97CF821A5CB3A for ; Tue, 15 Oct 2019 15:35:03 -0700 (PDT) Message-ID: <62ec72bf6b16aa980430e87ae54d6b8091ce8b73.camel@lists.simkin.ca> Subject: Re: Text search lexer's handling of hyphens and negatives From: Alan Hodgson To: pgsql-general@lists.postgresql.org Date: Tue, 15 Oct 2019 15:35:03 -0700 In-Reply-To: References: Content-Type: multipart/alternative; boundary="=-bmhDY+ltayiHml1CBILi" User-Agent: Evolution 3.30.5 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --=-bmhDY+ltayiHml1CBILi Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit On Tue, 2019-10-15 at 14:51 -0700, raylu wrote: > Are we missing something here? Is there either a way to > 1. generate tsvectors without this special (negative) integer behavior or > 2. generate tsqueries in a more intelligent way? > My company has found the pg_trm extension to be more useful for partial text searches than the full text functions. I don't know specifically how it might help with your hyphens but it would be worth testing. The docs actually suggest using them in conjunction in some cases. https://www.postgresql.org/docs/11/pgtrgm.html --=-bmhDY+ltayiHml1CBILi Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
On Tue, 2019-10-15 at 14:51 -0700, raylu wrote:
Are we missing something here? Is there either a way to<=
/pre>
1. generate tsvectors without this special (negative) integer beh=
avior or
2. generate tsqueries in a more intelligent way?


My company has found the pg_t= rm extension to be more useful for partial text searches than the full text= functions. I don't know specifically how it might help with your hyphens b= ut it would be worth testing. The docs actually suggest using them in conju= nction in some cases.

--=-bmhDY+ltayiHml1CBILi--