Re: [GENERAL] tsearch2: plainto_tsquery() with OR?

2007-08-19 Thread Mike Rylander
On 8/9/07, cluster <[EMAIL PROTECTED]> wrote: > Thanks for your response! Let me try to elaborate what I meant with my > original post. > > If R is the set of words in the tsvector for a given table row and S is > the set of keywords to search for (entered by e.g. a website user) I > would like to

Re: [GENERAL] tsearch2: plainto_tsquery() with OR?

2007-08-13 Thread Ron Mayer
Tom Lane wrote: > Oleg Bartunov <[EMAIL PROTECTED]> writes: >> On Wed, 8 Aug 2007, cluster wrote: >>> Does anyone know where I can request an OR-version of plainto_tsquery()? > >> plainto_tsquery expects plain text, use to_tsquery for boolean operators. > > Are either of these definitions really

Re: [GENERAL] tsearch2: plainto_tsquery() with OR?

2007-08-09 Thread cluster
Thanks for your response! Let me try to elaborate what I meant with my original post. If R is the set of words in the tsvector for a given table row and S is the set of keywords to search for (entered by e.g. a website user) I would like to receive all rows for which the intersection between R

Re: [GENERAL] tsearch2: plainto_tsquery() with OR?

2007-08-08 Thread Oleg Bartunov
On Thu, 9 Aug 2007, Tom Lane wrote: Oleg Bartunov <[EMAIL PROTECTED]> writes: On Thu, 9 Aug 2007, Tom Lane wrote: ... behavior that people want is "here's some words, get me a weighted result", and if the weighting improves from time to time that's OK. We need to provide that API too. I thi

Re: [GENERAL] tsearch2: plainto_tsquery() with OR?

2007-08-08 Thread Trevor Talbot
On 8/8/07, Tom Lane <[EMAIL PROTECTED]> wrote: > Oleg Bartunov <[EMAIL PROTECTED]> writes: > > On Wed, 8 Aug 2007, cluster wrote: > >> Does anyone know where I can request an OR-version of plainto_tsquery()? > > > plainto_tsquery expects plain text, use to_tsquery for boolean operators. > > Are eit

Re: [GENERAL] tsearch2: plainto_tsquery() with OR?

2007-08-08 Thread Tom Lane
Oleg Bartunov <[EMAIL PROTECTED]> writes: > On Thu, 9 Aug 2007, Tom Lane wrote: >> ... behavior that people want is "here's some words, get me a weighted >> result", and if the weighting improves from time to time that's OK. >> We need to provide that API too. > I think I understand. It's called n

Re: [GENERAL] tsearch2: plainto_tsquery() with OR?

2007-08-08 Thread Tom Lane
Oleg Bartunov <[EMAIL PROTECTED]> writes: > On Thu, 9 Aug 2007, Tom Lane wrote: >> Are either of these definitions really right? If I type "foo bar baz" >> into Google, for instance, it seems to produce some sort of weighted >> result, neither a strict AND nor a strict OR. Google didn't get where

Re: [GENERAL] tsearch2: plainto_tsquery() with OR?

2007-08-08 Thread Oleg Bartunov
On Thu, 9 Aug 2007, Tom Lane wrote: Oleg Bartunov <[EMAIL PROTECTED]> writes: " neither a strict AND nor a strict OR" is not a good foundation for database text search API. Maybe not, but the Google boys have sure done well without telling anyone what their algorithms are. My feeling is that

Re: [GENERAL] tsearch2: plainto_tsquery() with OR?

2007-08-08 Thread Tom Lane
Oleg Bartunov <[EMAIL PROTECTED]> writes: > " neither a strict AND nor a strict OR" is not a good foundation for > database text search API. Maybe not, but the Google boys have sure done well without telling anyone what their algorithms are. My feeling is that if you use an API that involves exp

Re: [GENERAL] tsearch2: plainto_tsquery() with OR?

2007-08-08 Thread Oleg Bartunov
On Thu, 9 Aug 2007, Tom Lane wrote: Oleg Bartunov <[EMAIL PROTECTED]> writes: On Thu, 9 Aug 2007, Tom Lane wrote: Are either of these definitions really right? If I type "foo bar baz" into Google, for instance, it seems to produce some sort of weighted result, neither a strict AND nor a stric

Re: [GENERAL] tsearch2: plainto_tsquery() with OR?

2007-08-08 Thread Oleg Bartunov
On Thu, 9 Aug 2007, Tom Lane wrote: Oleg Bartunov <[EMAIL PROTECTED]> writes: On Wed, 8 Aug 2007, cluster wrote: Does anyone know where I can request an OR-version of plainto_tsquery()? plainto_tsquery expects plain text, use to_tsquery for boolean operators. Are either of these definitio

Re: [GENERAL] tsearch2: plainto_tsquery() with OR?

2007-08-08 Thread Tom Lane
Oleg Bartunov <[EMAIL PROTECTED]> writes: > On Wed, 8 Aug 2007, cluster wrote: >> Does anyone know where I can request an OR-version of plainto_tsquery()? > plainto_tsquery expects plain text, use to_tsquery for boolean operators. Are either of these definitions really right? If I type "foo bar

Re: [GENERAL] tsearch2: plainto_tsquery() with OR?

2007-08-08 Thread Oleg Bartunov
On Wed, 8 Aug 2007, cluster wrote: Does anyone know where I can request an OR-version of plainto_tsquery()? plainto_tsquery expects plain text, use to_tsquery for boolean operators. I don't understand why it doesn't exist already: In most cases, when using user entered keywords to search f

Re: [GENERAL] tsearch2: plainto_tsquery() with OR?

2007-08-08 Thread cluster
Does anyone know where I can request an OR-version of plainto_tsquery()? I don't understand why it doesn't exist already: In most cases, when using user entered keywords to search for, there should be returned some rows even though not ALL keywords are matched. ---(en

[GENERAL] tsearch2: plainto_tsquery() with OR?

2007-08-07 Thread cluster
I have some questions related to tsearch2: 1) Is ...WHERE rank(myTsVector, myTsQuery) > 0 ... just as fast as ...WHERE myTsVector @@ myTsQuery... ? 2)) I will use plainto_tsquery() to parse search keys entered by a website user to a tsquery. However, if only some of the entered keywords