Error message: SyntaxError: Unexpected token P in JSON at position 0
-
duckParticipant1 year, 7 months ago #29108
I’ve downloaded the configuration files listed here to our Solr Core:
https://www.wpsolr.com/knowledgebase/can-download-apache-solr-6-6-configuration-files/Made a successful connection and setup post types to synchronize. Upon indexing I receive the following error:
An error or timeout occured.
Error code: parsererror
Error message: SyntaxError: Unexpected token P in JSON at position 0This is listed at the bottom of the log file in WPSolr:
{“nb_results”:0,”status”:400,”message”:”Solr HTTP error: Bad Request (400)\n{"responseHeader":{"status":400,"QTime":2},"error":{"metadata":["error-class","org.apache.solr.common.SolrException","root-error-class","java.lang.NumberFormatException"],"msg":"ERROR: [doc=1091] Error adding field ‘displaymodified_dt_i’=’1588609799000’ msg=For input string: \\"1588609799000\\"","code":400}}\n”,”indexing_complete”:false}Any guidance would be greatly appreciated, thanks!
- This topic was modified 1 year, 7 months ago by wpsolr.
duckParticipant1 year, 7 months ago #29109I discovered the fix here
https://www.wpsolr.com/forums/topic/failed-to-parse-field-displaymodified_dt_i-of-type-integer-in-document-with/#post-27538To replace
<dynamicField name=”*_i” type=”integer”
with
<dynamicField name=”*_i” type=”long”This was a new install and the documentation I provided in my first reply had the incorrect schema file with the old information. It looks like you updated WP Solr to provide updated config files, however, I was not able to initiate that prompt with the instructions mentioned here:
https://www.wpsolr.com/guide/configuration-step-by-step-schematic/configure-your-indexes/connect-to-an-apache-solr-index/Which is why I used the old documentation because the auto function would not provide the correct config files. I have it working now. Thanks.
You must be logged in to reply to this topic.