[rt-users] ticket content search maybe doesn't work as excepted

ktm at rice.edu ktm at rice.edu
Tue May 12 11:30:47 EDT 2015

On Tue, May 12, 2015 at 05:11:59PM +0200, Christian Loos wrote:
> Hi,
> playing around with the ticket content search I discovered many "false
> positive" results.
> The _TransContentLimit [1] fetches all transaction, notably also the
> EmailRecord and CommentEmailRecord transactions which let the content
> search also found matches for stings which are inserted by templates
> into outgoing emails.
> This isn't what I would expect. If I search for content I would expect
> matches for the content of Create, Comment, Correspond, Forward Ticket
> and Forward Transaction (the content of an incoming email or the content
> of an RT user input).
> Example (vanilla RT 4.2.11 with unindexed search [2] enabled):
> * create a ticket with subject foo and content bar
> * search for: Content LIKE 'Greetings'
> I wouldn't expect a result here. But the 'Greetings' matches the one
> from default 'HTML Autoresponse template' template [3].
> Chris
> [1]
> https://github.com/bestpractical/rt/blob/stable/lib/RT/Tickets.pm#L828-997
> [2]
> https://bestpractical.com/docs/rt/4.2/full_text_indexing.html#UNINDEXED-SEARCH
> [3] https://github.com/bestpractical/rt/blob/stable/etc/initialdata#L260-285

Hi Chris,

The fulltext search applies to all attachments in the DB, which is what I
would expect it to do. I do agree, that a method to choose which type attachments
should be searched like the HistoryFilter function would be a useful enhancement.
In general, a content search on a "noise" word like "Greetings" would not really
be expected to produce useful results. It might me useful to add such terms to
your stop word list in your fulltext system. That would provide more useful
results even in the absence of attachment type filtering.


More information about the rt-users mailing list