Are you using WooCommerce? If you are, add this to your theme functions.php:
add_filter( 'relevanssi_woocommerce_indexing', function( $blocks ) {
$blocks['outofstock'] = true;
return $blocks;
} );
This will make Relevanssi exclude out-of-stock products from the index.
Hello, thanks for reply,
Indeed, when I build the index again, fewer products appear, but.
This may depend on the theme, I’m using woodmart and the ajax search still shows out-of-stock products, example: PGF95K
https://usaelectrodomesticos.com.co/
If I search for this sku, the product appears.
Should I do some more?
Thanks for reply
That Ajax search is not using Relevanssi. It’s the Woodmart Ajax Search. Apparently Woodmart has a setting “Use Relevanssi for AJAX search” – is that setting enabled?
Yes that’s how it is.
both the search by sku and by name have this problem in that search ajax header
Well, it does look like it’s not using Relevanssi, even though the setting would claim it is. I recommend you ask Woodmart support about this.