pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: esemmano@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18479: websearch_to_tsquery inconsistent behavior for german when using parentheses
Date: Thu, 13 Jun 2024 19:59:22 -0400
Message-ID: <2184370.1718323162@sss.pgh.pa.us> (raw)
In-Reply-To: <2130969.1718316260@sss.pgh.pa.us>
References: <18479-d9b46e2fc242c33e@postgresql.org>
	<2130969.1718316260@sss.pgh.pa.us>

[ couldn't let go of this ... ]

I wrote:
> It's fairly confusing that this code manages to ignore not-ISOPERATOR
> punctuation.  It seems like that gets eaten by gettoken_tsvector()
> and then later we decide there's not really a word there.

Yeah, further investigation shows that such cases effectively act
like stopwords: they are passed back to makepol() as VAL strings,
but then lexize processing rejects them as not words.

> I'm also confused how come the same thing doesn't happen in the
> english tsconfig.  Not sure it's worth poking at more, though.

D'oh: "or" is a stopword in the english config.  The english case
is still wrong of course, just differently:

regression=# select websearch_to_tsquery('english', 'foo or (baz bar) or (ding dong)');
          websearch_to_tsquery           
-----------------------------------------
 'foo' | 'baz' & 'bar' & 'ding' & 'dong'
(1 row)

			regards, tom lane





view thread (3+ messages)

Message-ID: <2184370.1718323162@sss.pgh.pa.us>
Permalink:  ../2184370.1718323162@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2184370.1718323162@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, esemmano@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18479: websearch_to_tsquery inconsistent behavior for german when using parentheses
  In-Reply-To: <2184370.1718323162@sss.pgh.pa.us>

* 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