I'm trying to fix search on a site with PostgreSQL 7.3.4 and tsearch (1, not 2). Much as I'd like to blow it away and start over, there's client data in it, so I'd rather fix it, if possible.
Here's the error that results from searching on 'hephalump':
ERROR: Attribute "pos" not found
SQL:
select txt.tid as object_id
from txt
where
txt.fts_index @@ '\'hephalump\''
order by pos desc
limit 10
offset 0
while executing
"ns_pg_bind select nsdb0 {
select txt.tid as object_id
from txt
where
txt.fts_index @@ '\'hephalump\'..."
("uplevel" body line 1)
invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql]"
("postgresql" arm line 2)
invoked from within
[SNIP]
I see things getting indexed, so that part seems to be working. The 'txt' table looks like:
tid | path | fts_index | last_modified
------+------+---------------------------------------------------------------------------------------------------------------+----------------------------
2688 | | 'see' 'hope' 'post' 'test' 'check' 'eleph' 'final' 'known' 'search' 'sincer' 'respons' 'function' 'hephalump' | 2005-03-28 13:07:45.153932
(1 row)
So there's no 'pos' column in this table. I can't figure out where the query that's trying to order by 'pos' exists, despite extensive grepping. Any suggestions? Can someone tell me where this sql code is lurking?