Indexing is not working for Orders in WordPress Back-end

  • ben
    Participant
    1 year, 10 months ago #30124

    Hello Team, I am writing this email on the behalf of my client who has purchased Wp-Solr Pro with the following details.
    (removed)

    Here is the issue:
    We have an e-commerce store with the name Online Pound Store which is built in WordPress with woo-commerce. We have set up a test server at the following link https://www.corporatementorz.com. We have approx 177000 orders in the backend. I am having issues when I am searching orders in the backend as it takes approx 60 to 80 sec to search. So, someone suggested that we should use wp-solr with the elastic search for faster results. I have purchased a wp-solr Pro licence. I have installed the elastic search server on the ubuntu server and installed the plugin in WordPress. I have followed all the instructions as mentioned to index the orders but when I tried to send data to index it’s showing 0 records indexed. So, I debug the query while indexing and I have found that the following query is wrong as orders in WordPress don’t have (‘publish’) post_status, whereas it could have post_status like wc_completed, wc_pending etc.

    Query:
    SELECT ID, post_modified, post_parent, post_type FROM wp_posts AS A WHERE ((post_modified = ‘1000-01-01 00:00:00’ AND ID > 0) OR (post_modified > ‘1000-01-01 00:00:00’)) AND ( post_status IN (‘publish’) AND ( post_type = ‘shop_order’ ) ) ORDER BY post_modified ASC, ID ASC LIMIT 500

    I am looking for a solution to this issue. Please tell me how we can change this quey or How we can index our orders so we can index it and can search in the backend of WordPress.
    Looking forward to your reply.
    If You need more information please contact the following email (removed)
    Thank You.

    • This topic was modified 1 year, 10 months ago by wpsolr.
    wpsolr
    Keymaster
    1 year, 10 months ago #30126

    Did you active the WooCommerce add-on, before indexing?

    • This reply was modified 1 year, 10 months ago by wpsolr.
    • This reply was modified 1 year, 10 months ago by wpsolr.
    ben
    Participant
    1 year, 10 months ago #30128

    Yes, I have selected the woocommerce option from Activate extension in the Wpsolr settings. and woocmmerce plugins are already installed there.

    wpsolr
    Keymaster
    1 year, 10 months ago #30130

    On screen 2.2, did you select “Index all status” for the orders post type?

    ben
    Participant
    1 year, 10 months ago #30132

    Yes I have selected.

    wpsolr
    Keymaster
    1 year, 10 months ago #30133

    Can you attach here a screen capture of your screen 2.2, and of your indexing screen?

    ben
    Participant
    1 year, 10 months ago #30134

    Hi There I reindexed it and now it’s showing me that all my orders are indexed. But still on the order page in the woo-commerce, the search is still taking more than 60 seconds, check the attached screenshots. I have shared screen 2.2. Please check this link

    screen-2-2-WPSOLR-PRO-Word-Press-www-corporatementorz-com

    wpsolr
    Keymaster
    1 year, 10 months ago #30135

    Did you check “Replace admin archives” on screen 2.1 ?
    Also, you should activate the WooCommerce add-on, and select order custom fields on screen 2.2 (customer address, …)

    ben
    Participant
    1 year, 10 months ago #30149

    I got success in starting the index process but during index it gave me an error, please help. Also I want to know do we have to index all the fields under orders as I have 136 fields.

    An error or timeout occured.

    Error code: parsererror

    Error message: SyntaxError: Unexpected token P in JSON at position 0

    (removed)

    ben
    Participant
    1 year, 10 months ago #30150

    This is solved, i just mentioned in my last message. But the results are still showing 10000 wher as i already run the command with my details
    curl -X PUT “https://localhost:9200/YOUR_INDEX_NAME_HERE/_settings” -H ‘Content-Type: application/json’ -d ‘{ “index” : { “max_result_window” : YOUR_MAX_RESULTS_HERE } }’

    Now please help

    wpsolr
    Keymaster
    1 year, 10 months ago #30152

    Here is a small fix for the 10000 Elasticsearch limit: https://www.wpsolr.com/forums/topic/remove-10000-limit-when-using-elasticsearch/page/2/#post-29619

    It will be official on the next release 22.3

    ben
    Participant
    1 year, 10 months ago #30153

    Getting this error “curl: (3) Failed to convert ‘https to ACE; string contains a disallowed character” after running the following curl

    curl -X PUT “https://localhost:9200/YOUR_INDEX_NAME_HERE/_settings” -H ‘Content-Type: application/json’ -d ‘{ “index” : { “max_result_window” : YOUR_MAX_RESULTS_HERE } }’

    wpsolr
    Keymaster
    1 year, 10 months ago #30154
    ben
    Participant
    1 year, 10 months ago #30156

    guys I have removed elasticsearch as it was not working as expected now I have installed apache solr and it connected successfully and all order is indexed but now the order not showing on woo-commerce order page Can you please guide me what could be the problem, I configured it as per wpsolr guide. I have attached all my configuration screens. Please check and provide me the solution.
    screen 2.2 : https://ibb.co/DR98gDk

    wpsolr
    Keymaster
    1 year, 10 months ago #30157

    Did you check “Replace admin archives” on screen 2.1 ?

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

You must be logged in to reply to this topic.