Solr DataImportHandler CachedSqlEntityProcessor ClassCastException

前端 未结 5 1660
[愿得一人]
[愿得一人] 2021-01-21 08:49

I am using Solr 4.6.0 and trying to import my data using CachedSqlEntityProcessor, but somehow I end up getting a ClassCastException.

5条回答
  •  盖世英雄少女心
    2021-01-21 09:31

    I dont think there is something wrong with your dataimporthandler configuration, I had rather check that your database types match your corresponding sold field type

    Something like a database type resulting in a java.lang.Integer is passed to a solr field based on java.lang.String

    OUPS, I might have got it wrong, is your uniqueKey field for SOLR still "id"? you've set in your schema this field as being an integer, which is a bad idea.

    http://wiki.apache.org/solr/SchemaXml#The_Unique_Key_Field

    "Note that if you have enabled the QueryElevationComponent in solrconfig.xml it requires the schema to have a uniqueKey of type StrField. It cannot be, for example, an int field."

提交回复
热议问题