On Thursday 18 January 2007 07:11, Sanjay wrote:
Hi All,

Trying to implement full text search with PostgreSQL and tsearch2,
being a beginner, I am facing some basic hurdles:

1. How to declare a table in SA, I mean, what SA datatype should
"tsvector" correspond to?
2. Can the index be defined using SA, or we need to do it in the
backend?
3. Can the trigger for auto update be defined using SA, or we need to
do it in the backend?
4. How to frame the query in SA?

SA doesn't support tsvectors, as far as I know. The simplest thing in my mind is to build one table that contains the tsvector (and is not mapped to SA) and a key to the original record. Then, you can do whatever queries you like (using the underlying database engine) to get keys to the data in the source table and use SA to grab these data. Not ideal, but I think it will work. Alternatively, you can create a new type for SA; there is a recent message in the archives about doing that (not with tsvector, but....). As for querying, I'm not sure how that would be best implemented in SA.

Sean

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to