1

What is the use of indexer.xml ? I mean what it does? Please help.

1

In magento indexer.xml file is used to declare custom index under etc directory. It define id as well as class of indexer that contain business logic. like below:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../Indexer/etc/indexer.xsd">             
    <indexer id="sagar_popular" view_id="sagar_popular_order" 
    class="Vendor\sagar\Model\Indexer\Popular">
   <title translate="true">Popular Products</title>
   <description translate="true">Sort products in a category by 
  popularity</description>
   </indexer>
</config>
  • Thank you for your reply.But I cannot understand-- Why custom index is required? – Magento Learner Sep 12 '18 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.