Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter iwasa

    (@iwasa)

    Thank you very much for your prompt response and for providing clear instructions on resolving the issue. Your guidance has been extremely helpful.

    I truly appreciate your swift replies, as they have greatly assisted me in addressing this matter efficiently. I will proceed with implementing the suggested changes and monitor the results.

    Once again, thank you for your valuable support. I sincerely appreciate your time and effort.

    Thread Starter iwasa

    (@iwasa)

    @msaari

    Dear Mikko Saari

    Thank you very much for your prompt response and for providing valuable insights regarding the issue. I sincerely appreciate your support.

    Upon reviewing our functions.php file, I found the following code:

    // Sorting search results for the Relevanssi plugin
    add_filter('relevanssi_orderby', custom_relevanssi_orderby);
    function custom_relevanssi_orderby() {
        return 'relevance';
    }
    
    // Matching inside words for the Relevanssi plugin
    add_filter( 'relevanssi_fuzzy_query', 'rlv_match_inside_words' );
    function rlv_match_inside_words( $query ) {
        return "(relevanssi.term LIKE '%#term#%') ";
    }
    

    In order to implement the solution you kindly suggested, would it be appropriate to add the following code?

    add_filter( 'relevanssi_orderby', function ( $orderby ) {
        return array( 'relevance' => 'desc' );
    } );
    

    I would be grateful for your confirmation on whether this adjustment is correct. Please let me know if there are any additional modifications or considerations I should be aware of.

    Once again, I truly appreciate your assistance and look forward to your response.

Viewing 2 replies - 1 through 2 (of 2 total)