Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Can you check the database? See the wp_relevanssi database table and search for doc 6071. How does the SKU appear there?

    Thread Starter engineroom

    (@engineroom)

    The term column is stored as “smu6083-1-1” and “smu6083”.

    Here is a screenshot – https://prnt.sc/pt54pu

    Any ideas ??

    • This reply was modified 5 years, 4 months ago by engineroom.
    Thread Starter engineroom

    (@engineroom)

    There are in 181 entries under the doc 6071. Is this normal?

    • This reply was modified 5 years, 4 months ago by engineroom.
    Plugin Author Mikko Saari

    (@msaari)

    Yes, 181 entries sounds ok. Looks like the “Hyphens and dashes” setting is not working, since the hyphens are not being removed. Do you have anything in your functions.php that affects this? Any old functions added to keep the hyphens intact? Something is overriding the setting and that’s the most common explanation.

    Thread Starter engineroom

    (@engineroom)

    Ah, thank you so much. Sorted it. I had the below functions in place to try and get round the issue:

    
    /**
     * Relavanssi update to ensure dashes are included in the searches 
     */
    
    add_filter('relevanssi_remove_punctuation', 'savedashes_1', 9);
    function savedashes_1($a) {
        $a = str_replace('‐', 'DASH', $a);
        $a = str_replace('-', 'DASH', $a);
        return $a;
    }
     
    add_filter('relevanssi_remove_punctuation', 'savedashes_2', 11);
    function savedashes_2($a) {
        $a = str_replace('DASH', '-', $a);
        return $a;
    }
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Dashes in SKU’ is closed to new replies.