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 1neN8B-0008JX-JT for pgsql-docs@arkaria.postgresql.org; Tue, 12 Apr 2022 20:28: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 1neN89-0006eY-Nr for pgsql-docs@arkaria.postgresql.org; Tue, 12 Apr 2022 20:28: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 1neN89-0006eP-G5 for pgsql-docs@lists.postgresql.org; Tue, 12 Apr 2022 20:28:53 +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 1neN87-0000ZQ-BE; Tue, 12 Apr 2022 20:28:53 +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 23CKSle4915353; Tue, 12 Apr 2022 16:28:47 -0400 From: Tom Lane To: Peter Geoghegan cc: piotrowski@prisma.io, Pg Docs , "Jonathan S. Katz" Subject: Re: "GIN and GiST Index Types" page is about usage in full text search, but looks general purpose In-reply-to: References: <164978902252.1276550.9330175733459697101@wrigleys.postgresql.org> <911427.1649792973@sss.pgh.pa.us> Comments: In-reply-to Peter Geoghegan message dated "Tue, 12 Apr 2022 12:53:23 -0700" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <915153.1649795294.0@sss.pgh.pa.us> Date: Tue, 12 Apr 2022 16:28:47 -0400 Message-ID: <915352.1649795327@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <915153.1649795294.1@sss.pgh.pa.us> Peter Geoghegan writes: > On Tue, Apr 12, 2022 at 12:49 PM Tom Lane wrote: >> I think we should take the index type names out of the section title >> entirely, and name it something generic like "Preferred Index Types for >> Full Text Search". > Agreed. Proposed patch attached. The existing text already says "GIN indexes are the preferred text search index type", so I'm not sure we need to go further than that about guiding people which one to use. In particular, since GIN can't support included columns, we can't really deprecate GiST altogether here. > There is always the extreme option of excluding older versions in > robots.txt. I bet that would work. Yeah, I was wondering about that too. It's sort of the nuclear option, but if we don't want to modify EOL'd versions then we may not have any other way to keep Google from glomming onto them. regards, tom lane ------- =_aaaaaaaaaa0 Content-Type: text/x-diff; name="doc-tweak-full-text-index-docs.patch"; charset="us-ascii" Content-ID: <915153.1649795294.2@sss.pgh.pa.us> Content-Description: doc-tweak-full-text-index-docs.patch diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml index 20db7b7afe..6afaf9e62c 100644 --- a/doc/src/sgml/textsearch.sgml +++ b/doc/src/sgml/textsearch.sgml @@ -3618,7 +3618,7 @@ SELECT plainto_tsquery('supernovae stars'); - GIN and GiST Index Types + Preferred Index Types for Text Search text search @@ -3627,10 +3627,16 @@ SELECT plainto_tsquery('supernovae stars'); There are two kinds of indexes that can be used to speed up full text - searches. + searches: + GIN and + GiST. Note that indexes are not mandatory for full text searching, but in cases where a column is searched on a regular basis, an index is usually desirable. + + + + To create such an index, do one of: ------- =_aaaaaaaaaa0--