Hi all, I just did s fresh oacs 4.6, pg 7.2.3, nsd 3.4.2 install with all the usual bits 'n pieces (including the postgres contrib bits for openfts).
Difference being, I used fts-tcl 0.3.2 (released nov 18th) instead of 0.3.1.
two things I have found so far:
- you need to compile & install the postgres/contrib/tsearch module (don't remember doing that before)
- the ranking/ordering function relor seems to have changed - or the get_sql function that builds the query - or something else in the bowels of OpenFTS
(1) is easy to deal with, (2) can be avoided with the following hack in openfts-driver/tcl/openfts-driver-procs.tcl - change the set sql_sort (line 72) to:
set sql_sort "
select $self(TXTID) as object_id
from $self(TABLE)
where
$date_range_condition
$condition
$permission_check_condition
limit $limit
offset $offset"
ie. strip the $out part of the select, which means we no longer have the
select relor( 1.0, 0.01, 0, txt.tid, txt.tid % 10 + 1 , '{"foo"}' ) as pos
(or similar) so we also need to strip out the $order (which says something like order by pos desc)
The reason being, $out is produced as:
relor( 1.0, 0.01, '0', txt.tid, txt.tid % 10 + 1 , '{"moof"}' ) as pos
where moof is the search term. Notice the third parameter '0' which should be an int. Problem is, this stuff all gets built in never never land which I can't seem to find.
anyone got any ideas, or should I just be sensible and revert to 0.3.1?