How Magento Catalog Search works internally


Magento uses a very strong kind of catalog search functionality that is relaiable,efficient and search oriented . Behind the scene it uses a strong mechanism. Search is based on indexing that we do from either admin section (URL) or from shell (URL). Today i have invested a lot of time to know their internal workflow behind the search story. It was only due to following question

*. How searching works in magento
*. What is the importance of indexing for catalog search
*. How Catalog search works

Before moving forward into internal workflow we must know magento creates the product index into their own database table “catalogsearch_fulltext” As soon as we add/edit or reindex the prduct it autmatically creates index into their database.

fulltext search

Below are the story:
Search any particular term suppose “Swift” from the magento search box. Now magento calls a unique kind of URL like “”

As soon as this url gets called then it creates a database entry for search query into “catalogsearch_query ” table Here it stores query text and create a unique query id from there . This auto incremented query id and their results has been used and shown to admin section into “search term” section

search term

Now whatever result it found based on that particular id is stored under “catalogsearch_result” table

On this table relevence is one more good thing. You can filter your search result based on your relevance as well.

Related posts:

The following two tabs change content below.

Chandra Shekhar

Consultant at Infogain
Chandra Shekhar is a LAMP Developer,Thinker,Blogger and currently working as Magento(Ecommerce) specialist.. I am always open to learn new things in LAMP as well as other newer technology. In the journey of my last 9 years of web and product development, I have decided to share my knowledge and experience to Open Source Community in 2011. In this regard I have started Since then I am actively sharing my knowledge on various LAMP technology through’s technical ... Read More about Chandra Shekhar

Latest posts by Chandra Shekhar (see all)