Re: Adding an alternate syntax for Phrase Search

From: Thom Brown <thom(at)linux(dot)com>
To: Josh berkus <josh(at)agliodbs(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Adding an alternate syntax for Phrase Search
Date: 2016-05-22 19:00:52
Message-ID: CAA-aLv5JTFeScht83GANJAEJ-V9DjvApsT26FjJ2e+Jj+orydw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 22 May 2016 at 18:52, Josh berkus <josh(at)agliodbs(dot)com> wrote:
> Folks,
>
> This came up at pgCon.
>
> The 'word <-> word <-> word' syntax for phrase search is not
> developer-friendly. While we need the <-> operator for SQL and for the
> sophisticated cases, it would be really good to support an alternate
> syntax for the simplest case of "words next to each other". My proposal
> is enclosing the phrase in double-quotes, which would be intuitive to
> users and familiar from search engines. Thus:
>
> to_tsquery(' Berkus & "PostgreSQL Version 10.0" ')
>
> ... would be equivalent to:
>
> to_tsquery(' Berkus & ( PostgreSQL <-> version <-> 10.0 )')
>
> I realize we're already in beta, but pgCon was actually the first time I
> saw the new syntax. I think if we don't do this now, we'll be doing it
> for 10.0.

I think it's way too late for that. I don't see a problem with
including it for 10.0, but when the feature freeze has long passed and
we also have our first beta out, it's no longer a matter of changing
the design or additional functionality, unless there's something that
absolutely requires modification. This isn't that.

Thom

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2016-05-22 19:56:49 Re: Adding an alternate syntax for Phrase Search
Previous Message Josh berkus 2016-05-22 17:52:38 Adding an alternate syntax for Phrase Search