On Oct 3, 2006, at 10:49 , Oleg Bartunov wrote:
On Tue, 3 Oct 2006, Magnus Hagander wrote:
BTW, try
# select plainto_tsquery('foo bar');
plainto_tsquery
-----------------
'foo' & 'bar'
(1 row)
It parses plain text and makes tsquery. Function exists only in 8.2
- some later we add docs about changes in tsearch2.
Current docs, covering 8.2 is available from http://www.sai.msu.su/
~megera/wiki/tsearch2slides
This is great news- previously, I was using various regexes to
sanitize input into user-accessible search fields. Would it be build
in some simple query language?
"sam AND spade"
"blue OR yellow"
"(same AND spade) OR (blue AND yellow)"
Obviously, the conjunctions would need to be defined on a per-locale
basis.
-M
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend