Re: [HACKERS] [PATCH] few fts functions for jsonb

2017-04-03 Thread Andrew Dunstan
On 04/03/2017 03:41 PM, Sven R. Kunze wrote: > On 03.04.2017 21:30, Andrew Dunstan wrote: >> On 04/03/2017 02:44 PM, Sven R. Kunze wrote: >>> On 01.04.2017 22:20, Andrew Dunstan wrote: I added documentation when I committed it for the new functions, in the FTS section. I'm not

Re: [HACKERS] [PATCH] few fts functions for jsonb

2017-04-03 Thread Sven R. Kunze
On 03.04.2017 21:30, Andrew Dunstan wrote: On 04/03/2017 02:44 PM, Sven R. Kunze wrote: On 01.04.2017 22:20, Andrew Dunstan wrote: I added documentation when I committed it for the new functions, in the FTS section. I'm not sure what we need to add to the JSON section if anything. Not sure,

Re: [HACKERS] [PATCH] few fts functions for jsonb

2017-04-03 Thread Andrew Dunstan
On 04/03/2017 02:44 PM, Sven R. Kunze wrote: > On 01.04.2017 22:20, Andrew Dunstan wrote: >> I added documentation when I committed it for the new functions, in the >> FTS section. I'm not sure what we need to add to the JSON section if >> anything. > > Not sure, if this is related but the

Re: [HACKERS] [PATCH] few fts functions for jsonb

2017-04-03 Thread Andrew Dunstan
On 04/03/2017 02:22 PM, Andres Freund wrote: > On 2017-04-01 16:20:46 -0400, Andrew Dunstan wrote: >> >> On 03/31/2017 03:17 PM, Oleg Bartunov wrote: >>> >>> On 30 Mar 2017 23:43, "Dmitry Dolgov" <9erthali...@gmail.com >>> > wrote: >>> >>> On 31 March 2017 at

Re: [HACKERS] [PATCH] few fts functions for jsonb

2017-04-03 Thread Sven R. Kunze
On 01.04.2017 22:20, Andrew Dunstan wrote: I added documentation when I committed it for the new functions, in the FTS section. I'm not sure what we need to add to the JSON section if anything. Not sure, if this is related but the formatting of

Re: [HACKERS] [PATCH] few fts functions for jsonb

2017-04-03 Thread Andres Freund
On 2017-04-01 16:20:46 -0400, Andrew Dunstan wrote: > > > On 03/31/2017 03:17 PM, Oleg Bartunov wrote: > > > > > > On 30 Mar 2017 23:43, "Dmitry Dolgov" <9erthali...@gmail.com > > > wrote: > > > > On 31 March 2017 at 00:01, Andrew Dunstan > >

Re: [HACKERS] [PATCH] few fts functions for jsonb

2017-04-01 Thread Andrew Dunstan
On 03/31/2017 03:17 PM, Oleg Bartunov wrote: > > > On 30 Mar 2017 23:43, "Dmitry Dolgov" <9erthali...@gmail.com > > wrote: > > On 31 March 2017 at 00:01, Andrew Dunstan > > wrote: >

Re: [HACKERS] [PATCH] few fts functions for jsonb

2017-03-31 Thread Oleg Bartunov
On 30 Mar 2017 23:43, "Dmitry Dolgov" <9erthali...@gmail.com> wrote: On 31 March 2017 at 00:01, Andrew Dunstan wrote: > > I have just noticed as I was writing/testing the non-existent docs for > this patch that it doesn't supply variants of to_tsvector that take a

Re: [HACKERS] [PATCH] few fts functions for jsonb

2017-03-30 Thread Dmitry Dolgov
On 31 March 2017 at 00:01, Andrew Dunstan wrote: > > I have just noticed as I was writing/testing the non-existent docs for > this patch that it doesn't supply variants of to_tsvector that take a > regconfig as the first argument. Is there a reason for that? Why >

Re: [HACKERS] [PATCH] few fts functions for jsonb

2017-03-30 Thread Andrew Dunstan
On 29 March 2017 at 16:19, Dmitry Dolgov <9erthali...@gmail.com> wrote: >> On 29 March 2017 at 18:28, Andrew Dunstan >> wrote: >> >> These patches seem fundamentally OK. But I'm still not happy with the >> naming etc. > > I've changed names for all functions and

Re: [HACKERS] [PATCH] few fts functions for jsonb

2017-03-29 Thread Dmitry Dolgov
> On 29 March 2017 at 18:28, Andrew Dunstan wrote: > > These patches seem fundamentally OK. But I'm still not happy with the > naming etc. I've changed names for all functions and action definitions, moved out the changes in header file to `jsonapi.h` and removed

Re: [HACKERS] [PATCH] few fts functions for jsonb

2017-03-29 Thread Andrew Dunstan
On 26 March 2017 at 17:57, Dmitry Dolgov <9erthali...@gmail.com> wrote: >> I'm not through looking at this. However, here are a few preliminary >> comments > > I've attached new versions of the patches with improvements related to these > commentaries. These patches seem fundamentally OK. But I'm

Re: [HACKERS] [PATCH] few fts functions for jsonb

2017-03-26 Thread Dmitry Dolgov
> I'm not through looking at this. However, here are a few preliminary comments I've attached new versions of the patches with improvements related to these commentaries. diff --git a/src/backend/tsearch/to_tsany.c b/src/backend/tsearch/to_tsany.c index 6e5de8f..8f7bcfe 100644 ---

Re: [HACKERS] [PATCH] few fts functions for jsonb

2017-03-23 Thread Andrew Dunstan
On 03/21/2017 06:28 PM, Dmitry Dolgov wrote: > > On 21 March 2017 at 03:03, Andrew Dunstan > > wrote: > > > > However, I think it should probably be broken up into a couple of > pieces - > > one for the generic json/jsonb

Re: [HACKERS] [PATCH] few fts functions for jsonb

2017-03-21 Thread Dmitry Dolgov
> On 21 March 2017 at 03:03, Andrew Dunstan wrote: > > However, I think it should probably be broken up into a couple of pieces - > one for the generic json/jsonb transforms infrastructure (which probably > needs some more comments) and one for the FTS functions

Re: [HACKERS] [PATCH] few fts functions for jsonb

2017-03-20 Thread Andrew Dunstan
On 03/10/2017 11:13 AM, Dmitry Dolgov wrote: > > On 28 February 2017 at 19:21, Oleg Bartunov > wrote: > > 1. add json support > > I've added json support for all functions. > > > Its_headline should returns the original json with highlighting

Re: [HACKERS] [PATCH] few fts functions for jsonb

2017-03-10 Thread Dmitry Dolgov
> On 28 February 2017 at 19:21, Oleg Bartunov wrote: > 1. add json support I've added json support for all functions. > Its_headline should returns the original json with highlighting Yes, I see now. I don't think it's worth it to add a special option for that purpose,

Re: [HACKERS] [PATCH] few fts functions for jsonb

2017-02-28 Thread Oleg Bartunov
The proposed patch looks not very important, but I consider it as an important feature, which Oracle and Microsoft already have, that's why I asked Dmitry to work on this and made it before feature freeze. My comments follows below the post. On Tue, Feb 28, 2017 at 1:59 PM, Dmitry Dolgov

[HACKERS] [PATCH] few fts functions for jsonb

2017-02-28 Thread Dmitry Dolgov
Hi all I would like to propose patch with a set of new small functions for fts in case of jsonb data type: * to_tsvector(config, jsonb) - make a tsvector from all string values and elements of jsonb object. To prevent the situation, when tsquery can find a phrase consisting of lexemes from