Javascript not working

wp_ajax_{my-action} action hook is only for admin side. For frontend you must use wp_ajax_nopriv_{my-action}. You can combina both if the ajax action is for both sides. For example:

add_action('wp_ajax_filter_search', 'filter_search_result');
add_action('wp_ajax_nopriv_filter_search', 'filter_search_result');

Also, don’t forget, never, to die or exit at the end of the ajax action because the program is not closed by WordPress on ajax requests, at least you use wp_send_json family of functions.

add_action('wp_ajax_filter_search', 'filter_search_result');
add_action('wp_ajax_nopriv_filter_search', 'filter_search_result');
function filter_search_result(){
    echo 'hello world';
    exit;
}