Hi,
There is several solutions to how to decrease index table size.
First of all – you can remove from index page all search sources that you don’t use for search.
Please use following code snippet for this
add_filter('aws_indexed_data', 'my_aws_indexed_data');
function my_aws_indexed_data( $data ) {
foreach ( $data['terms'] as $source => $all_terms ) {
if ( strpos( $source, 'meta_' ) === 0 || strpos( $source, 'tax_' ) === 0 || strpos( $source, 'attr_' ) === 0 ) {
unset( $data['terms'][$source] );
}
}
return $data;
}
This code remove custom fields, taxonomies and attributes of products from the index table. If you need to sources to remove or want to leave some of them – please write me.
Second – Do you need to display product variations inside search results? If no than make sure that plugin option ‘Variable products’ set to? ‘Show only parent products’.?
Also please add following code snippet like and in previous example.
add_filter('aws_indexed_data', 'my_aws_indexed_data2');
function my_aws_indexed_data2( $data ) {
if ( $data['type'] === 'child' ) {
return false;
}
return $data;
}
You need to add this snippets somewhere outside plugins folder. For example, inside functions.php file of your theme or use some plugin for adding code snippets.
Also, after adding them, you need to re-index plugin table.
Regards