matutest
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Search with Algolia] Products removed from indexit does retain but if it eventually vanishes from the index it doesnt get added back until we manually re update it individually. it doesnt get added with a full reindex.
Forum: Plugins
In reply to: [WP Search with Algolia] Products removed from indexTheres isn’t much in de logs the only thing I could see in the algolia API logs is that it gets more product deletes than product updates. And I’ve noticed that when updating a product on woocommerce we get a bunch of product deletes and product updates per product. Im not sure why its sending so many it might be some sort of race condition. But yes the bulk re-indexing is not really working in getting the other products back , in fact whenever we run it we typically loose an extra product or to.
Forum: Plugins
In reply to: [WP Search with Algolia] Products removed from indexI dont think we have, were would we do that? in the algolia dashboard or within wordpress?
We also have the issue that this week we updated a bunch of product images in bulk and lost about 3k products from the index, and now if we do a full reindex from the button in the plugin it wont get them back it will only reindex what we currently have in algolia. So we are a bit stuck with the plugin, looking for new alternativesForum: Plugins
In reply to: [WP Search with Algolia] Products removed from indexHello @tw2113 ! we didn’t really, we are still struggling with this. I find in the algolia logs the plugin runs very frequently and products get removed from the index. It seems it sends an delete an update and then a delete again for some products. But we haven’t been able to pin point the cause.
Forum: Plugins
In reply to: [WP Search with Algolia] Products removed from indexWe shouldn’t but I will check but for some reason it keeps sending more deletes than updates and even if we try to do a full re-index with the button on the search page it wont reindex all of them, it does less and less everytime for some reason.
Forum: Plugins
In reply to: [WP Search with Algolia] Products removed from indexHello @tw2113 ! We are having an issue today were the plugin is batching (we havent manually clicked re-indexed or edited any products.) But it seems through the algolia api logs that the plugin keeps updating and deleting products and we have lost like a 100 products from the index since this morning and it keeps going. Have you heard of anyone dealing with something like this? we are not really sure how to make sure it stops de-indexing products.
Thank you!Forum: Plugins
In reply to: [WP Search with Algolia] Products removed from indexThank you michael this is really helpful, I would add that snippet to the functions.php correct? also this is what we currently have as our config in case you can spot any issues.
// Sync Woocommerce data
function algolia_wc_post_shared_attributes( array $shared_attributes, WP_Post $post) {
$product = wc_get_product( $post );
if ( $product->is_downloadable() ) {
// Loop through WC_Product_Download objects
foreach( $product->get_downloads() as $key_download_id => $download ) {
## Using WC_Product_Download methods (since WooCommerce 3)
$download_name = $download->get_name(); // File label name
$download_link = $download->get_file(); // File Url
$download_id = $download->get_id(); // File Id (same as $key_download_id)
$download_type = $download->get_file_type(); // File type
$download_ext = $download->get_file_extension(); // File extension
}
}
$args = array ('post_type' => 'product');
$comments = get_comments( $args );
// Extract prices.
$variations_count = 0;
if ( $product instanceof WC_Product_Variable ) {
$price = $product->get_variation_price( 'min', true );
$regular_price = $product->get_variation_regular_price( 'min', true );
$sale_price = $product->get_variation_sale_price( 'min', true );
$max_price = $product->get_variation_price( 'max', true );
$variations_count = count( $product->get_available_variations() );
} else {
$price = $max_price = $product->get_display_price();
$regular_price = $product->get_display_price( $product->get_regular_price() );
$sale_price = $product->get_display_price( $product->get_sale_price() );
}
$shared_attributes['product_type'] = (string) $product->get_type();
$shared_attributes['price'] = (float) $price;
$shared_attributes['regular_price'] = (float) $regular_price;
$shared_attributes['sale_price'] = (float) $sale_price;
$shared_attributes['rating'] = (float) $product->get_average_rating();
$shared_attributes['units_sold'] = (integer) $product->get_total_sales();
$shared_attributes['download_name'] = (string) $download_name;
$shared_attributes['download_link'] = (string) $download_link;
$shared_attributes['rating_count'] = (integer) $product->get_rating_count();
return $shared_attributes;
}
add_filter( 'algolia_post_product_shared_attributes', 'algolia_wc_post_shared_attributes', 10, 2 );
// Sync ACF with algolia
function wds_algolia_custom_fields( array $attributes, WP_Post $post ) {
// Eligible post meta fields.
$fields = [
'short_title',
];
// Loop over each field...
foreach ( $fields as $field ) {
// Standard WordPress Post Meta.
$data = get_post_meta( $post->ID, $field );
// Advanced Custom Fields.
// @see https://www.advancedcustomfields.com/resources/get_field/
$data = get_field( $field, $post->ID );
// Only index when a field has content.
if ( ! empty( $data ) ) {
$attributes[ $field ] = $data;
}
}
return $attributes;
}
add_filter( 'algolia_post_shared_attributes', 'wds_algolia_custom_fields', 10, 2 );
add_filter( 'algolia_searchable_post_shared_attributes', 'wds_algolia_custom_fields', 10, 2 );Forum: Plugins
In reply to: [WP Search with Algolia] Products removed from indexIts about 27k products. Do you think its more of an algolia issue than the plugin? the only thing im curious about is if its happening when updating products and if there is a rate of products we should update at a time to prevent it
Forum: Plugins
In reply to: [WP Search with Algolia] Products removed from indexsorry sent the previous message before you response loaded. but yes it seems like they do get updated on WC that hasnt failed but they get removed from algolia after updating them or at random times.
we do have all the products in the airtable and when we trigger the workflow for the ones that have disappeared they do get added back so I dont think the issue is related to the workflow itself- This reply was modified 12 months ago by matutest.
Forum: Plugins
In reply to: [WP Search with Algolia] Products removed from indexI got this new information from the person in our team that handles product updating, im sharing in case it brings more context “I typically upload once a week and it’s like 200ish products lately. I make sure and go slow with about 5 seconds between each product click. This vanishing product issue has been happening before the N8N workflow though, way back when we used the WP all import plugin the same thing also happened.” They have said the products sometimes disappear from the index days after they get edited, one of them they reported yesterday that its no longer indexed and they havent updated it in a month
Forum: Plugins
In reply to: [WP Search with Algolia] Products removed from indexWe are kind of bulk updating. We have an n8n workflow that goes from airtable to woocommerce. we edit products on airtable and they get updated on woocommerce through the workflow. We update each product manually so its not an automatic bulk but we do very quickly go through a bunch of like 20-30 products within the half hour sometimes. they do all get successfully edited on woocommerce but im assuming some of them get removed from algolia and not updated back. Does the plugin have some sort of bulk limit or rate limit?