Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-04-26 Thread Teodor Sigaev
There are some previously unnoticed errors in docs (master branch), this patch fixes them. Thank you, pushed -- Teodor Sigaev E-mail: teo...@sigaev.ru WWW: http://www.sigaev.ru/ -- Sent via pgsql-hackers

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-04-21 Thread Dmitry Ivanov
There are some previously unnoticed errors in docs (master branch), this patch fixes them. -- Dmitry Ivanov Postgres Professional: http://www.postgrespro.com Russian Postgres Companydiff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml index 930c8f0..78eaf74 100644 ---

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-04-06 Thread Dmitry Ivanov
> > It seems that everything is settled now, so here's the patch introducing > > the '<->' and '' operators. I've made the necessary changes to docs & > > regression tests. > > I noticed that I had accidently trimmed whitespaces in docs, this is a > better one. After a brief but reasonable

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-04-06 Thread Dmitry Ivanov
> > > It seems that everything is settled now, so here's the patch introducing > > > the '<->' and '' operators. I've made the necessary changes to docs & > > > regression tests. > > > > I noticed that I had accidently trimmed whitespaces in docs, this is a > > better one. > > After a brief but

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-04-05 Thread Dmitry Ivanov
> It seems that everything is settled now, so here's the patch introducing the > '<->' and '' operators. I've made the necessary changes to docs & > regression tests. I noticed that I had accidently trimmed whitespaces in docs, this is a better one. -- Dmitry Ivanov Postgres Professional:

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-04-01 Thread Oleg Bartunov
On Fri, Apr 1, 2016 at 5:24 PM, Tom Lane wrote: > Alvaro Herrera writes: > > Teodor Sigaev wrote: > >> may be <=>? it isn't used anywhere yet. > >> > >> select 'fat'::tsquery <=> 'cat'; > >> select 'fat <=> cat'::tsquery; > >> select 'fat <3>

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-04-01 Thread Tom Lane
Alvaro Herrera writes: > Teodor Sigaev wrote: >> may be <=>? it isn't used anywhere yet. >> >> select 'fat'::tsquery <=> 'cat'; >> select 'fat <=> cat'::tsquery; >> select 'fat <3> cat'::tsqyery; -- for non-default distance. > Dunno. That looks pretty "relationalish".

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-04-01 Thread Andreas Joseph Krogh
På fredag 01. april 2016 kl. 15:22:55, skrev Teodor Sigaev >: > there was a character that was very similar to dots I would suggest > that.  The closest is * I think, so what do you think of "***"? And join opertator for tsqueries is the same :

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-04-01 Thread Teodor Sigaev
there was a character that was very similar to dots I would suggest that. The closest is * I think, so what do you think of "***"? And join opertator for tsqueries is the same : select 'fat'::tsquery *** 'cat'; ? Single '*' ? That's close to regex, any number of tokens. And it saves rules

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-04-01 Thread Alvaro Herrera
Teodor Sigaev wrote: > >Well, I noticed that the docs talk about an operator that can be used in > >SQL (outside the tsquery parser), as well as an operator that can be > Just to join 2 tsquery with operator FOLLOWED BY Ok. > >used inside tsquery. Inside tsquery anything would be usable, but >

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-04-01 Thread Teodor Sigaev
Well, I noticed that the docs talk about an operator that can be used in SQL (outside the tsquery parser), as well as an operator that can be Just to join 2 tsquery with operator FOLLOWED BY used inside tsquery. Inside tsquery anything would be usable, but outside that it would be good to

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-04-01 Thread Alvaro Herrera
Oleg Bartunov wrote: > On Thu, Mar 31, 2016 at 9:14 PM, Alvaro Herrera > wrote: > > > What led you to choose the ? operator for the FOLLOWED BY semantics? > > It doesn't seem a terribly natural choice -- most other things seems to > > use ? as some sort of wildcard.

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-04-01 Thread Oleg Bartunov
On Thu, Mar 31, 2016 at 9:14 PM, Alvaro Herrera wrote: > What led you to choose the ? operator for the FOLLOWED BY semantics? > It doesn't seem a terribly natural choice -- most other things seems to > use ? as some sort of wildcard. What about something like "...", so

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-03-31 Thread Alvaro Herrera
What led you to choose the ? operator for the FOLLOWED BY semantics? It doesn't seem a terribly natural choice -- most other things seems to use ? as some sort of wildcard. What about something like "...", so you would do SELECT q @@ to_tsquery('fatal ... error'); and SELECT q @@ (tsquery

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-03-31 Thread Dmitry Ivanov
Hi Teodor, I've looked through your version and made a few adjustments. > Pls, remove tsquery_setweight from patch because it's not a part of phrase > search and it isn't mentioned in docs. Please, make a separate patch for it. I've removed tsquery_setweight as you requested. I'm going to add

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-03-31 Thread Teodor Sigaev
Looking at patch, I'm inlined to commit it in current commitfest, it looks workable and too many people desire it. I've did some changes, mostly in formatting and comments. Patch makes some user-visible changes: 1 change order for tsquery. Assume, it's acceptable, only a few users store

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-03-28 Thread Alexander Korotkov
Hi! On Sat, Mar 26, 2016 at 12:02 AM, David Steele wrote: > On 3/25/16 3:54 PM, Artur Zakirov wrote: > > On 25.03.2016 21:42, Dmitry Ivanov wrote: > >> Sorry for the delay, I desperately needed some time to finish a bunch of > >> dangling tasks. > >> > >> I've added some

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-03-25 Thread David Steele
On 3/25/16 3:54 PM, Artur Zakirov wrote: > On 25.03.2016 21:42, Dmitry Ivanov wrote: >> Sorry for the delay, I desperately needed some time to finish a bunch of >> dangling tasks. >> >> I've added some new comments and clarified the ones that were obscure. >> Moreover, I felt an urge to recheck

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-03-25 Thread Artur Zakirov
On 25.03.2016 21:42, Dmitry Ivanov wrote: Sorry for the delay, I desperately needed some time to finish a bunch of dangling tasks. I've added some new comments and clarified the ones that were obscure. Moreover, I felt an urge to recheck most parts of the code since apparently nobody (besides

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-03-25 Thread David Steele
On 3/25/16 2:42 PM, Dmitry Ivanov wrote: > Sorry for the delay, I desperately needed some time to finish a bunch of > dangling tasks. > > I've added some new comments and clarified the ones that were obscure. > Moreover, I felt an urge to recheck most parts of the code since apparently >

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-03-25 Thread Dmitry Ivanov
Sorry for the delay, I desperately needed some time to finish a bunch of dangling tasks. I've added some new comments and clarified the ones that were obscure. Moreover, I felt an urge to recheck most parts of the code since apparently nobody (besides myself) has gone so far yet. On 25.03.16

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-03-25 Thread Alexander Korotkov
On Fri, Mar 25, 2016 at 6:42 PM, David Steele wrote: > On 3/16/16 12:38 PM, Dmitry Ivanov wrote: > > I've made an attempt to fix some of the issues you've listed, although >> there's >> still much work to be done. I'll add some comments later. >> > > Do you know when you'll

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-03-25 Thread David Steele
Hi Dmitry, On 3/16/16 12:38 PM, Dmitry Ivanov wrote: I've made an attempt to fix some of the issues you've listed, although there's still much work to be done. I'll add some comments later. Do you know when you'll have a chance to respond to reviews and provide a new patch? Time is short

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-03-21 Thread Alexander Korotkov
Hi! I see that patch changes existing regression tests in tsearch2.out. *** a/contrib/tsearch2/expected/tsearch2.out --- b/contrib/tsearch2/expected/tsearch2.out *** SELECT '(!1|2)&3'::tsquery; *** 278,292 (1 row) SELECT '1|(2|(4|(5|6)))'::tsquery; !

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-03-21 Thread Artur Zakirov
I tried to find some bugs in the code. I can't find them. But it does not mean that there are not bugs. Still there are a lack of comments and trailing whitespaces. On 16.03.2016 19:38, Dmitry Ivanov wrote: Hi, Artur I've made an attempt to fix some of the issues you've listed, although

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-03-20 Thread David Steele
On 2/29/16 10:33 AM, Artur Zakirov wrote: > Conclusion > -- > > This patch is large and it needs more research. I will be reviewing it > and will give another notes later. This thread has not had a response from the authors or new patch in more than two weeks. Please post something

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-03-19 Thread Dmitry Ivanov
Hi, Artur I've made an attempt to fix some of the issues you've listed, although there's still much work to be done. I'll add some comments later. > This function has the duplicated piece from the tsvector_setweight() > from tsvector_op.c. You can define new function for it. I'm not sure it's

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-02-29 Thread Artur Zakirov
Hello, Dmitry This is my initial review for you patch. Below are my comments. Introduction This patch introduce new operator and new functions. New operator: - ?? New functions: - phraseto_tsquery([ config regconfig , ] query text) - setweight(tsquery, "char") -

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-02-02 Thread Robert Haas
On Tue, Feb 2, 2016 at 6:04 AM, Alvaro Herrera wrote: > Andreas Joseph Krogh wrote: >> Which seems to indicate it has received a fair amount of testing and is quite >> stable. >> Hopefully it integrates into the 9.6 codebase without too much risk. > > Yes, yes, that's

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-02-02 Thread Oleg Bartunov
On Tue, Feb 2, 2016 at 10:18 AM, Andreas Joseph Krogh wrote: > På tirsdag 02. februar 2016 kl. 04:22:57, skrev Michael Paquier < > michael.paqu...@gmail.com>: > > > > On Mon, Feb 1, 2016 at 8:21 PM, Dmitry Ivanov > wrote: >> >> This patch was

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-02-02 Thread Andreas Joseph Krogh
På tirsdag 02. februar 2016 kl. 09:20:06, skrev Oleg Bartunov < obartu...@gmail.com >:     On Tue, Feb 2, 2016 at 10:18 AM, Andreas Joseph Krogh > wrote: På tirsdag 02. februar 2016 kl. 04:22:57, skrev Michael Paquier

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-02-02 Thread Andreas Joseph Krogh
På tirsdag 02. februar 2016 kl. 12:04:21, skrev Alvaro Herrera < alvhe...@2ndquadrant.com >: Andreas Joseph Krogh wrote:    > Which seems to indicate it has received a fair amount of testing and is quite > stable. > Hopefully it integrates into the 9.6

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-02-02 Thread Alvaro Herrera
Andreas Joseph Krogh wrote:   > Which seems to indicate it has received a fair amount of testing and is quite > stable. > Hopefully it integrates into the 9.6 codebase without too much risk. Yes, yes, that's all very good, but we're nearing the closure of the 9.6 development cycle and we only

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-02-02 Thread Oleg Bartunov
On Tue, Feb 2, 2016 at 2:04 PM, Alvaro Herrera wrote: > Andreas Joseph Krogh wrote: > > > Which seems to indicate it has received a fair amount of testing and is > quite > > stable. > > Hopefully it integrates into the 9.6 codebase without too much risk. > > Yes, yes,

[HACKERS] [PATCH] Phrase search ported to 9.6

2016-02-01 Thread Dmitry Ivanov
Hi Hackers, Although PostgreSQL is capable of performing some FTS (full text search) queries, there's still a room for improvement. Phrase search support could become a great addition to the existing set of features. Introduction It is no secret that one can make Google search

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-02-01 Thread Andreas Joseph Krogh
På tirsdag 02. februar 2016 kl. 04:22:57, skrev Michael Paquier < michael.paqu...@gmail.com >:     On Mon, Feb 1, 2016 at 8:21 PM, Dmitry Ivanov > wrote: This patch was originally developed by Teodor

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-02-01 Thread Michael Paquier
On Mon, Feb 1, 2016 at 8:21 PM, Dmitry Ivanov wrote: > This patch was originally developed by Teodor Sigaev and Oleg Bartunov in > 2009, so all credit goes to them. Any feedback is welcome. > This is not a small patch: 28 files changed, 2441 insertions(+), 380