Will this work?
add_filter('wpfts_index_post', function($index, $post) {
global $wpdb;
// Basic tokens
/*
* This piece of code was commented out intentionally to display things
* which was already done before in the caller code
$index['post_title'] = $post->post_title;
$index['post_content'] = strip_tags($post->post_content);
*/
if ($post->post_type == 'product') {
$prefix = $wpdb->prefix;
//easy way to get all taxonomy even from other modules
$sql = "
SELECT * FROM {$prefix}term_relationships AS tr
LEFT JOIN {$prefix}term_taxonomy AS tt ON ( tt.term_taxonomy_id = tr.term_taxonomy_id )
LEFT JOIN {$prefix}terms AS t ON ( t.term_id = tt.term_id )
WHERE tr.object_id = {$post->ID}
";
$taxonomy = $wpdb->get_results($sql,ARRAY_A);
foreach($taxonomy as $t){
$p[$t['taxonomy']] =$t['name'];
}
$data = array();
$data[] = get_post_meta($post->ID, '_sku', true);
//for parts with diff SKU with diff vendor stored in custom fields
$data[] = get_post_meta($post->ID, 'MPN Number', true);
$data[] = get_post_meta($post->ID, 'MPN2 Number', true);
$index['sku'] = implode(' ', $data);
$index['product_taxonomy'] = implode(' ', $taxonomy);
}
return $index;
}, 3, 2);