Hi,
You can try to add following code snippet:
add_filter( 'aws_indexed_data', 'my_aws_indexed_data', 10, 2 );
function my_aws_indexed_data( $data, $id ) {
$data['terms']['full_title'][get_the_title( $id )] = 1;
return $data;
}
add_filter( 'aws_search_query_array', 'my_aws_search_query_array' );
function my_aws_search_query_array( $query ) {
$relevance = '';
$term = esc_attr( $_REQUEST['keyword'] );
$term = htmlspecialchars_decode( $term );
$term = AWS_Helpers::normalize_string( $term );
if ( $term ) {
$relevance .= "( case when ( term_source = 'full_title' AND term LIKE '%{$term}%' ) then 800 else 0 end ) + ";
$query['relevance'] = preg_replace( '/\(SUM\([\s\S]*?\([\s\S]*?case[\s\S]*?end[\s\S]*?\)[\s\S]*?\+/i', '$0' . $relevance, $query['relevance'] );
}
return $query;
}
You need to add it somewhere outside the plugins folder. For example, inside functions.php file of your theme or use some plugin for adding code snippets.
Also, after adding this code, you need to re-index the plugin table.
Regards