Re: new function for tsquery creartion

From: Victor Drobny <v(dot)drobny(at)postgrespro(dot)ru>
To: Aleksander Alekseev <a(dot)alekseev(at)postgrespro(dot)ru>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: new function for tsquery creartion
Date: 2017-11-29 14:57:33
Message-ID: b098b9373fdf256116e53ec5dc449f67@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

On 2017-11-29 17:56, Victor Drobny wrote:

Sorry, forgot to attach new version of the patch.
> On 2017-11-28 17:57, Aleksander Alekseev wrote:
> Hi Aleksander,
>
> Thank you for review. I have tried to fix all of your comments.
> However i want to mention that the absence of comments for functions
> in to_tsany.c is justified by the absence of comments for other
> similar functions.
>> Hi Victor,
>>
>>> I like the idea and I think it's a great patch. However in current
>>> shape it
>>> requires some amount of reworking to meet PostgreSQL standards of
>>> code quality.
>>
>> Also I would like to add that I agree with Thomas Munro:
>>
>>> Calling this search syntax just "query" seems too general and
>>> overloaded. "Simple search", "simple query", "web search", "web
>>> syntax", "web query", "Google-style query", "Poogle" (kidding!) ...
>>> well I'm not sure, but I feel like it deserves a proper name.
>>> websearch_to_tsquery()?
>>
>> websearch_to_tsquery() sounds much better than query_to_tsquery().
>>
>> Also I agree Tomas Vondra in regard that:
>>
>>> 2) I don't think we should mention Google in the docs explicitly. Not
>>> that I'm somehow anti-google, but this syntax was certainly not
>>> invented
>>> by Google - I vividly remember using something like that on Altavista
>>> (yeah, I'm old). And it's used by pretty much every other web search
>>> engine out there ...
>>
>> I suggest to rephrase:
>>
>> ```
>> + about its input. <function>queryto_tsquery</function> provides a
>> + different, Google like syntax to create tsquery.
>> ```
>>
>> .. to something more like "provides a different syntax, similar to one
>> used in web search engines, to create tsqeury". And maybe give a few
>> examples right in the next sentence.
> Best,

--
Victor Drobny
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Attachment Content-Type Size
queryto_tsquery4_01_around.patch text/x-diff 12.1 KB
queryto_tsquery4_02_queryto_tsquery.patch text/x-diff 18.9 KB
queryto_tsquery4_03_documentation.patch text/x-diff 5.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-11-29 15:01:37 Re: es_query_dsa is broken
Previous Message Victor Drobny 2017-11-29 14:56:30 Re: new function for tsquery creartion