Searching ticket content?

Hello list,
Some users at work are wondering if they can search ticket contents?
There’s no way in the search builder, but I know I can plug any SQL I want
to into the advanced search. Even if I knew the SQL to use, though, that’s
only a saved search for that string. Could I somehow offer users a way to
search for a string they enter when they’re ready to search? I don’t want
to expose the actual SQL query, as there’s too much chance of a misplaced
punctuation mark or mistyped character causing errors. Thanks.

Alex Hall
Automatic Distributors, IT department
ahall@autodist.com

Hey Alex,On Mon, Nov 7, 2016 at 7:57 AM, Alex Hall ahall@autodist.com wrote:

Hello list,
Some users at work are wondering if they can search ticket contents? There’s
no way in the search builder,

Errrr… nope. There is.

Search → Tickets → New Search

The second drop down on your left starts with “Subject”. Change it to “Content”.

Do you have fulltext searching enabled?

-m

Hi Alex,

I’m guessing you are looking for full text indexing, further details can
be found here:

https://docs.bestpractical.com/rt/4.4.1/full_text_indexing.html

Best Regards

MartinOn 2016-11-07 13:57, Alex Hall wrote:

Hello list,
Some users at work are wondering if they can search ticket contents?
There’s no way in the search builder, but I know I can plug any SQL I
want to into the advanced search. Even if I knew the SQL to use,
though, that’s only a saved search for that string. Could I somehow
offer users a way to search for a string they enter when they’re ready
to search? I don’t want to expose the actual SQL query, as there’s too
much chance of a misplaced punctuation mark or mistyped character
causing errors. Thanks.

Alex Hall
Automatic Distributors, IT department
ahall@autodist.com


RT 4.4 and RTIR training sessions, and a new workshop day!
https://bestpractical.com/training

  • Los Angeles - January 9-11 2017

Hello list,
Some users at work are wondering if they can search ticket contents?
There’s no way in the search builder,

Does your search builder page not have “Content” as a choice in the
pull-down menu with “Subject” as the default?

Hello list,
Some users at work are wondering if they can search ticket contents?
There’s no way in the search builder, but I know I can plug any SQL I want
to into the advanced search. Even if I knew the SQL to use, though, that’s
only a saved search for that string. Could I somehow offer users a way to
search for a string they enter when they’re ready to search? I don’t want
to expose the actual SQL query, as there’s too much chance of a misplaced
punctuation mark or mistyped character causing errors. Thanks.


Alex Hall
Automatic Distributors, IT department
ahall@autodist.com

Hi Alex,

In advanced search, you select ‘Content’ and the the items to search
for. Does that not work for you?

Regards,
Ken

Hi all,
That ‘subject’ dropdown has content-type, but not just content. Is there a
setting I’ve missed?On Mon, Nov 7, 2016 at 9:16 AM, Kenneth Marshall ktm@rice.edu wrote:

On Mon, Nov 07, 2016 at 08:57:32AM -0500, Alex Hall wrote:

Hello list,
Some users at work are wondering if they can search ticket contents?
There’s no way in the search builder, but I know I can plug any SQL I
want
to into the advanced search. Even if I knew the SQL to use, though,
that’s
only a saved search for that string. Could I somehow offer users a way to
search for a string they enter when they’re ready to search? I don’t want
to expose the actual SQL query, as there’s too much chance of a misplaced
punctuation mark or mistyped character causing errors. Thanks.


Alex Hall
Automatic Distributors, IT department
ahall@autodist.com

Hi Alex,

In advanced search, you select ‘Content’ and the the items to search
for. Does that not work for you?

Regards,
Ken

Alex Hall
Automatic Distributors, IT department
ahall@autodist.com

Currently here wondering the same thing as @Alex_Hall . My dropdown has Subject, Content-Type, and Filename. How do I get Content to be in this dropdown so we can search ticket contents?

Wow, I didn’t expect anyone to reply to this after so long. As @Martin_Wheldon said, the key seems to be fulltext indexing. Once you enable that, RT can search ticket contents.

Setting it up was pretty easy, at least with Debian. I added the option to the config file, created the cron job, and restarted RT. The cron job will re-run the indexing script as often as you like (I use every ten minutes, but it depends on your server and RT traffic). As the documentation says, you’ll want to run the script manually at first, since it will take a long time and you can see any errors that might pop up. After that, let the cron job take over, and you should never have to think about it again.

Thanks for the quick reply. I just stumbled upon that article myself after Martin’s comment gave me a clue. Currently running the initial script to create AttachmentsIndex right now using mysql. Here’s the link for anyone else that finds this thread:

https://docs.bestpractical.com/rt/5.0.5/full_text_indexing.html

I’m getting quite a few errors, mainly the following, but we’ll see if it causes actual problems or not:
[3274153] [Wed Jan 10 21:50:20 2024] [warning]: Use of uninitialized value $headers in split at /opt/rt5/sbin/…/lib/RT/Attachment.pm line 899, line 960. (/opt/rt5/sbin/…/lib/RT/Attachment.pm:899)

EDIT: Oh this is nice. Can’t believe it took me so long to set this up. It’s working great so far. I set up a cron job to run every 15 minutes to update the index. I assume this runs as the user configured for RT because the remote root permissions I set up for the initial script between our web and database servers have been removed and our configured RT users that has permissions limited to the rt5 database is not causing any errors to be thrown when the update script runs.