Re: [rt-users] Indexed FTS with RT 4.0.1 and pgsql 8.3.9 doesn't work

2011-05-27 Thread Robert Wysocki
Dnia 2011-05-26, czw o godzinie 10:57 -0400, Alex Vandiver pisze:
 On Thu, 2011-05-26 at 08:36 +0200, Robert Wysocki wrote:
  [snip]
 
 Please keep all replies on the list.
 
  Thanks for the patch, rt-fulltext-indexer now works fine (assuming that
  not trowing an error any more means everything is fine), but searches
  still return no tickets whereas the same phrases are found using
  non-indexed searches.
 
 Did you run `rt-fulltext-indexer`, or `rt-fulltext-indexer --all`?  I
 suspect you only indexed the first 100 attachments in your database.

Actually I did run rt-fulltext-indexer --all but what I was missing
was resolved keyword in the search.

Thanks for the help.

Regards,
-- 
Robert Wysocki
CONTIUM S.A., http://www.contium.pl



Re: [rt-users] Indexed FTS with RT 4.0.1 and pgsql 8.3.9 doesn't work

2011-05-26 Thread Alex Vandiver
On Thu, 2011-05-26 at 08:36 +0200, Robert Wysocki wrote:
 [snip]

Please keep all replies on the list.

 Thanks for the patch, rt-fulltext-indexer now works fine (assuming that
 not trowing an error any more means everything is fine), but searches
 still return no tickets whereas the same phrases are found using
 non-indexed searches.

Did you run `rt-fulltext-indexer`, or `rt-fulltext-indexer --all`?  I
suspect you only indexed the first 100 attachments in your database.
 - Alex



[rt-users] Indexed FTS with RT 4.0.1 and pgsql 8.3.9 doesn't work

2011-05-25 Thread Robert Wysocki
Hi there,

After enabling indexed FTS and setting up the fulltext index I run
rt-fulltext-indexer and after few seconds it trew an error:
Can't call method id without a package or object reference
at ./rt-fulltext-indexer line 399.

Fulltext searches return nothing, quering the database with:
select * from attachements where content like '%something%;
works fine.

Any suggestions?

Regards, 
-- 
Robert Wysocki
CONTIUM S.A., http://www.contium.pl



Re: [rt-users] Indexed FTS with RT 4.0.1 and pgsql 8.3.9 doesn't work

2011-05-25 Thread Alex Vandiver
On Wed, 2011-05-25 at 09:03 +0200, Robert Wysocki wrote:
 [snip]

Since 4.0.1 isn't released yet, I presume you mean 4.0.1rc1.

 After enabling indexed FTS and setting up the fulltext index I run
 rt-fulltext-indexer and after few seconds it threw an error:
 Can't call method id without a package or object reference
 at ./rt-fulltext-indexer line 399.
 
 Fulltext searches return nothing, quering the database with:
 select * from attachements where content like '%something%;
 works fine.
 
 Any suggestions?

Try the following patch?  You'll need to re-run configure to have the
changes propagate from rt-fulltext-indexer.in to rt-fulltext-indexer
before re-running make install.
 - Alex
From 44ed7407c3e2bcdb207468afe4e7098eeffcd3fb Mon Sep 17 00:00:00 2001
From: Alex Vandiver ale...@bestpractical.com
Date: Wed, 25 May 2011 09:07:47 -0400
Subject: [PATCH] Return the Attachment object, not its id

---
 sbin/rt-fulltext-indexer.in |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sbin/rt-fulltext-indexer.in b/sbin/rt-fulltext-indexer.in
index 98a41a9..37fb227 100644
--- a/sbin/rt-fulltext-indexer.in
+++ b/sbin/rt-fulltext-indexer.in
@@ -394,7 +394,7 @@ sub attachments_html {
 
 sub filter_html {
 my $attachment = shift;
-if ( my $parent = $attachment-Parent ) {
+if ( my $parent = $attachment-ParentObj ) {
 # skip html parts that are alternatives
 return 1 if $parent-id
  $parent-ContentType eq 'mulitpart/alternative';
-- 
1.7.4.1.568.g3d809