Invalid Number: n for field is_excluded_s

  • # 11 months, 3 weeks ago

    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.

    wpsolr
    Keymaster
    # 11 months, 3 weeks ago

    Which OpenSolr server/version is it?

    # 11 months, 3 weeks ago

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

    wpsolr
    Keymaster
    # 11 months, 3 weeks ago

    (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

    # 11 months, 3 weeks ago

    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
    # 11 months, 3 weeks ago

    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”

    # 11 months, 3 weeks ago

    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
    # 11 months, 3 weeks ago

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

    # 11 months, 3 weeks ago

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

    wpsolr
    Keymaster
    # 11 months, 3 weeks ago

    Rather <dynamicField name="*_i"

    # 11 months, 3 weeks ago

    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
    # 11 months, 3 weeks ago

    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?

    # 11 months, 3 weeks ago

    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
    # 11 months, 3 weeks ago

    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
    # 11 months, 3 weeks ago

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

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

You must be logged in to reply to this topic.