Generic Agent - filter by text - weird behaviour

Moderator: crythias

Post Reply
bin
OTRS newbie
Posts: 29
Joined: 06 Jan 2011, 10:29
OTRS Version?: 3

Generic Agent - filter by text - weird behaviour

Post by bin »

I have an ongoing need to identify a set of tickets by searching for key words.
These tickets are then deleted

Using the Generic Agent I am running into very strange results.

For example, article contains the phrase:-
House Car Horse Blue

If I set the Text Filter in Generic Agent as House Car Horse Blue I get no result
If I set the Text Filter in Generic Agent as "House Car Horse Blue" I get no result
If I set the Text Filter in Generic Agent as "House Car Horse Blue*" I get a result

However, this is not the phrase I want to use as it is not unique to the range I want.

A few lines down the article *is* the phrase I want which is:-
empty or whitespace

Using the example above which does work, I use the same format "empty or whitespace*"
Result - nada, nothing, zippo...........
Tried with no "" with no * - just does not return anything

If I put that phrase in the normal search box on the dashboard it returns the correct tickets.

I am flummoxed - does anyone have any suggestions please???

bin

CSL
OTRS wizard
Posts: 159
Joined: 11 Nov 2011, 19:27
OTRS Version?: 3.0.11

Re: Generic Agent - filter by text - weird behaviour

Post by CSL »

Is this using fulltext search on OTRS 3.x?

As far as I know, the fulltext field in generic agent should be the same as the fulltext field in normal ticket search.

They both employ an SQL LIKE statement to search across article bodies, subjects, To, CC, etc. You say the normal ticket search returns the results you want? I don't know why the generic agent one wouldn't if this is the case. To troubleshoot this, I would enable the MySQL general log, perform both searches using your keywords, and then grep the general log for the keywords. This should show you the SQL commands it is running for both of them. Try running them yourself from something like MySQL workbench to see what the results are.
Backend: OTRS 3.0.11 RedHat Enterprise Linux 6.2, Apache, MySQL with replication
Frontend: OTRS 3.0.11 RedHat Enterprise Linux 6.2 with SELinux, Apache SSL

bin
OTRS newbie
Posts: 29
Joined: 06 Jan 2011, 10:29
OTRS Version?: 3

Re: Generic Agent - filter by text - weird behaviour

Post by bin »

Well - after so much messing with my.cnf and getting nowhere, I came across a little gem courtesy of Google which was to use the % value.

I know this give 'Like' in SQL queries, but never thought it would be needed in a fulltext search box

"my search string*" returns nothing
"%my search string*" returns the info I need

Oh well - we live and learn!!!

Post Reply