Search Postgresql Archives

tsearch2: plainto_tsquery() with OR?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 does not exist in the searched tsvectors (but others do), I would still like the search result to be "true". plainto_tsquery() glues each keyword together with "&". I search for a plainto_tsquery() that glues the keywords with an "|" (the OR operator). In that way, not ALL keywords are required to exist in the tsvector in order for the row to be returned,

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux