Re: Adding an alternate syntax for Phrase Search - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: Adding an alternate syntax for Phrase Search
Date
Msg-id CAKFQuwYsicCtZVK--Ty0onD-5Bizfm6dE=0YMQUQ_GDSDugXDQ@mail.gmail.com
Whole thread Raw
In response to Re: Adding an alternate syntax for Phrase Search  (Thom Brown <thom@linux.com>)
List pgsql-hackers
On Sun, May 22, 2016 at 3:00 PM, Thom Brown <thom@linux.com> wrote:
On 22 May 2016 at 18:52, Josh berkus <josh@agliodbs.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.

​Particularly in light of our annual major release cycle we need to be open to usability recommendations during Beta 1 (at minimum).  Not everyone with intelligence, insight, and meaningful uses for our product and features follows -hackers and compiles from source to try things out during development.  We should encourage these others to at least voice their opinions on the new features.

Its not like we get inundated with these kinds of requests.  Let it remain mostly a resource concern.  If a few people can agree on desirability and get a patch written, reviewed, and ready-for-commit before the next beta release then the release committee, with input from the community, can be the final arbiter of whether to back-patch it into 9.6 or keep it for 10.0

I'd like to think that features are the "top-level capabilities" that we introduce - this is a sub-component of the "phrase search" feature.  Component freeze should occur no earlier than after the second packaged release.  I'd generally rather have feature freeze earlier and use the added time for component work and additional general testing if keeping on the yearly cycle doesn't allow for both.  But, I'm tending to think that we are that tightly constrained generally.

David J.



pgsql-hackers by date:

Previous
From: Thom Brown
Date:
Subject: Re: Adding an alternate syntax for Phrase Search
Next
From: Piotr Stefaniak
Date:
Subject: pg_bsd_indent - improvements around offsetof and sizeof