I have site in production right now that is using tsearch2. What I
did to accommodate the results with SA was to simply not map the
tsearch2 column to the SA object. I have a view that creates the
tsvector objects based on the source table. (I actually created a
materialized view and indexed it if you wanted to google for
materialized views and PG),
Next, I simply join the SA object with a custom query when I do the
search.
Example
tsearch=engine.text('my tsearch query that returns the ids of the
objs').
If you want objects returned, you can use the mapper.instances
function
myobj=MyObj.mapper.instances(tsearch.execute())
-Dennis
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---