I'm working on adding an additional column to a grid in an existing backend extension. I need to add an indexer to to this extension indexing the health (the amount of sells) of (roughly) the last 3 months. (90 days.) I'm splitting the health per month. (So, a field each for 1-30, 31-60 and 61-90 days ago.)
Having basically zero knowledge of Magento indexers I decided to create a simple featureless extension (a functioning adminhtml page and nothing more) and attempt to implement an indexer on that to learn how indexing works.
I've already looked at a few guides trying to figure out how to do this but none of them have fully functioning examples.
- Mexbs: Creating custom Magento Index https://archive.is/rE0oz
- AionHill: How to implement extremely fast custom indexing in Magento? https://archive.is/LMiF6
- Magento Stack Exchange: Custom Indexer, Magento way ? Custom Indexer, Magento way ?
- Stack Overflow: Magento - Add index to table column using upgrade script https://stackoverflow.com/questions/27009691/magento-add-index-to-table-column-using-upgrade-script
They include code needed to create an indexer without detailing how to implement it.
How would I create an indexer, implement it and use it for this kind of data? What type of index do I need to index this information?
I'm looking for an explanation of Magento indexes and a full implementation. Being able to get an index up and running with this kind of data in either extension works for me.