Indexing is not working for Orders in WordPress Back-end
- benParticipant2 years, 9 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 500I 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 2 years, 9 months ago by wpsolr.
wpsolrKeymaster2 years, 9 months ago #30126Did you active the WooCommerce add-on, before indexing?
benParticipant2 years, 8 months ago #30149I 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)
benParticipant2 years, 8 months ago #30150This 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
wpsolrKeymaster2 years, 8 months ago #30152Here 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
benParticipant2 years, 8 months ago #30153Getting 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 } }’
wpsolrKeymaster2 years, 8 months ago #30154Looks like an issue with your quotation marks: https://stackoverflow.com/questions/64841244/curl-put-request-content-type-header-is-not-supported
Or https.
benParticipant2 years, 8 months ago #30156guys 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
You must be logged in to reply to this topic.