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 1j4L71-0004CK-LC for pgsql-bugs@arkaria.postgresql.org; Wed, 19 Feb 2020 08:53:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j4L70-0006HY-Fz for pgsql-bugs@arkaria.postgresql.org; Wed, 19 Feb 2020 08:53:42 +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 1j4KpH-0007tT-RH for pgsql-bugs@lists.postgresql.org; Wed, 19 Feb 2020 08:35:24 +0000 Received: from forward102j.mail.yandex.net ([2a02:6b8:0:801:2::102]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j4KpD-0000y2-PK for pgsql-bugs@lists.postgresql.org; Wed, 19 Feb 2020 08:35:22 +0000 Received: from forward103q.mail.yandex.net (forward103q.mail.yandex.net [IPv6:2a02:6b8:c0e:50:0:640:b21c:d009]) by forward102j.mail.yandex.net (Yandex) with ESMTP id 650D1F21D3B for ; Wed, 19 Feb 2020 11:35:12 +0300 (MSK) Received: from mxback12q.mail.yandex.net (mxback12q.mail.yandex.net [IPv6:2a02:6b8:c0e:1b3:0:640:3818:d096]) by forward103q.mail.yandex.net (Yandex) with ESMTP id 3B1A161E0010 for ; Wed, 19 Feb 2020 11:35:12 +0300 (MSK) Received: from vla3-3dd1bd6927b2.qloud-c.yandex.net (vla3-3dd1bd6927b2.qloud-c.yandex.net [2a02:6b8:c15:350f:0:640:3dd1:bd69]) by mxback12q.mail.yandex.net (mxback/Yandex) with ESMTP id yGNTIHmtH0-ZCiOXenC; Wed, 19 Feb 2020 11:35:12 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1582101312; bh=J0IOH2ot3HfGvEOWLWNIyh5hYaw1Y+pB9lkyAhxii7Y=; h=Subject:To:From:Date:Message-ID; b=rVLI4Tl8SpTA4Fl0nO0JnI0GW8qC4D1RXTUPS5hQD6ANOC1uv03W05961amGEGDVL Jk31mCOV24FlFeJK5Ez66NGwTMnV3v5xQKFcSh3M/LeN9ekrs7QU3nrNeZyjM1GN3H p/EA5OZdPtOA0oDOa24n/amUwfkw7t4ERZRp4isg= Authentication-Results: mxback12q.mail.yandex.net; dkim=pass header.i=@yandex.ru Received: by vla3-3dd1bd6927b2.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id A90eG9OHka-ZBXqwXRj; Wed, 19 Feb 2020 11:35:11 +0300 (using TLSv1.1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client certificate not present) Date: Wed, 19 Feb 2020 11:35:08 +0300 From: egocenter Message-ID: <1453547361.20200219113508@yandex.ru> To: pgsql-bugs@lists.postgresql.org Subject: Full text search bug ('russian' regconfig) MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =0D=0AHello! Text search doesn't work correct with the EQUAL string in text and query (r= ussian dictionary config), as you can see in example ts_vector receives different from ts_query lexeme= s for identical text: tsv =3D '=E4=E0=ED':1 '=EC=E0=E3=E0=E7=E8=ED':2 '=ED=F3=E6=ED':3 '=EF=EE=F1= =E5=F9=E0':4 '=F2=EE=F7=ED':5 tsq =3D '=ED=F3=E6=ED' & '=F2=EE=F7=ED' & '=E4=E0=ED' & '=EF=EE=F1=E5=F9=E0= =E5=EC' & '=EC=E0=E3=E0=E7=E8=ED' SELECT (web_query_and @@ ts_title)::INTEGER AS full_title_entries, -- 0 / = supposed 1 (web_query_and @@ '=E7=E0=F7=E5=EC =ED=F3=E6=ED=FB =F2=EE=F7=ED=FB= =E5 =E4=E0=ED=ED=FB=E5 =EE =EF=EE=F1=E5=F9=E0=E5=EC=EE=F1=F2=E8 =EC=E0=E3= =E0=E7=E8=ED=EE=E2?')::INTEGER AS full_title_entries2, * FROM=20 (SELECT=20 to_tsvector('russian', STRIP(to_tsvector('russian', '=E7=E0= =F7=E5=EC =ED=F3=E6=ED=FB =F2=EE=F7=ED=FB=E5 =E4=E0=ED=ED=FB=E5 =EE =EF=EE= =F1=E5=F9=E0=E5=EC=EE=F1=F2=E8 =EC=E0=E3=E0=E7=E8=ED=EE=E2?'))::TEXT ) AS t= s_title, websearch_to_tsquery('russian', REPLACE('=E7=E0=F7=E5=EC = =ED=F3=E6=ED=FB =F2=EE=F7=ED=FB=E5 =E4=E0=ED=ED=FB=E5 =EE =EF=EE=F1=E5=F9= =E0=E5=EC=EE=F1=F2=E8 =EC=E0=E3=E0=E7=E8=ED=EE=E2?', '- ' , '')) AS web_que= ry_and =20 ) AS main --=20 Best regards, Roman