Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c5fEo-0007Oe-RV for pgsql-docs@arkaria.postgresql.org; Sat, 12 Nov 2016 20:49:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1c5fEo-0001Sl-Ca for pgsql-docs@arkaria.postgresql.org; Sat, 12 Nov 2016 20:49:22 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1c5fEn-0001SR-HG for pgsql-docs@postgresql.org; Sat, 12 Nov 2016 20:49:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1c5fEk-0007Bw-MK for pgsql-docs@postgresql.org; Sat, 12 Nov 2016 20:49:20 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id uACKnGd2004878; Sat, 12 Nov 2016 15:49:16 -0500 From: Tom Lane To: obartunov@gmail.com cc: pgsql-docs@postgresql.org Subject: Re: a little fix for text search In-reply-to: References: Comments: In-reply-to Oleg Bartunov message dated "Sat, 12 Nov 2016 23:25:20 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4876.1478983756.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 12 Nov 2016 15:49:16 -0500 Message-ID: <4877.1478983756@sss.pgh.pa.us> X-Pg-Spam-Score: -4.8 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org Oleg Bartunov writes: > Hi there ! > I don't know when exactly it was improved, but following notice in > https://www.postgresql.org/docs/current/static/textsearch-controls.html#T= EXTSEARCH-HEADLINE > is currently not needed. > ts_headline uses the original document, not a tsvector summary, so it can > be slow and should be used with care. A typical mistake is to call > ts_headline for every matching document when only ten documents are to be > shown. SQL subqueries can help; here is an example: I don't see why that stopped being appropriate? The point is that it takes a raw text input which has to be re-parsed; that's still true AFAICS. regards, tom lane --=20 Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs