I'm starting to implement Postgres text search and am not quite sure how to build a complex query. The full text part is a string and then, of course, the other components are Query types. How would I combine them?
Example: items = db(("to_tsvector('english', description) @@ to_tsquery('english', '%s')" % q) & (db.item.status=='active')).select(db.item.ALL, orderby=orderby) Errors: TypeError: unsupported operand type(s) for &: 'str' and 'Query' Do I have to write out the whole query as a string in SQL?