• ianatkins

    (@ianatkins)


    Hello.

    We have some custom code that assigns taxonomies to an attachment. After assigning the taxonomy we want to update the Algolia index.

    At the moment we manually trigger do_action( 'attachment_updated') which then get’s picked up by the ‘sync_item’ function.

    This isn’t very efficient, as we then see multiple individual batch API requests in Algolia, updating a single record at a time.

    Is there anyway we can update multiple records at once, similar to how things run when triggering a manual re-index?

    Saw there is the sync_term_posts function, could we use that, and is so would we need to instantiate a class to use it?

    Thanks

    Ian.

  • You must be logged in to reply to this topic.