[Rt-commit] r19101 - rt/3.999/branches/FTS/lib/RT/Model
ruz at bestpractical.com
ruz at bestpractical.com
Wed Apr 8 10:47:12 EDT 2009
Author: ruz
Date: Wed Apr 8 10:47:11 2009
New Revision: 19101
Modified:
rt/3.999/branches/FTS/lib/RT/Model/TicketCollection.pm
Log:
* use one column name for different DBs
Modified: rt/3.999/branches/FTS/lib/RT/Model/TicketCollection.pm
==============================================================================
--- rt/3.999/branches/FTS/lib/RT/Model/TicketCollection.pm (original)
+++ rt/3.999/branches/FTS/lib/RT/Model/TicketCollection.pm Wed Apr 8 10:47:11 2009
@@ -755,10 +755,11 @@
} else {
$alias = $self->{'_sql_aliases'}{'attachments'};
}
+ my $column = $config->{'Column'} || 'fts_index';
if ( $db_type eq 'mysql' ) {
$self->_sql_limit(
alias => $alias,
- column => $config->{'Column'},
+ column => $column,
operator => '=',
value => $value,
@rest
@@ -766,9 +767,10 @@
}
elsif ( $db_type eq 'Pg' ) {
my $dbh = $self->_handle->dbh;
+ #XXX: handle negative searches
$self->_sql_limit(
alias => $alias,
- column => $config->{'Column'} || 'content_tsvector',
+ column => $column,
operator => '@@',
value => 'plainto_tsquery('. $dbh->quote($value) .')',
quote_value => 0,
More information about the Rt-commit
mailing list