Child pages
  • Advanced Search
Skip to end of metadata
Go to start of metadata



Advanced Search

Extension page:

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.


For Search Autocomplete And Suggest users


If you are using the 1.4.0 version of the Advanced Search extension together with the Search Autocomplete And Suggest module, make sure that the latter is updated to 3.3.5 version



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

1. Backup your web directory and store database.

 Click to view details

You can make backup copies with any tool you find appropriate

If you are going to use the native Magento backup function, navigate to System -> Tools -> Backups and perform System and Database backups

 2. Log in to the Magento backend

 3. Disable compilation

 Click to view details

Navigate to System -> Tools -> Compilation.

If Compiler status is Disabled, you can skip to the next step

If Compiler is enabled, disable it.

IMPORTANT: after the extension is installed, you can enable the compilation again; IT IS CRUCIAL that you use "Run Compilation Process" function, not just "Enable button"


Installing an extension with the Compilation enabled will result in store downtime.

 4. Flush store cache

 Click to view details

You can flush the store cache in 2 ways:

  • via the backend:

Navigate to System -> Cache Management menu, and click Flush Magento Cache button

  • via filesystem:

On your server, navigate to Magento root folder, then proceed to /var/cache/; delete all the content there.

 5. Download the extension package from your account and extract the downloaded archive

 6. Copy the content of /Step_1/ folder to your store's root directory

If you are using a custom theme,

 read the instructions here.

In case you are using a custom theme, it is recommended to copy the design files to your current theme's folders. In case there are several themes in use at the same store, the design files must be copied to each of them.

  • Find this folder in the package: /step_1/app/design/frontend/base/default/ ; copy its content to /app/design/frontend/[your_package]/[your_theme]/
  • Find this folder in the package: /step_1/skin/frontend/base/default/ ; copy its content to /skin/frontend/[your_package]/[your_theme]/

 7. Copy the content of /Step_2/ folder to your store's root directory

 8. Flush store cache again; log out from the backend and log in again.

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:


*/3 * * * * wget -O - -q 'http://your-store/cron.php'
Don't forget to confirm saving request when exit.

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.


Basic Configuration

After having configured indexes, open the System > Configuration > Advanced Search page. Enable the extension and configure Sphinx daemon settings.

Sphinx tab:

  • 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. 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.

Creating Index

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.

  1. Disable compilation, in case it is enabled.
  2. Delete the extension's indexes in Advanced Search-> Manage Indexes backend tab (note, "Delete" action is available from the Index details screen)
  3. Login to your FTP, navigate to app/etc/modules/
  4. Open the file AW_Advancedsearch.xml and change the following line:


    Now your Magento is unaware of the existence of this module.

  5. Clear the cache under var/cache
  6. Make sure that the site is working properly, otherwise roll back the changes and apply to our technical support.
  7. If everything works fine, it is safe to delete the files of the extension.
  8. 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. 


After the extension installation the store gives an error, or blank page, or suggests to start Magento installation procedure.
Change the owner of the extracted extension files to the web server user and set 775 permissions on them. Clear the store cache and try again.
After the extension installation the page System->Configuration->Advanced Search returns 404 error.
Logout from backend and login back again.
There is no aheadWorks extensions under my configuration section, or having the extension tab clicked I get a blank page, or Access Denied error.
Clear the store cache, browser cookies, logout and login again.
I've set up everything correctly, inserted the HTML code but there is nothing on that page.
Clear the store cache, clear your browser cache and domain cookies and refresh the page.
My configuration changes do not appear on the store.
Clear the store cache, clear your browser cache and domain cookies and refresh the page.
I cannot start / stop the search daemon from my admin panel.
  1. Check if your web server user has read / write access to /var/aw_advancedsearch/searchd.conf
  2. 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
License agreement:
Contact us:
Copyright © 2019 aheadWorks

  • No labels