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 1kx3m6-0003TF-4k for pgsql-general@arkaria.postgresql.org; Wed, 06 Jan 2021 08:02:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kx3m3-0004QI-TA for pgsql-general@arkaria.postgresql.org; Wed, 06 Jan 2021 08:02:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kx3m3-0004QB-Iu for pgsql-general@lists.postgresql.org; Wed, 06 Jan 2021 08:02:31 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kx3m1-0005Tr-3d for pgsql-general@lists.postgresql.org; Wed, 06 Jan 2021 08:02:30 +0000 Received: by mail-lf1-x130.google.com with SMTP id x20so4556976lfe.12 for ; Wed, 06 Jan 2021 00:02:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=u/7NJ26rIZihh5DxdewCd3YS03ucRL8PDjwHGZ7sBqg=; b=V5950rkl0Ig1awf8AP9joImmH2IOIMuKdjzG/Bu9dbTrsY/ev/+V4GpzN/CKQ7yIEM j4kfNbVznxzy0LRhz3FvSBf7vQsEJETtBcMd7Bncm8VciF2dPEX2DhcesYWN70uI9qV6 AQKbVoKOcbrnUXlXdrdqekdX7bv4XPFFE0hornpq2h1iB5mIKgCnPM8tK724OUgHaPlz PYhgXe7GdMftNG9+iW2Jd8XhiNGuPDtEmxkvgnZGMbh1+SUARlDT0i1JxZWxvaIvWQWI PCCwti58kTaqT6fS1Zj3UKN+5HvKV8ZQQbbWzTrYB99cl0/KPjJhNOm/lIEg97fB6spu +fwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=u/7NJ26rIZihh5DxdewCd3YS03ucRL8PDjwHGZ7sBqg=; b=Y/XYHXUbT/mNs92296a1KOXWt/rAn9GnDcZy9QPARbOMNwWkp4DlvM24mTu2PYcCrf 2Uxbmzzo1c3tVBmOA0OQCe5zZhnXOCJvaLCE4rFKYaypdpmLaLKP7eqvvY4ZFFJZFaik RPobRYCaRtPxOTXY6gDAM48koPmoNKqIYe1qNUwbeyKsrFfmNIs1FeoenWTk8WmlCQIg q+SKt5rrLV3dGr63P4qI20EKDciQxqSL+i+Y1kP4gWJwRORdIyVbgCSFGw+zODJYqvvD EIysLRtCJgv3Vyr3R6KUrM87l0YI1xeg8A68eUoBTNGrtWu1izb1NrwaUrBVecjWdUfS TuWg== X-Gm-Message-State: AOAM532w0otMExvPJQgrgUwTPG6Sz7b08NEdwoRvEaabSp7mG7gKADDv Ff8RpmYBqWXF2ot8FfYKHG/vHxE+L2dw1jGESdU79ToNJKA= X-Google-Smtp-Source: ABdhPJwt5/aHgjywiUpzw1o9Dzfly2HuIwiFbZHSs8m2NmM5tnpFHjfk98f712LUiwU5SVaIEui6ffDzQtL4NdbHxV0= X-Received: by 2002:a19:d06:: with SMTP id 6mr1334111lfn.531.1609920147589; Wed, 06 Jan 2021 00:02:27 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Artur Zakirov Date: Wed, 6 Jan 2021 09:02:16 +0100 Message-ID: Subject: Re: FTS and tri-grams To: Mark Phillips Cc: pgsql-general Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, Jan 5, 2021 at 10:26 PM Mark Phillips wrote: > We now wonder if tri-gram alone can achieve a fast full text search resul= t. If so, then we could the tsvector column be dropped? > > 1. Is FTS required for tri-gram to work? > 2. Are these independent of each other? FTS and tri-gram are independent features. You can implement them independently, but it might depend on your use case. > 3. Is tri-gram alone sufficient for a =E2=80=9Cfull text search=E2=80=9D = feature? It isn't sufficient if you want exact and/or phrase search. --=20 Artur