Invalid Number: n for field is_excluded_s

  • 3 years, 3 months ago #27269

    Hello. I tried searching for this error, but did not find it. I’m getting the following error when trying to view results.

    Solr HTTP error: OK (400)
    {
      "error":{
        "metadata":[
          "error-class","org.apache.solr.common.SolrException",
          "root-error-class","org.apache.solr.common.SolrException"],
        "msg":"Invalid Number: n for field is_excluded_s",
        "code":400}}

    I am using OpenSolr if that helps.

    • This topic was modified 2 years, 1 month ago by wpsolr.
    wpsolr
    Keymaster
    3 years, 3 months ago #27274

    Which OpenSolr server/version is it?

    3 years, 3 months ago #27275

    Sorry – Solr version US-EAST-SOLR-7-0
    Thanks

    wpsolr
    Keymaster
    3 years, 3 months ago #27280

    (I presume you use WPSOLR 22.0)
    Indeed, I get the same error, a cast error from (long) to (int):
    ERROR: [doc=64] Error adding field 'displaymodified_dt_i'='1324329053000' msg=For input string: "1324329053000"

    Added to the roadmap: https://trello.com/c/eyozpkEI/161-solr-cast-error

    3 years, 3 months ago #27281

    Thanks for looking into that. Is there another version I can use to get started in the meantime? Downgrade to 6 for now?
    I should also note that I started out using solr v. 8 and got a json parse error on indexing.

    Unknown field 'PID'
    Full error is here. I tried to batch 1 at a time and eliminate the one post that this happened on but it happened on all of them.

    wpsolr
    Keymaster
    3 years, 3 months ago #27282

    Please replace your WPSOLR with this fix: https://trello.com/c/eyozpkEI/161-solr-cast-error
    Tested with Opensolr “Simple shared – Solr 8 – FR-SOLR-8-0 – EU-WEST – Solr 8.0”

    3 years, 3 months ago #27295

    Ok I updated the code as instructed.
    Deleted the 7.0 Solr index and recreated with Solr 8 EAST
    I’m still getting an error on index:

    Solr HTTP error: OK (400) { "responseHeader":{ "status":400, "QTime":0}, "error":{ "metadata":[ "error-class","org.apache.solr.common.SolrException", "root-error-class","org.apache.solr.common.SolrException"], "msg":"ERROR: [doc=2845] unknown field 'PID'", "code":400}}
    

    Deleted the 8.0 Index. Recreated with Solr version US-EAST-SOLR-7-0
    Indexed just fine. When trying to load the solr search form I’m still getting the same error
    Solr HTTP error: OK (400) { "error":{ "metadata":[ "error-class","org.apache.solr.common.SolrException", "root-error-class","org.apache.solr.common.SolrException"], "msg":"Invalid Number: n for field is_excluded_s", "code":400}}

    Caches were cleared.

    wpsolr
    Keymaster
    3 years, 3 months ago #27296

    Can you open your Opensolr schema.xml file, and tell me what is the definition of the dynamic field “*_i” ?

    3 years, 3 months ago #27297

    <dynamicField name="is_*" type="plong" indexed="true" stored="true" multiValued="false"/>
    Is this what you mean?

    wpsolr
    Keymaster
    3 years, 3 months ago #27298

    Rather <dynamicField name="*_i"

    3 years, 3 months ago #27299

    Oh I’m sorry – there is no entry for that in my schema.xml. Is there a template that I should follow? I created the index via the plugin so I figured any configuration would be set that way.

    wpsolr
    Keymaster
    3 years, 3 months ago #27300

    The plugin should have uploaded the correct schema.xml for you.

    The index must NOT exist in OpenSolr: the schema.xml will be uploaded if and only if the index is not already there.
    Can you create an index from WPSOLR, with a new name?

    3 years, 3 months ago #27301

    I deleted the old index. Recreated a new index from wpsolr plugin with different name and the schema.xml looks identical to the one prior. There is no entry for <dynamicField name="*_i"

    wpsolr
    Keymaster
    3 years, 3 months ago #27302

    Can you check the content of some files in your WPSOLR plugin?

    – File /wp-content/plugins/wpsolr-pro/wpsolr/core/classes/engines/solarium/admin/conf/wpsolr_schema_5.0.json
    Should contain:

    "add-dynamic-field": {
        "name": "*_i",
        "type": "long",
        "indexed": true,
        "stored": true
      }

    – File /wp-content/plugins/wpsolr-pro/wpsolr/core/classes/engines/solarium/admin/conf/opensolr/5.0/schema.xml
    Should contain:
    <dynamicField name="*_i" type="long" indexed="true" stored="true" multiValued="true" docValues="true"/>

    wpsolr
    Keymaster
    3 years, 3 months ago #27303

    (both with type “long”, instead of “integer”)

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

You must be logged in to reply to this topic.