pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: egocenter <egocenter@yandex.ru>
To: pgsql-bugs@lists.postgresql.org
Subject: Full text search bug ('russian' regconfig)
Date: Wed, 19 Feb 2020 11:35:08 +0300
Message-ID: <1453547361.20200219113508@yandex.ru> (raw)


Hello!

Text search doesn't work correct with the EQUAL string in text and query (russian dictionary config),
as you can see in example ts_vector receives different from ts_query lexemes for identical text:

tsv = 'дан':1 'магазин':2 'нужн':3 'посеща':4 'точн':5
tsq = 'нужн' & 'точн' & 'дан' & 'посещаем' & 'магазин'

SELECT
        (web_query_and @@ ts_title)::INTEGER AS full_title_entries, -- 0 / supposed 1
        (web_query_and @@ 'зачем нужны точные данные о посещаемости магазинов?')::INTEGER AS full_title_entries2,
        *
FROM 
        (SELECT 
                to_tsvector('russian', STRIP(to_tsvector('russian', 'зачем нужны точные данные о посещаемости магазинов?'))::TEXT ) AS ts_title,
                websearch_to_tsquery('russian', REPLACE('зачем нужны точные данные о посещаемости магазинов?', '- ' , '')) AS web_query_and
                
        ) AS main

-- 
Best regards,
Roman






view thread (3+ messages)  latest in thread

Message-ID: <1453547361.20200219113508@yandex.ru>
Permalink:  ../1453547361.20200219113508@yandex.ru/
Also on:    postgresql.org/message-id/1453547361.20200219113508@yandex.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: egocenter@yandex.ru
  Subject: Re: Full text search bug ('russian' regconfig)
  In-Reply-To: <1453547361.20200219113508@yandex.ru>
  References: <1453547361.20200219113508@yandex.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox