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

    (@msaari)

    I tried reproducing the problem on my test site, but when I enter “0816” into a custom field, it is indexed as “0816” and can be found both with “0816” and “816” like it should when partial matching is enabled.

    If you check the product with the Relevanssi debugger (Settings > Relevanssi > Debugging), is the SKU indexed correctly with the leading zero or not?

    Thread Starter woodja

    (@woodja)

    Settings > Relevanssi > Debugging for a product with SKU 0873

    Show’s the field being indexed:

    Custom fields
    873

    Not 0873 as it should.

    Also 0873 is missing in the database and doesn’t show up in the search results.
    https://www.morethanbaking.com/?s=0873 – nothing
    https://www.morethanbaking.com/?s=873 – the product
    https://www.morethanbaking.com/product/3-5-corset/

    Others like https://www.morethanbaking.com/?s=0774 work fine.

    So I’m kind of at a loss as to why some leading zero SKUs get indexed properly, but others do not.

    Plugin Author Mikko Saari

    (@msaari)

    Something is modifying the indexed content. If the SKU “0873” is indexed as “873”, then yeah, Relevanssi can’t find it with “0873”. Relevanssi doesn’t automatically remove the leading zero. You need to figure out what is it that removes the zero. Are there any filter functions in your theme functions.php that might do it?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Values with leading zeros not indexed correctly (WooCommerce SKU)’ is closed to new replies.