updating to wordpress 6.2.1 and woocommerce 7.7.0 one filter stopped working

  • wpsolr
    Keymaster
    11 months ago #33601

    The WPSOLR query is missing.

    2for5whoppers
    Participant
    11 months ago #33638

    maybe i was looking in the wrong place. I went through the wp_terms_query’s and found on that referenced facets.

    View post on imgur.com

    wpsolr
    Keymaster
    11 months ago #33639

    You should see a “WPSOLR queries” menu in Query monitor, showing your search engine queries.

    If not, please check Query Monitor add-on

    2for5whoppers
    Participant
    11 months ago #33640

    Sorry about that. Here is the only query that I see in WPSOLR queries.

    [ { "query": "*", "offset": 0, "length": 28, "sortFacetValuesBy": "alpha", "attributesToRetrieve": [ "id", "PID", "type", "meta_type_s", "title", "numcomments", "comments", "displaydate", "displaymodified", "*categories_str", "author", "*post_thumbnail_href_str", "*post_href_str", "snippet_s" ], "filters": "(type:\"post\" OR type:\"product\") AND (NOT post_status_s:\"draft\" AND NOT post_status_s:\"pending\" AND NOT post_status_s:\"trash\" AND NOT post_status_s:\"future\" AND NOT post_status_s:\"private\" AND NOT post_status_s:\"auto-draft\") AND (non_flat_hierarchy_product_cat_str:\"Food\" AND non_flat_hierarchy_product_cat_str:\"Breakfast Foods\") AND ((NOT type:\"product\") OR (NOT product_visibility_str:\"exclude-from-catalog\")) AND ((NOT exist_is_excluded_s_str:y) OR (is_excluded_s:\"n\"))AND ((non_flat_hierarchy_product_cat_str:\"Breakfast Foods\"))", "facets": [ "_stock_status_s", "flat_hierarchy_product_cat_str", "flat_hierarchy_yith_product_brand_str", "flat_hierarchy_diet_str", "pa_pack-size_str", "type", "post_status_s", "non_flat_hierarchy_product_cat_str", "product_visibility_str", "is_excluded_s" ], "indexName": "gb_testindex_replica_sort__stock_status_s_asc" } ]

    2for5whoppers
    Participant
    11 months ago #33641

    this is one product result from the query:
    { "id": 99520, "PID": 99520, "type": "product", "meta_type_s": "post_type", "displaymodified": "2023-05-18T21:25:10Z", "title": "Purely Elizabeth Maple Almond Butter Nut Granola , 10 Oz", "author": "admin", "displaydate": "2021-07-31T08:40:35Z", "comments": [], "numcomments": 0, "objectID": "99520", "_highlightResult": { "id": { "value": "99520", "matchLevel": "none", "matchedWords": [] }, "PID": { "value": "99520", "matchLevel": "none", "matchedWords": [] }, "type": { "value": "product", "matchLevel": "none", "matchedWords": [] }, "meta_type_s": { "value": "post_type", "matchLevel": "none", "matchedWords": [] }, "displaymodified": { "value": "2023-05-18T21:25:10Z", "matchLevel": "none", "matchedWords": [] }, "title": { "value": "Purely Elizabeth Maple Almond Butter Nut Granola , 10 Oz", "matchLevel": "none", "matchedWords": [] }, "title_s": { "value": "Purely Elizabeth Maple Almond Butter Nut Granola , 10 Oz", "matchLevel": "none", "matchedWords": [] }, "permalink": { "value": "https:\/\/staging-grocerybundlesa.kinsta.cloud\/product\/99520\/purely-elizabeth-maple-almond-butter-nut-granola\/", "matchLevel": "none", "matchedWords": [] }, "product_stock_str": { "value": "y", "matchLevel": "none", "matchedWords": [] }, "post_status_s": { "value": "publish", "matchLevel": "none", "matchedWords": [] }, "content": { "value": "Rich, creamy almond butter + maple combine with ancient grains and superfood seeds for irresistible, salty-sweet granola clusters. Your morning energy, nutrients and an instant mood boostall in one.", "matchLevel": "none", "matchedWords": [] }, "post_author_s": { "value": "2", "matchLevel": "none", "matchedWords": [] }, "author": { "value": "admin", "matchLevel": "none", "matchedWords": [] }, "menu_order_i": { "value": "28474", "matchLevel": "none", "matchedWords": [] }, "PID_i": { "value": "99520", "matchLevel": "none", "matchedWords": [] }, "author_s": { "value": "https:\/\/staging-grocerybundlesa.kinsta.cloud\/author\/admin\/", "matchLevel": "none", "matchedWords": [] }, "displaydate": { "value": "2021-07-31T08:40:35Z", "matchLevel": "none", "matchedWords": [] }, "displaydate_dt": { "value": "2021-07-31T08:40:35Z", "matchLevel": "none", "matchedWords": [] }, "date": { "value": "2021-07-31T08:40:35Z", "matchLevel": "none", "matchedWords": [] }, "displaymodified_dt": { "value": "2023-05-18T21:25:10Z", "matchLevel": "none", "matchedWords": [] }, "modified": { "value": "2023-05-18T21:25:10Z", "matchLevel": "none", "matchedWords": [] }, "numcomments": { "value": "0", "matchLevel": "none", "matchedWords": [] }, "categories": [ { "value": "Almond Granola", "matchLevel": "none", "matchedWords": [] }, { "value": "10 OZ", "matchLevel": "none", "matchedWords": [] }, { "value": "10 OZ", "matchLevel": "none", "matchedWords": [] }, { "value": "Purely Elizabeth", "matchLevel": "none", "matchedWords": [] }, { "value": "y", "matchLevel": "none", "matchedWords": [] }, { "value": "11.41", "matchLevel": "none", "matchedWords": [] }, { "value": "instock", "matchLevel": "none", "matchedWords": [] } ] } }

    wpsolr
    Keymaster
    11 months ago #33643

    Did you upgrade to WPSOLR 23.1?

    2for5whoppers
    Participant
    10 months, 3 weeks ago #34252

    [ { "query": "*", "offset": 0, "length": 28, "sortFacetValuesBy": "alpha", "attributesToRetrieve": [ "id", "PID", "type", "meta_type_s", "title", "numcomments", "comments", "displaydate", "displaymodified", "*categories_str", "author", "*post_thumbnail_href_str", "*post_href_str", "snippet_s" ], "filters": "(type:\"post\" OR type:\"product\") AND (NOT post_status_s:\"draft\" AND NOT post_status_s:\"pending\" AND NOT post_status_s:\"trash\" AND NOT post_status_s:\"future\" AND NOT post_status_s:\"private\" AND NOT post_status_s:\"auto-draft\") AND (non_flat_hierarchy_product_cat_str:\"Food\" AND non_flat_hierarchy_product_cat_str:\"Snacks\") AND ((NOT exist_is_excluded_s_str:y) OR (is_excluded_s:\"n\")) AND ((NOT type:\"product\") OR (NOT product_visibility_str:\"exclude-from-catalog\"))AND ((non_flat_hierarchy_product_cat_str:\"Snacks\"))", "facets": [ "_stock_status_s", "flat_hierarchy_product_cat_str", "flat_hierarchy_yith_product_brand_str", "flat_hierarchy_diet_str", "pa_pack-size_str", "type", "post_status_s", "non_flat_hierarchy_product_cat_str", "is_excluded_s", "product_visibility_str" ], "indexName": "gb_testindex_replica_sort__stock_status_s_asc" } ]

    I had sent a query from an older staging site by accident. Here is a query from version 23.1. When I try to use a facet, I am returned “No products found matching your selection”. I am guessing that I am need to re-index all my data. Can you point me to a reference to do this? It looks like I am supposed to delete the index and re-create it, but I am just checking to make sure this is correct.

    2for5whoppers
    Participant
    10 months, 3 weeks ago #34253

    oh I am using algolia for the search index. one last thing i was wondering … Does deleting the index from the wpsolr admin also delete the algolia index or just remove the data?

    wpsolr
    Keymaster
    10 months, 3 weeks ago #34255

    Indeed, if you migrated to WPSOLR 23.1, you are required to reindex all your data due to a structural change in category filters.

    2for5whoppers
    Participant
    10 months, 3 weeks ago #34336

    I am still not able to get my category filters to work. I deleted the old index, create a new one, and indexed my data. Everything else seems to be working as expected.

    the wpsolr query:
    [ { "query": "*", "offset": 0, "length": 28, "sortFacetValuesBy": "alpha", "attributesToRetrieve": [ "id", "PID", "type", "meta_type_s", "title", "numcomments", "comments", "displaydate", "displaymodified", "*categories_str", "author", "*post_thumbnail_href_str", "*post_href_str", "snippet_s" ], "filters": "(type:\"post\" OR type:\"product\") AND (NOT post_status_s:\"draft\" AND NOT post_status_s:\"pending\" AND NOT post_status_s:\"trash\" AND NOT post_status_s:\"future\" AND NOT post_status_s:\"private\" AND NOT post_status_s:\"auto-draft\") AND (_stock_status_s:\"instock\") AND (flat_hierarchy_product_cat_str:\"Baking Ingredients->Baking Chocolate\") AND (non_flat_hierarchy_product_cat_str:\"Food\" AND non_flat_hierarchy_product_cat_str:\"Cooking Essentials\") AND ((NOT exist_is_excluded_s_str:y) OR (is_excluded_s:\"n\")) AND ((NOT type:\"product\") OR (NOT product_visibility_str:\"exclude-from-catalog\"))AND ((non_flat_hierarchy_product_cat_str:\"Cooking Essentials\"))", "facets": [ "_stock_status_s", "flat_hierarchy_product_cat_str", "flat_hierarchy_yith_product_brand_str", "flat_hierarchy_diet_str", "pa_pack-size_str", "type", "post_status_s", "non_flat_hierarchy_product_cat_str", "is_excluded_s", "product_visibility_str" ], "indexName": "gb_production_replica_sort__stock_status_s_asc" } ]

    the reponse:
    [ { "hits": [], "nbHits": 0, "offset": 0, "length": 28, "facets": [], "exhaustiveFacetsCount": true, "exhaustiveNbHits": true, "exhaustiveTypo": true, "exhaustive": { "facetsCount": true, "nbHits": true, "typo": true }, "query": "*", "params": "query=*&offset=0&length=28&sortFacetValuesBy=alpha&attributesToRetrieve=%5B%22id%22%2C%22PID%22%2C%22type%22%2C%22meta_type_s%22%2C%22title%22%2C%22numcomments%22%2C%22comments%22%2C%22displaydate%22%2C%22displaymodified%22%2C%22*categories_str%22%2C%22author%22%2C%22*post_thumbnail_href_str%22%2C%22*post_href_str%22%2C%22snippet_s%22%5D&filters=%28type%3A%22post%22+OR+type%3A%22product%22%29+AND+%28NOT+post_status_s%3A%22draft%22+AND+NOT+post_status_s%3A%22pending%22+AND+NOT+post_status_s%3A%22trash%22+AND+NOT+post_status_s%3A%22future%22+AND+NOT+post_status_s%3A%22private%22+AND+NOT+post_status_s%3A%22auto-draft%22%29+AND+%28_stock_status_s%3A%22instock%22%29+AND+%28flat_hierarchy_product_cat_str%3A%22Baking+Ingredients-%3EBaking+Chocolate%22%29+AND+%28non_flat_hierarchy_product_cat_str%3A%22Food%22+AND+non_flat_hierarchy_product_cat_str%3A%22Cooking+Essentials%22%29+AND+%28%28NOT+exist_is_excluded_s_str%3Ay%29+OR+%28is_excluded_s%3A%22n%22%29%29+AND+%28%28NOT+type%3A%22product%22%29+OR+%28NOT+product_visibility_str%3A%22exclude-from-catalog%22%29%29AND+%28%28non_flat_hierarchy_product_cat_str%3A%22Cooking+Essentials%22%29%29&facets=%5B%22_stock_status_s%22%2C%22flat_hierarchy_product_cat_str%22%2C%22flat_hierarchy_yith_product_brand_str%22%2C%22flat_hierarchy_diet_str%22%2C%22pa_pack-size_str%22%2C%22type%22%2C%22post_status_s%22%2C%22non_flat_hierarchy_product_cat_str%22%2C%22is_excluded_s%22%2C%22product_visibility_str%22%5D&", "index": "gb_production_replica_sort__stock_status_s_asc", "renderingContent": [], "processingTimeMS": 1, "processingTimingsMS": { "request": { "roundTrip": 18 } } } ]

    2for5whoppers
    Participant
    10 months, 3 weeks ago #34350

    the only thing that doesn’t look right to me is this: (flat_hierarchy_product_cat_str:\"Baking Ingredients->Baking Chocolate\")

    in the index I see this array for the flat_hierarchy_product_cat_str:
    [
    “Food”
    “Food->Cooking Essentials”
    “Food->Cooking Essentials->Baking Ingredients”
    “Food->Cooking Essentials->Baking Ingredients->Baking Chocolate”
    ]

    wpsolr
    Keymaster
    10 months, 3 weeks ago #34351

    “Food->Cooking Essentials->Baking Ingredients->Baking Chocolate” should be the filter indeed.

    Does the the url contain the whole hierarchy filter?

    Are the 4 levels checked on the UI?

    2for5whoppers
    Participant
    10 months, 3 weeks ago #34352

    Here is the end of the url:

    /category/food/cooking-essentials/?wpsolr_fq%5B0%5D=product_cat_str%3ABaking%20Ingredients->Baking%20Chocolate

    wpsolr
    Keymaster
    10 months, 3 weeks ago #34353

    Thanks, I will check category filters on category archives.

    wpsolr
    Keymaster
    10 months, 2 weeks ago #34458

    Here is a pre-release containing a fix for facet categories on archive categories:
    https://www.dropbox.com/s/ikijo4gs48y1khe/wpsolr-pro-fix-archive-category-category-facet.zip?dl=1

    Please remove your current WPSOLR, and install this pre-release instead. It will be part of WPSOLR 23.2

Viewing 15 posts - 16 through 30 (of 31 total)

You must be logged in to reply to this topic.