Full reindex not using flat

Magento Enterprise 1.14.2.3
Algolia Search 1.9.0

When using “Algolia Search Products” index, the table ‘algoliasearch_queue’ is filled with “rebuildProductIndex” method, with page_size of 300.
There are (on our site) 5 pages for each store (two stores atm).

In the table, the “data” column is:
{“store_id”:“4”,“product_ids”:,“page_size”:“300”,“page”:1,“use_tmp_index”:true}
{“store_id”:“4”,“product_ids”:,“page_size”:“300”,“page”:2,“use_tmp_index”:true}
… etc
{“store_id”:“3”,“product_ids”:,“page_size”:“300”,“page”:1,“use_tmp_index”:true}
{“store_id”:“3”,“product_ids”:,“page_size”:“300”,“page”:2,“use_tmp_index”:true}
… etc

When running the “Queue” index, all rows are processed successfully, but in algolia the name attribute is “null”, because with this method is not using flat tables.

When saving single product, the “data” column is:
{“store_id”:“4”,“product_ids”:[“47146”]}
{“store_id”:“3”,“product_ids”:[“47146”]}

and when running the queue, the product is indexed correctly on algolia, with all attributes set, even the name.
What’s wrong with “reindex all”? Why not using the flat table?

Hello @kender,

I’m very sorry for the late answer.

The issue you experience is very weird as both single product reindex and full reindex use the same mechanism.
The products are fetched via Magento’s product collection so no DB tables are queried directly. All attributes which should be indexed are added to the collection so therefore it should be fetched.

The final record which is indexed is created here. Could you investigate there directly in the code to see why name attribute is not fetched?

I tried and I cannot replicate the issue at all.

Thanks!