Overview
This article explains how to troubleshoot issues with Kayako Classic's search functionality.
1. Determine where the search issue occurs
Kayako Classic provides several search points across its interface.
To correctly diagnose the problem, it's crucial to determine where the end-user is triggering the search from, or where the search-related issue is being experienced.
2. Check for user and browser-specific issues
Does the problem affect particular users or all of them?
- Erratic search results or behavior for particular users may indicate permissions or visibility issues.
- Ensure you have examples of tickets or articles that should (or should not) be seen by the specific user, so you can better troubleshoot the issue.
- User-specific settings can be checked in the Manage Staff section in the Admin CP.
- Also, check the staff's Team permissions, as they might be overriding the user settings.
- Note that permissions or visibility can also affect all users - this article has specific steps for these cases.
Is the issue reproducible in different environments?
- Test it using other browsers.
- Test it from different machines.
Are there browser plugins or extensions interfering with the system behavior?
- Disable 3rd-party add-ons and check if the issue persists.
- Clear the browser's cache (or test in an anonymous window).
3. Check for word length or stopwords
Ensure that the search terms reportedly causing the issues do not fall under the following criteria:
- Words must be at least 4 characters in length, otherwise the search will ignore them. If required, such behavior can be changed.
- MySQL's full-text search functionality ignores some stopwords.
4. Check for persistent search strings
Whitespace inside the search bar is a common cause for empty results in the Ticket ListView, usually with the message "There is nothing to display here". It cannot be viewed unless it's selected:
Whitespace inside the search bar.
Remove the whitespaces characters and rerun the search to check if the expected results are displayed.
The search bar also retains the last used search terms. Ensure that wrong or empty results are not the consequence of pre-filled characters.
There have been cases when, despite clearing the pre-existing characters (whitespace or otherwise), they were filled in the search box again after returning to the page. In such cases, rebuilding the helpdesk cache fixed the problem.
5. Verify views and filters
Views and filters can restrict the tickets that a search will return.
Views have settings that will allow for displaying only tickets that are unassigned, assigned for the currently logged-in user, or all tickets regardless of their assignment statuses.
Ensure that wrong or empty results are not a consequence of the currently in-use view:
Currently set View for the ticket list
Filters are even more restrictive, as they allow for matching criteria in most ticket attributes.
This condition will usually be noticed because Kayako's interface will display a button when a filter is applied. Nonetheless, it's worth checking if empty or wrong results are the result of a misused or misconfigured filter:
Filtered search results
6. Rebuild ticket properties and search index
To reindex the tickets from the Admin CP, follow the steps in this article.
There is also a console-based version of the re-indexer that allows for restarting the process from the last stop point in case of interruption.
7. Verify knowledge base visibility settings
The access to knowledge base articles can be managed from their categories:
- A category can be associated with specific user groups and/or staff teams;
- The category scope can be set to Global, Public, or Private.
Such settings will restrict the search results according to the logged-in user context. Therefore empty or wrong results may result from the categories the user belongs to.
Please note that those settings can be combined to fine-tune the access to the knowledge base's content.
8. Rebuild knowledge base search index
The knowledge base articles can be reindexed from the Admin CP > Knowledgebase > Maintenance option.
9. Verify the Templates
Unavailable or disabled search fields may be the result of outdated or customizations issues on the product templates.
On the Admin CP, go to Templates > Diagnostics and diagnose Modified and Out of date templates:
Diagnose modified and out of date templates
From the resulting list, restore outdated templates and pay special attention to modified ones:
A modified template was located
Click on the template name ("customcss", in this example) to inspect its contents. In the example below, the highlighted code makes the search bar invisible in the help center:
Modified template content
Note that the issue could reside in a different template and not necessarily because of a CSS customization - for example, in the "header" template.
Additional instructions on how to handle template modifications can be found in this article.
10. Verify system and database settings
Ensure all the required settings for Kayako's are met, especially the database parameters sql_mode
and optimizer_search_depth
.
Besides checking MySQL's configuration file, you can ensure these settings are effectively in place by running the following query in a MySQL console:
SELECT @@sql_mode; SELECT @@optimizer_search_depth;
11. Investigate database configuration options
When dealing with performance issues, identifying long queries may help narrow down the searches that are taking longer to execute.
Check out MySQL's documentation on fine-tuning the full-text search as well.
12. Repair the index table
Please note that the repair should be done off-hours, as it may cause performance and availability issues.
There have been a couple of cases (2577641, 1193551) in which repairing the table that holds the search index seems to have helped fix the issue.
On a MySQL console, run the following instruction:
repair table swsearchindex;
13. Rebuild the helpdesk cache
This process rebuilds the database-cached data (like templates and settings) plus the __swift/cache/
directory contents, which are kept so they don't have to be generated every time the application requests them.
There are two ways of triggering the process of rebuilding Kayako's cache: manually, or from the Admin CP, option Diagnostics > Rebuild Cache.
In case the Admin CP is slow, or the rebuilding has problems to finish, manually delete the contents of the __swift/cache/
directory before starting the rebuild process.