Indexing error: multiple values on _stock_status_s

  • leomoon
    Participant
    # 3 months ago

    For some reason, the _stock_status_s field, which I index as text, sortable in order to be able to put in-stock books first sometimes gets sent for indexing as having multiple values. I could not find a pattern, but here is a fragment of the debug info:

    https://1drv.ms/t/s!Ah6mDhPS2VbWiKpkHIKUeVYFTYewlQ

    Both of these have status out of stock, but the first one, has [outofstock, outofstock] and the second one has just [outofstock].
    I checked the database, I checked product->data contents for this failing SKU (59747), but nowhere is stock_status anything but a single string ‘outofstock’. I am not sure why it gets multiplied before it gets sent for indexing?

    wpsolr
    Keymaster
    # 3 months ago

    The status could be a product taxonomy, and also a custom field?

    leomoon
    Participant
    # 3 months ago

    Status is definitely not a taxonomy – only a custom field. It is not listed under taxonomy choices. And for some reason this multiplication of stock_status field value does not happen on all products. I am able to index some 4000 without any problem before it runs into this issue.

    wpsolr
    Keymaster
    # 3 months ago

    Can I see your screen 2.2?

    leomoon
    Participant
    wpsolr
    Keymaster
    # 3 months ago

    Thanks. Indeed, status is only a product custom field.

    Can you send me the result of a query on the post_meta table for the product with an error?

    leomoon
    Participant
    # 3 months ago

    You are right, exactly 25 out of 63000+ products had duplicated stock_status meta. I have no idea how this came to be, but after doing manual cleanup, all is good now. Thanks!

    wpsolr
    Keymaster
    # 3 months ago

    Great.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.