filters stop working

  • giannissak
    Participant
    # 1 year, 10 months ago

    Hi
    yesterday wpsolr doesn’t work
    it show a console error
    WPSOLR PRO : an error prevented the search engine query to be executed. To prevent empty results, the default WordPress query is used instead. Please check the error details in your debug.log file. See https://codex.wordpress.org/Debugging_in_WordPress.
    in debug.log i’m getting this:
    WPSOLR Elastisearch query: {“from”:0,”size”:24,”sort”:[{“date”:{“order”:”desc”}}],”_source”:[“id”,”PID”,”type”,”meta_type_s”,”title”,”numcomments”,”comments”,”displaydate”,”displaymodified”,”*categories_str”,”author”,”*post_thumbnail_href_str”,”*post_href_str”,”snippet_s”],”query”:{“bool”:{“must”:{“query_string”:{“query”:”text:(*)”,”default_operator”:”AND”}},”filter”:{“bool”:{“must”:[{“terms”:{“type”:[“product”]}},{“bool”:{“must_not”:[{“terms”:{“post_status_s”:[“draft”,”pending”,”trash”,”future”,”private”,”auto-draft”]}}]}},{“bool”:{“must”:{“term”:{“pa_manufacturer-code_str”:”928403 091″}}}},{“bool”:{“must”:{“term”:{“pa_manufacturer-code_str”:”928403 091″}}}},{“bool”:{“should”:[{“bool”:{“must_not”:[{“exists”:{“field”:”product_visibility_str”}}]}},{“bool”:{“must_not”:[{“terms”:{“product_visibility_str”:[“exclude-from-catalog”]}}]}}]}},{“bool”:{“should”:[{“bool”:{“must_not”:[{“bool”:{“must”:{“exists”:{“field”:”product_stock_str”}}}}]}},{“terms”:{“product_stock_str”:[“y”]}}]}},{“bool”:{“should”:[{“bool”:{“must_not”:[{“bool”:{“must”:{“exists”:{“field”:”is_excluded_s”}}}}]}},{“terms”:{“is_excluded_s”:[“n”]}}]}},{“bool”:{“must_not”:[{“terms”:{“_id”:[“wpsolr_doc_id_attachment”]}}]}}]}}}},”aggs”:{“product_brand_str”:{“filter”:{“match_all”:{}},”aggs”:{“product_brand_str”:{“terms”:{“field”:”product_brand_str”,”size”:100}}}},”flat_hierarchy_product_cat_str”:{“filter”:{“match_all”:{}},”aggs”:{“flat_hierarchy_product_cat_str”:{“terms”:{“field”:”flat_hierarchy_product_cat_str”,”size”:100}}}},”pa_size_str”:{“filter”:{“match_all”:{}},”aggs”:{“pa_size_str”:{“terms”:{“field”:”pa_size_str”,”size”:100,”order”:{“_term”:”asc”}}}}},”pa_color_str”:{“filter”:{“match_all”:{}},”aggs”:{“pa_color_str”:{“terms”:{“field”:”pa_color_str”,”size”:100}}}},”_price_f”:{“filter”:{“match_all”:{}},”aggs”:{“_price_f”:{“range”:{“field”:”_price_f”,”ranges”:[{“to”:”0″},{“from”:0,”to”:50},{“from”:50,”to”:100},{“from”:100,”to”:150},{“from”:”150″}]}}}},”_sale_price_f”:{“filter”:{“match_all”:{}},”aggs”:{“_sale_price_f”:{“range”:{“field”:”_sale_price_f”,”ranges”:[{“to”:”0″},{“from”:0,”to”:50},{“from”:50,”to”:100},{“from”:100,”to”:150},{“from”:”150″}]}}}}}}
    [23-Aug-2020 12:34:40 UTC] WPSOLR message: {“error”:{“root_cause”:[{“type”:”illegal_argument_exception”,”reason”:”Fielddata is disabled on text fields by default. Set fielddata=true on [product_brand_str] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.”}],”type”:”search_phase_execution_exception”,”reason”:”all shards failed”,”phase”:”query”,”grouped”:true,”failed_shards”:[{“shard”:0,”index”:”energy”,”node”:”61nDcD4LQkiieRJ5OuB9jQ”,”reason”:{“type”:”illegal_argument_exception”,”reason”:”Fielddata is disabled on text fields by default. Set fielddata=true on [product_brand_str] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.”}}],”caused_by”:{“type”:”illegal_argument_exception”,”reason”:”Fielddata is disabled on text fields by default. Set fielddata=true on [product_brand_str] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.”,”caused_by”:{“type”:”illegal_argument_exception”,”reason”:”Fielddata is disabled on text fields by default. Set fielddata=true on [product_brand_str] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.”}}},”status”:400}
    [23-Aug-2020 12:34:40 UTC] WPSOLR trace: #0 /public_html/wp-content/plugins/wpsolr-pro/wpsolr/core/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php(317): Elasticsearch\Connections\Connection->process4xxError(Array, Array, Array)

    giannissak
    Participant
    # 1 year, 10 months ago

    if i curl 9200/_all/_mapping?pretty
    i’m getting
    ……
    “product_brand_str” : {
    “type” : “text”,
    “fields” : {
    “keyword” : {
    “type” : “keyword”,
    “ignore_above” : 256
    }
    }
    },
    ……

    wpsolr
    Keymaster
    # 1 year, 10 months ago

    You should get:

    "product_brand_str" : {
      "type" : "keyword"
    }
    giannissak
    Participant
    # 1 year, 10 months ago

    thank you for your fast answer,
    how can i fix that?

    wpsolr
    Keymaster
    # 1 year, 10 months ago

    Try recreating a new index, with a new name, from WPSOLR tab 0.

    giannissak
    Participant
    # 1 year, 10 months ago

    i have to create new WPSOLR index name or new Search engine index name ?

    wpsolr
    Keymaster
    # 1 year, 10 months ago

    Both, just to be sure you are indexing the right index.

    giannissak
    Participant
    # 1 year, 10 months ago

    problem solved,
    thank you

    giannissak
    Participant
    # 1 year, 10 months ago

    Hi,
    i have another problem,
    now wpsolr seems to index properly but when i add new products it does not show them either in the search or in the viev category
    i have double check the product status to be published and to be visible in categories and search results.

    thank you

    wpsolr
    Keymaster
    # 1 year, 10 months ago

    With which WooCommerce version?

    giannissak
    Participant
    # 1 year, 10 months ago

    on 3. (send your data )
    it shows the number of the new products that has not been indexed

    giannissak
    Participant
    # 1 year, 10 months ago

    wordpress 5.5
    woocommerce 4.3.2

    wpsolr
    Keymaster
    # 1 year, 10 months ago
    giannissak
    Participant
    # 1 year, 10 months ago

    Dear patrice, haris from infomen is asking if this update includes the custom code you wrote for us, that excludes stock out variations from showing up in the products category view filters?

    wpsolr
    Keymaster
    # 1 year, 10 months ago

    Indeed, the fix contains the filter on variation stocks.

Viewing 15 posts - 1 through 15 (of 16 total)

You must be logged in to reply to this topic.