Record too big error when indexing minimal data in WordPress

I’ve set up the Algolia WordPress API to index multiple content types per these instructions and have multiple post_to_record functions in my functions.php file named after each post type. I can successfully index most of my post types, but for one in particular, I keep getting a Record is too big error. This post type does indeed have some large posts, and I understand they’re beyond the limit of what Algolia will index for a single record, but what doesn’t make sense is I’ve edited that post type’s _to_record function to only return the object ID and title. If each record is only an object ID and title, how can it possibly be too big? Is the post’s content somehow still being passed to Algolia?

Hi @doug, If you are sending just the Object ID and title you should not be reaching the limit unless those are over your record size limit (10k for Community, Starter or Pro plans, higher limits for Enterprise plans). It sounds as if it’s sending more than just those two items. Usually, with WordPress, this means the content is also being sent. Can you troubleshoot to see exactly what is being sent in the request?

If you don’t have any luck troubleshooting, would it be ok to provide a code snippet so that we can help you troubleshoot?

As I was copying the code to paste here, the problem dawned on me. The CLI calls apply_filters($type . '_to_record', $post) but I had named every single filter post_to_record. Though I have no post_to_record filter, so I’m not sure why my other post types indexed without error. Either way, I have it working now. Thanks for your help!