Search
The search bar in the header of the operator panel allows staff to search SupportPal for users and tickets matching the term.
How search works
The search results are broken up into two components: users and tickets. Below we detail how searching works for each of these:
User Search
The search term will be wrapped in a wildcard and checked against the following user table columns:
- Firstname
- Lastname
- Firstname lastname (concatenated together by a single space)
Consider the following example, Joe Blogs <[email protected]>
. If we search for "pal
", then the database will look for any string containing "pal
" and in this case the email, [email protected]
, would match.
Ticket Search
Ticket search is slightly more complex as it not only looks at the ticket table but also at every message belonging to the ticket:
- Ticket number
- Ticket subject
- Ticket message content
To further complicate things, ticket search works slightly differently depending on which version of MySQL your database is using, please read the appropriate section and consult your system administrator / web host if you're not sure.
MySQL 5.5
Similar to user search, MySQL 5.5 uses a wildcard when searching the above columns (see previous example).
MySQL 5.6
MySQL 5.6 introduced FULLTEXT search which should be faster than the previous wildcard method. That being said the FULLTEXT search engine introduces a few caveats, that you should be aware of when writing search terms:
- A phrase that is enclosed within double quote (
"
) characters matches only rows that contain the phrase literally, as it was typed. - A phrase that is enclosed within single quote (
'
) characters, will have those characters stripped;'aaa'bbb'
would be parsed asaaa'bbb
- The search term is split into words, and a search is performed for each individual word. Words are made up of letters, digits, and underscores. Word boundaries are determined by the presence of non-word characters; for example, (space), , (comma), . (period), and so on...
- Words less than 3 characters are ignored
- Stop words, considered to have zero semantic value, are ignored; see Full-Text Stopwords to view the default stopword lists and how to change them
For example, if you wanted to search for any ticket with a message containing [email protected]
the search term must be encoded in double quotes ("
) otherwise the words joe
, supportpal
, and com
would be searched for individually which would match significantly more records.
For more information, please read: https://dev.mysql.com/doc/refman/5.6/en/fulltext-natural-language.html
Refining search results
It is possible to further filter the search results by clicking Filter Results in the yellow bar above the table. The respective grids contain a number of additional conditions that can be used to further refine the search results. To add additional conditions, click the Add Condition button and when ready click the Update button to re-run the search.