<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I'm testing a new RT4 installation with Postgres to try FullText search. I got RT up and running, ran the rt-setup-fulltext-index utility, updated my RT_SiteConfig file but get errors when trying to run the indexer:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">root@rt2:/opt/rt4# sbin/rt-setup-fulltext-index --dba postgres --dba-password '<removed>'<o:p></o:p></p>
<p class="MsoNormal">Enter name of a DB table that will be used to store Pg tsvector. Attachments table can be used.<o:p></o:p></p>
<p class="MsoNormal">[Attachments]:<o:p></o:p></p>
<p class="MsoNormal">Enter name of a column that will be used to store Pg tsvector<o:p></o:p></p>
<p class="MsoNormal">[ContentIndex]:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Configure your RT via site config:<o:p></o:p></p>
<p class="MsoNormal">Set( %FullTextSearch,<o:p></o:p></p>
<p class="MsoNormal">    Enable  => 1,<o:p></o:p></p>
<p class="MsoNormal">    Indexed => 1,<o:p></o:p></p>
<p class="MsoNormal">   Column   => 'ContentIndex',<o:p></o:p></p>
<p class="MsoNormal">    Table   => 'Attachments',<o:p></o:p></p>
<p class="MsoNormal">);<o:p></o:p></p>
<p class="MsoNormal">Going to do the following change in the DB:<o:p></o:p></p>
<p class="MsoNormal">ALTER TABLE Attachments ADD COLUMN ContentIndex tsvectorYou have choice between GiST or GIN index, the first is times slower to search, but it takes less place and faster to update.<o:p></o:p></p>
<p class="MsoNormal">[GiST]:<o:p></o:p></p>
<p class="MsoNormal">Going to do the following change in the DB:<o:p></o:p></p>
<p class="MsoNormal">CREATE INDEX ContentIndex_idx ON Attachments USING gist(ContentIndex)<o:p></o:p></p>
<p class="MsoNormal">root@rt2:/opt/rt4#<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">root@rt2:/opt/rt4# sbin/rt-fulltext-indexer <o:p></o:p></p>
<p class="MsoNormal">[Fri May 20 19:40:14 2011] [warning]: Use of uninitialized value $table in concatenation (.) or string at /usr/local/share/perl/5.10.1/DBIx/SearchBuilder.pm line 1223. (/usr/local/share/perl/5.10.1/DBIx/SearchBuilder.pm:1223)<o:p></o:p></p>
<p class="MsoNormal">[Fri May 20 19:40:14 2011] [warning]: Use of uninitialized value $args{"TABLE2"} in concatenation (.) or string at /usr/local/share/perl/5.10.1/DBIx/SearchBuilder/Handle.pm line 989. (/usr/local/share/perl/5.10.1/DBIx/SearchBuilder/Handle.pm:989)<o:p></o:p></p>
<p class="MsoNormal">[Fri May 20 19:40:14 2011] [warning]: DBD::Pg::st execute failed: ERROR:  relation "_3" does not exist<o:p></o:p></p>
<p class="MsoNormal">LINE 1: ...) AND ( Transactions_1.ObjectId = main.id ) JOIN  _3  ON ( _...<o:p></o:p></p>
<p class="MsoNormal">                                                             ^ at /usr/local/share/perl/5.10.1/DBIx/SearchBuilder/Handle.pm line 509. (/usr/local/share/perl/5.10.1/DBIx/SearchBuilder/Handle.pm:509)<o:p></o:p></p>
<p class="MsoNormal"><snip><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Did I miss something? I read through the RT_Config file comments and the --help flag for all related binaries.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">Patrick<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>