Different options to sort

  • O-O
    Participant
    # 1 year, 10 months ago

    Follow up from this topic

    Add more sorts

    This seemed to place our custom option in the sort, Thanks.
    But when I change the sort function to my custom dimension on my website all the products disappear. When I want to then go back to sort on most relevant it does not work. It seems like it crashes when I use my custom field.
    How can we fix this?

    wpsolr
    Keymaster
    # 1 year, 10 months ago

    Did you follow these steps?

    a) Select the custom field in screen 2.2, with a type of “Integer’ or “Real”
    b) Reindex all the data
    c) Configure the custom field as a sort in screen 2.5

    O-O
    Participant
    # 1 year, 10 months ago

    Did we have to delete and then reindex again after step 1?

    wpsolr
    Keymaster
    # 1 year, 10 months ago

    Yes, or reindex with the option “reindex from start”.

    O-O
    Participant
    # 1 year, 10 months ago

    Follow the steps, but it still seems to crash, and shows no products.

    wpsolr
    Keymaster
    # 1 year, 10 months ago

    Can you check in your debug.log for errors? https://wordpress.org/support/article/debugging-in-wordpress/

    O-O
    Participant
    # 1 year, 10 months ago

    Hi, can you please tell me where I can find the debug?
    I have checked our theme for: wp-config.php file.

    But I can not find it in the Theme files.

    wpsolr
    Keymaster
    # 1 year, 10 months ago

    (root folder)/wp-config.php
    (root folder)/wp-content/debug.log

    O-O
    Participant
    # 1 year, 10 months ago

    Is the root folder something you can find in the backend of WordPress?
    When I go to wp-admin > theme editor and search for root folder or wp-config.php I can not find it.

    We do have a wpml-config.xml. But in here I do not see something with true or false.

    wpsolr
    Keymaster
    # 1 year, 10 months ago

    The files are indeed in your server folders. You’ll need to connect with FTP and browse your installation folders.

    O-O
    Participant
    # 1 year, 10 months ago

    I Checked the Log on the server and found this notification:

    [Fri Feb 07 09:02:52.635194 2020] [proxy_fcgi:error] [pid 21712] [client 127.0.0.1:52742] AH01071: Got error ‘PHP message: WPSOLR Elastisearch query: {“from”:0,”size”:50,”sort”:[{“algoritme_score_i”:{“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”]}PHP message: PHP Fatal error: Uncaught Elasticsearch\\Common\\Exceptions\\BadRequest400Exception: {“error”:{“root_cause”:[{“type”:”query_shard_exception”,”reason”:”No mapping found for [algoritme_score_i] in order to sort on”,”index_uuid”:”J_CKjppsT9Oi3B1mUnM0Yw”,”index”:”my_index”}],”type”:”search_phase_execution_exception”,”reason”:”all shards failed”,”phase”:”query”,”grouped”:true,”failed_shards”:[{“shard”:0,”index”:”my_index”,”node”:”AtFh3zMgRASnPieg9eaoFg”,”reason”:{“type”:”query_shard_exception”,”reason”:”No mapping found for [algoritme_score_i] in order to sort on”,”index_uuid”:”J_CKjppsT9Oi3B1mUnM0Yw”,”index”:”my_index”}}]},”status”:400} in /home/309089.cloudwaysapps.com/sgqgvzfmmv/public_html/wp-content/plugins/wpsolr-pro/wpsolr/core/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:627\nStack trace:\n#0 /home/309089.cloudwaysapps.com/sgqgvzfmmv/public_html/wp-content/plugins/wpsolr-pro/wpsolr/core/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/…’, referer: https://online-outlet.net/?s=&post_type=product&orderby=algoritme_score_str_desc

    Is this what you ment?

    wpsolr
    Keymaster
    # 1 year, 10 months ago

    Perfect.

    It means your index, for any reason, is not setup as it should. The sort field “algoritme_score_i” should be recognized as a field containing integer numbers, thanks to its extensions “_i”.

    You will need to recreate the index.

    wpsolr
    Keymaster
    # 1 year, 10 months ago

    But before, can you delete your index content, and index a few products? Then test again the sort for errors.

    O-O
    Participant
    # 1 year, 10 months ago

    We have followed the steps and re-indexed, however this still seems not to work. We have multiple errors showing and are not completely sure which one is connected to this.

    [Mon Feb 10 09:44:46.768436 2020] [proxy_fcgi:error] [pid 1831] [client 127.0.0.1:39397] AH01071: Got error ‘PHP message: Unable to open /home/309089.cloudwaysapps.com/sgqgvzfmmv/public_html/wp-content/wflogs/config-synced.php for reading and writing.PHP message: Unable to open /home/309089.cloudwaysapps.com/sgqgvzfmmv/public_html/wp-content/wflogs/attack-data.php for reading and writing.PHP message: Unable to open /home/309089.cloudwaysapps.com/sgqgvzfmmv/public_html/wp-content/wflogs/attack-data.php for reading and writing.’, referer: https://online-outlet.net/wp-admin/admin.php?page=solr_settings&tab=solr_option&subtab=facet_opt\

    [Mon Feb 10 09:44:46.768436 2020] [proxy_fcgi:error] [pid 1831] [client 127.0.0.1:39397] AH01071: Got error ‘PHP message: Unable to open /home/309089.cloudwaysapps.com/sgqgvzfmmv/public_html/wp-content/wflogs/config-synced.php for reading and writing.PHP message: Unable to open /home/309089.cloudwaysapps.com/sgqgvzfmmv/public_html/wp-content/wflogs/attack-data.php for reading and writing.PHP message: Unable to open /home/309089.cloudwaysapps.com/sgqgvzfmmv/public_html/wp-content/wflogs/attack-data.php for reading and writing.’, referer: https://online-outlet.net/wp-admin/admin.php?page=solr_settings&tab=solr_option&subtab=facet_opt

    [Mon Feb 10 09:42:53.631718 2020] [proxy_fcgi:error] [pid 1800] [client 127.0.0.1:39361] AH01071: Got error ‘PHP message: Unable to open /home/309089.cloudwaysapps.com/sgqgvzfmmv/public_html/wp-content/wflogs/config-synced.php for reading and writing.PHP message: Unable to open /home/309089.cloudwaysapps.com/sgqgvzfmmv/public_html/wp-content/wflogs/attack-data.php for reading and writing.PHP message: Unable to open /home/309089.cloudwaysapps.com/sgqgvzfmmv/public_html/wp-content/wflogs/attack-data.php for reading and writing.PHP message: WPSOLR Elastisearch query: {“from”:0,”size”:50,”highlight”:{“require_field_match”:false,”pre_tags”:[“<b>”],”post_tags”:[“<\\/b>”],”fields”:{“title”:{“fragment_size”:100,”number_of_fragments”:1},”content”:{“fragment_size”:100,”number_of_fragments”:1},”comments”:{“fragment_size”:100,”number_of_fragments”:1}}},”_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:(adidas)”,”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”:{“type”:”product”}}}},{“bool”:{“must_not”:[{“terms”:{“type”:[“shop_order”]}}]}},{“bool”:{“should”:[{“bool”:{“must_not”:[{“exists”:{“field”:”product_visibility_str”}}]}},{“bool”:{“must_not”:[{“terms”:{“product_visib…PHP message: WPSOLR message: {“error”:{“root_cause”:[{“type”:”illegal_argument_exception”,”reason”:”Fielddata is disabled on text fields by default. Set fielddata=true on [flat_hierarchy_product_cat_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”:”my_index”,”node”:”cKpz1uBgSrm2IqMIyruJvA”,”reason”:{“type”:”illegal_argument_exception”,”reason”:”Fielddata is disabled on text fields by default. Set fielddata=true on [flat_hierarchy_product_cat_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 o…PHP message: WPSOLR trace: #0 /mnt/BLOCKSTORAGE/home/309089.cloudwaysapps.com/sgqgvzfmmv/public_html/wp-content/plugins/wpsolr-pro/wpsolr/core/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php(312): Elasticsearch\\Connections\\Connection->process4xxError(Array, Array, Array)\n#1 /mnt/BLOCKSTORAGE/home/309089.cloudwaysapps.com/sgqgvzfmmv/public_html/wp-content/plugins/wpsolr-pro/wpsolr/core/vendor/react/promise/src/FulfilledPromise.php(25): Elasticsearch\\Connections\\Connection->Elasticsearch\\Connections\\{closure}(Array)\n#2 /mnt/BLOCKSTORAGE/home/309089.cloudwaysapps.com/sgqgvzfmmv/public_html/wp-content/plugins/wpsolr-pro/wpsolr/core/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php(55): React\\Promise\\FulfilledPromise->then(Object(Closure), NULL, NULL)\n#3 /mnt/BLOCKSTORAGE/home/309089.cloudwaysapps.com/sgqgvzfmmv/public_html/wp-content/plugins/wpsolr-pro/wpsolr/core/vendor/guzzlehttp/ringphp/src/Core.php(341): GuzzleHttp\\Ring\\Future\\CompletedFutureValue->then(…’, referer: https://online-outlet.net/?s=adidas&post_type=product

    [Mon Feb 10 09:42:49.928407 2020] [proxy_fcgi:error] [pid 1799] [client 127.0.0.1:39358] AH01071: Got error ‘PHP message: Unable to open /home/309089.cloudwaysapps.com/sgqgvzfmmv/public_html/wp-content/wflogs/config-synced.php for reading and writing.PHP message: Unable to open /home/309089.cloudwaysapps.com/sgqgvzfmmv/public_html/wp-content/wflogs/attack-data.php for reading and writing.PHP message: Unable to open /home/309089.cloudwaysapps.com/sgqgvzfmmv/public_html/wp-content/wflogs/attack-data.php for reading and writing.’, referer: https://online-outlet.net/wp-admin/admin.php?page=solr_settings&tab=solr_indexes
    10:49

    [Mon Feb 10 09:40:38.363025 2020] [proxy_fcgi:error] [pid 1726] [client 127.0.0.1:39293] AH01071: Got error ‘PHP message: Unable to open /home/309089.cloudwaysapps.com/sgqgvzfmmv/public_html/wp-content/wflogs/config-synced.php for reading and writing.PHP message: Unable to open /home/309089.cloudwaysapps.com/sgqgvzfmmv/public_html/wp-content/wflogs/attack-data.php for reading and writing.PHP message: Unable to open /home/309089.cloudwaysapps.com/sgqgvzfmmv/public_html/wp-content/wflogs/attack-data.php for reading and writing.’, referer: https://online-outlet.net/product-categorie/dames/dameskleding/dames-jassen-mantels?orderby=algoritme_score_str_desc

    wpsolr
    Keymaster
    # 1 year, 10 months ago

    You have strange errors from Wordfence plugin. As if WordPress had no rights to write in its own filesystem.

    Can you check with your provider support?

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

You must be logged in to reply to this topic.