Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eK3mx-00023w-ID for pgsql-hackers@arkaria.postgresql.org; Wed, 29 Nov 2017 14:56:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eK3mx-0006VF-5E for pgsql-hackers@arkaria.postgresql.org; Wed, 29 Nov 2017 14:56:39 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eK3mw-0006Uv-Os for pgsql-hackers@lists.postgresql.org; Wed, 29 Nov 2017 14:56:39 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1eK3mr-0005Pj-Hq for pgsql-hackers@postgresql.org; Wed, 29 Nov 2017 14:56:36 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id EA6DE21C1692; Wed, 29 Nov 2017 17:56:30 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru Received: from mail.postgrespro.ru (unknown [192.168.27.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id C5F3621C0644; Wed, 29 Nov 2017 17:56:30 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1511967390; bh=6/Sh8cevauTDEeQLC8vf1QLEXuc+Glm8R4ttzEpNgQM=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=MruSYVp9m0yguhYHJVdh6+JVULnEJz5N4qY2smWao+yJwHmWB3Nv148eWBgMi5I9X V4N8agUcwKWh6h/vDJ2Jf8U5T4tSEGr6cJ3loa3lZK+Ymp44RDOTBCqczLwrlA6Lev 7SSPeJ1q4Y48rg0GrDl0j/8md3GR0HAIJVlK714c= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 29 Nov 2017 17:56:30 +0300 From: Victor Drobny To: Aleksander Alekseev Cc: pgsql-hackers@postgresql.org Subject: Re: new function for tsquery creartion Organization: Postgres Professional In-Reply-To: <20171128145659.GA32487@e733.localdomain> References: <15517a04afd2be779e2e6d69611c348b@postgrespro.ru> <20171128143916.1377.5847.pgcf@coridan.postgresql.org> <20171128145659.GA32487@e733.localdomain> Message-ID: <157ea1194ec9c416df45bfddab10cacd@postgrespro.ru> X-Sender: v.drobny@postgrespro.ru User-Agent: Roundcube Webmail/1.2.4 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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. queryto_tsquery 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