Adding a document to the index in SOLR: Document contains at least one immense term

前端 未结 2 502
无人共我
无人共我 2021-01-11 12:06

I am adding (by a Java program) for indexing, a document in SOLR index, but after add(inputDoc) method there is an exception. The log in solr web interface cont

2条回答
  •  半阙折子戏
    2021-01-11 12:22

    I had the same problem as yours, finally I solved my problem. Please check the type of your "text" field, I suspect it must be "strings".

    You can find it in the managed-schema of the core:

    
    

    Or you can go to Solr Admin, access: http://localhost:8983/solr/CORE_NAME/schema/fieldtypes?wt=json and then search for "text", if it is something like the follow, you know you defined your "text" field as strings type:

      {
      "name":"strings",
      "class":"solr.StrField",
      "multiValued":true,
      "sortMissingLast":true,
      "fields":["text"],
      "dynamicFields":["*_ss"]},
    

    Then my solution works for you, you can change the type from "strings" to "text_general" in managed-schema. (make sure type of "text" in schema.xml is also "text_general")

       
    

    This will solve your problem. strings is string field, but text_general is text field.

提交回复
热议问题