Re: new function for tsquery creartion
От | Dmitry Ivanov |
---|---|
Тема | Re: new function for tsquery creartion |
Дата | |
Msg-id | 6754a224654a4f0339195b83b133d551@postgrespro.ru обсуждение исходный текст |
Ответ на | Re: new function for tsquery creartion (Thomas Munro <thomas.munro@enterprisedb.com>) |
Ответы |
Re: new function for tsquery creartion
|
Список | pgsql-hackers |
> Patch 03 (the documentation) needed some proof-reading. I've attached > a new version of that patch with some small suggested improvements. Thanks, I'm definitely going to use this. > Is there anything to_tsquery() can do that websearch_to_tsquery() > can't? Currently, no. > Would it be OK to use user-supplied websearch strings? > Ie can it produce a syntax error? I believe that's the most important question. After a private discussion with Theodor I came to a conclusion that the most beneficial outcome would be to suppress all syntax errors and give user some result, cutting all misused operators along the way. This requires some changes, though. > Is there any way to write OR as a term (that's a valuable non-stopword > in French)? You could quote it like this: websearch_to_tsquery('"or"'); Moreover, it's still possible to use & and |. > It seems like AROUND(x) should be documented also more generally for > tsquery, but I see there is some discussion about how that should > look. Personally, I like <N, M> operator better. It would instantly deprecate AROUND(N), which is why I'm going to drop it. > By the way, not this patch's fault, but I noticed that commit > f5f1355dc4d did this: > > - (errmsg("query contains only > stopword(s) or doesn't contain lexeme(s), ignored"))); > + (errmsg("text-search query contains > only stop words or doesn't contain lexemes, ignored"))); > > But the old test still appears in an example in > doc/src/sgml/textsearch.sgml. Will fix this. -- Dmitry Ivanov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company
В списке pgsql-hackers по дате отправления: