The Advanced Search extension replaces native search with Sphinx, an external search engine. So search works much more faster, server load is decreased, and results become more trustworthy.
Sphinx search daemon
Install Sphinx on your web server. This step depends on your server configuration. Sphinx is highly popular and almost all server operating systems contains that in repositories.
E.g. on Debian & Ubuntu
apt-get install sphinxsearch
On CentOS, RedHat and RHEL:
yum install sphinxsearch
Installation can require some OS-administrative skills, so you may need to contact your server administrator or hosting provider regarding the matter.
Clear the store cache under var/cache and all cookies for your store domain. Disable compilation for Magento 1.4+. This step eliminates almost all potential problems. It's necessary since Magento uses cache heavily.
Upload the module
Set up cron
Since version 1.3 the extension needs to be launched by cron to make Full Reindex and restart Sphinx if it crashed.
If you have already configured cron jobs for your Magento installation then you can skip this step. Read the following instructions on setting cron job for your Magento store: Magento user guide
Generally it would be enough to run in SSH console of your server:
And add the following line:
Once cronjob is set up and running, the extension will be saving every action in the log, which can be viewed in System->Configuration->aheadWorks Extensions->Info->aheadWorks Extensions logging->View log. If you think that the extension does not work as expected, it is recommended to check the log first. If it is empty or contains very few records, it may indicate that your cronjob is not set or set improperly. Normally, every cron launch should add 1 or more entries. Actual quantity of the entries depends on the number of processed events per given cronjob.
After having configured indexes, open the System > Configuration > Advanced Search page. Enable the extension and configure Sphinx daemon settings.
- Server path - the path to the command 'searchd' from the root of the server.
- Server address - the address of the server where Sphinx is installed. 127.0.0.1 is the default value.
- Server port - searchd TCP port number. 3312 is the default value.
- Match Mode - results matching mode. Match all query words is the default value. You can find more details at Sphinx reference manual
Search Options tab (added since version 1.4.0):
Wildcard search - with this function enabled, the extension becomes capable of pulling results for incomplete queries. If you enable this option, the extension will consider every search query to be "incomplete", and will supply the query with "*" in the specified position:
- Wildcard search type = *start - for "son" query, the search will bring "Smithson", and will not bring "Sony"
- Wildcard search type = *middle* - for "son" query, the search will bring both "Smithson" and "Sony"
- Wildcard search type = end* - for "son" query, the search will bring "Sony", and will not bring "Smithson"
Morphology - the extension now allows to apply morphology preprocessors to indexes. Default Sphinx package comes with several Morphology Dictionaries, and you can also download and install additional dictionaries for the Sphinx engine (Note, that these extra dictionaries must be installed separately on the Sphinx side)
IMPORTANT NOTE: due to an existent issue in the Sphinx search engine itself, it cannot handle both Wildcard search and Morphology search simultaneously. Make sure that you only have one of these options active at a given time.
Create any index at Advanced Search > Indexes page. Add required attributes and set their weights (Sphinx reference manual). Save and reindex newly created index - its status should be Ready. When you have at least one index created, you can start searchd daemon at the extension configuration page.
- Do not start 'searchd' daemon if you have no indexes
- Start 'searchd' daemon with the dedicated button in System->Configuration->Advanced Search->Manage searchd daemon->[Start searchd]. In many cases starting searchd via ssh console results in incorrect work of the extension.
- enable_star option is set to 1 by default
- Full Reindex is launched by cron at 02:02 AM.
If you just need to temporary disable the extension, you can just do the steps 1-6, without deleting the files of the extension.
- Disable compilation, in case it is enabled.
- Delete the extension's indexes in Advanced Search-> Manage Indexes backend tab (note, "Delete" action is available from the Index details screen)
- Login to your FTP, navigate to app/etc/modules/
Open the file AW_Advancedsearch.xml and change the following line:
Now your Magento is unaware of the existence of this module.
- Clear the cache under var/cache
- Make sure that the site is working properly, otherwise roll back the changes and apply to our technical support.
- If everything works fine, it is safe to delete the files of the extension.
- In case you need to clean the database, backup your database and then run the following queries in MySQL:
Note, if you are using the table with prefixes, you must specify them in all table names.
If you are not sure how to do that or expect any troubles with it, please contact your server administrator regarding the matter.
If you remove the tables as it is described above, you will need to configure the extension and create all indexes again after the extension is reinstalled.
- Check if your web server user has read / write access to /var/aw_advancedsearch/searchd.conf
- After adjusting the access permissions, kill the searchd process, remove the advanced search temp files and re-index; then, try again.
You can always find the latest version of the software, full documentation, demos, screenshots and reviews at http://ecommerce.aheadworks.com
License agreement: http://ecommerce.aheadworks.com/LICENSE-M1.txt
Contact us: http://ecommerce.aheadworks.com/contacts/
Copyright © 2015 aheadWorks http://www.aheadworks.com