Product not showing

I have a Magento with Algolia search installed. I’m facing an issue with some products, they don’t appear in search, even when I type the exactly same name looking for them. I also took a look at the indices in Algolia’s admin and they don’t appear there neither.

I’ve checked the visibility and is good (catalog, search). The products are enabled because I can see them in categories, add them to the cart, etc.

How can I determine why those products are not being indexed?

Thanks in advance!

Hello @icastellucci,

are you able to dig into a code and see why this product is not being indexed?
The decision if the product should be indexed is done here:

You can investigate there and see what happens and why the product is not indexed.

Let me know how it goes.

Hello @jan.petr,

I debugged the code, and everything is fine with those products regarding the code’s validations. I realized the problem is that I get this as response when I sent the products to Algolia:

Algolia reindexing : You have some records (myindex_tmp objectID(114)) that are too big. They have either been truncated or skipped.

How can I reindex big records?

Thanks in advance!

Hello @icastellucci,

it’s Algolia limit - Algolia has a 10kb limit per record and you cannot index bigger records.
The solution would be not to index large attributes like description etc…

Do you know why this particular record is that big? Which attribute is that huge?

Hello @jan.petr,

I’ve tried different possibilities like removing description, meta keywords, and even price (because it’s a configurable product) but I still get the same error. I tested removing the 3 fields at the same time also. The other fields are empty or small I think. I don’t understand why it’s still rejected.

Any ideas?

Thanks for the help on this!

Hello @icastellucci,

can you dive into a code? The code which handles too big records is here:

There you can investigate and see which attribute is too big so it prevents the record from indexing.

Let me know if you manage to find it.

Hello @jan.petr,

Thanks for the help! I managed to debug it and find out a custom attribute was huge. However that attribute was empty for the product. But debugging more I realized for configurable products the custom attributes use the children data. So I’ve made a rewrite for the method you sent me adding also the custom attribute that was too big.

Now the products are indexed well.


1 Like

That’s great to hear! I’m happy you made it work.

Happy searching!