Indexing return error

  • kuro19
    Participant
    2 years, 8 months ago #27516

    Hi,

    In “3. Send your data” tab, when clicking Indexing it returns error, enabled debug info it shows:
    —————
    An error or timeout occured.

    Error code: parsererror

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

    Can you please recheck?

    Thank you.

    • This topic was modified 2 years, 2 months ago by wpsolr.
    kuro19
    Participant
    2 years, 8 months ago #27517

    Update or add new post, it will also return error, example:

    ———-
    (WPSOLR) Error while indexing this post type:

    Solr HTTP error: OK (400) { “responseHeader”:{ “status”:400, “QTime”:1}, “error”:{ “metadata”:[ “error-class”,”org.apache.solr.common.SolrException”, “root-error-class”,”java.lang.NumberFormatException”], “msg”:”ERROR: [doc=18990] Error adding field ‘displaymodified_dt_i’=’1629317549000’ msg=For input string: \”1629317549000\””, “code”:400}}
    —————

    wpsolr
    Keymaster
    2 years, 8 months ago #27518

    The Solr dynamic format of *_dt_i changed from int to long. You will need to create a brand new Solr index from WPSOLR, reindex your data, and select your new index in screen 2.1

    You could also change manually the schema.xml file of your current index, and reload the index. Bit I’m not sure it will work.

    kuro19
    Participant
    2 years, 8 months ago #27519

    A bit of inconvenient but it works. Thank you.

    wpsolr
    Keymaster
    webmasterbslnl
    Participant
    2 years, 2 months ago #29135

    Just found that modifying schema.xml and reloading the SOLR core is enough to make adding documents to the index work again. In schema.xml just change:
    <dynamicField name="*_i" type="integer" ...
    to
    <dynamicField name="*_i" type="long" ...
    and call https://yourserver:8983/solr/admin/cores?action=RELOAD&core=<your_index>&wt=json or the SOLR admin to reload the core. Querying on both existing and new documents worked fine after that.

    wpsolr
    Keymaster
    2 years, 2 months ago #29136

    Thanks for the feedback. I’d avise to reindex your content.

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

You must be logged in to reply to this topic.