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

  • duck
    Participant
    4 years, 8 months ago #29108

    I’ve downloaded the configuration files listed here to our Solr Core:
    /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 0

    This 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 4 years, 8 months ago by wpsolr.
    duck
    Participant
    4 years, 8 months ago #29109

    I discovered the fix here
    /forums/topic/failed-to-parse-field-displaymodified_dt_i-of-type-integer-in-document-with/#post-27538

    To 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:
    /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.

    wpsolr
    Keymaster
    4 years, 8 months ago #29110

    Please follow this topic: /forums/topic/failed-to-parse-field-displaymodified_dt_i-of-type-integer-in-document-with/

    wpsolr
    Keymaster
    4 years, 8 months ago #29111

    My answer crossed yours. Topic is solved apparently!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.