Magento Full Text Search Not Working on Live Server
Are you facing issues with your Magento full text search not working properly even after enabling it? Don’t worry; I’ll guide you through the process of troubleshooting this common issue.
Step 1: Enable Full Text Search in Magento Configuration
First, ensure that the full text search option is enabled in your Magento configuration:
- Navigate to
system > configuration > catalogsearchunder the top menu. - Look for the “Search Engine Options” section and set the following:
Use Search Terms as Keywords: YesAllow Search by Tags: No (or Yes, depending on your requirement)
- Click
Save Config.
Step 2: Modify the Fulltext.php File
The next step involves modifying a core file responsible for full text search functionality. Before proceeding, make sure to take a backup of the file.
- Go to
app/code/core/Mage/CatalogSearch/Model/Fulltext.php. - Locate this line:
$likeCond = '(' . join(' OR ', $like) . ')';
- Replace it with the following:
$likeCond = '(' . join(' AND', $like) . ')';
The OR operator is replaced by an AND operator to ensure that the search results match all keywords exactly.
Step 3: Clear Cache and Reindex
After making changes, clear your Magento cache and reindex the data:
- Navigate to
system > tools > cache management. - Select
Flush Magento Cache. - Go to
system > index managementand clickReindex all.
Step 4: Verify Full Text Search Functionality
Now, go to your front-end search bar and try searching for a keyword like “fulltext”. The search should return results matching the exact word.
If you’re still facing issues, double-check that there are no other extensions or customizations interfering with the full text search functionality. Additionally, ensure that your Magento version is up-to-date.
Remember, modifying core files should be done with caution. If you prefer an alternative approach without touching core files, consider using a third-party extension like Amasty’s Instant Search, which provides advanced search features.
Conclusion
In this blog post, we discussed the common issue of Magento full text search not working properly on a live server and provided step-by-step solutions to resolve it. By following these guidelines, you can ensure that your customers have an enhanced shopping experience with accurate search results.
For more insights into optimizing Magento performance and enhancing user experience, check out our other articles at https://laravelcompany.com. We cover a wide range of topics to help you get the most out of your e-commerce platform.