Title: Manually sync items
Last modified: January 31, 2025

---

# Manually sync items

 *  Resolved [ianatkins](https://wordpress.org/support/users/ianatkins/)
 * (@ianatkins)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/manually-sync-items/)
 * 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.

The topic ‘Manually sync items’ is closed to new replies.

 * ![](https://ps.w.org/wp-search-with-algolia/assets/icon-256x256.png?rev=2894668)
 * [WP Search with Algolia](https://wordpress.org/plugins/wp-search-with-algolia/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-search-with-algolia/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-search-with-algolia/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-search-with-algolia/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-search-with-algolia/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-search-with-algolia/reviews/)

 * 18 replies
 * 2 participants
 * Last reply from: [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * Last activity: [1 year, 1 month ago](https://wordpress.org/support/topic/manually-sync-items/page/2/#post-18436634)
 * Status: resolved