zalando-stups / kio

The application registry in the STUPS ecosystem
http://docs.stups.io/en/latest/components/kio.html
Other
23 stars 11 forks source link

org.postgresql.util.PSQLException: ERROR: syntax error in tsquery: "team:foobar" #48

Closed harti2006 closed 8 years ago

harti2006 commented 8 years ago

It seems that colons inside search queries produce the following postgresql exception:

org.postgresql.util.PSQLException: ERROR: syntax error in tsquery: "team:octopus"

prayerslayer commented 8 years ago

Just replace with pipes so that it at least doesn't break? (It still won't do what intended.)

prayerslayer commented 8 years ago

We should just use plainto_tsquery instead of to_tsquery as it handles all those "user input errors" (not really errors but you know what I mean) for us.

http://www.postgresql.org/docs/9.4/static/functions-textsearch.html