从Solr 4.4.1迁移到Solr 4.6.1后,我得到以下异常。模式将字段ca_xyz声明为'tlong'。
这是ca_xyz
的架构定义<field name="ca_xyz" type="double" indexed="true" stored="true" />
<fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
org.apache.solr.common.SolrException: ERROR: [doc=CA:86] Error adding field 'ca_xyz'='java.math.BigDecimal:1912957986' msg=For input string: "java.math.BigDecimal:1912957986"
at org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:167)
at org.apache.solr.update.AddUpdateCommand.getLuceneDocument(AddUpdateCommand.java:77)
at org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:215)
at org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:69)
at org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:51)
at org.apache.solr.update.processor.DistributedUpdateProcessor.doLocalAdd(DistributedUpdateProcessor.java:571)
at org.apache.solr.update.processor.DistributedUpdateProcessor.versionAdd(DistributedUpdateProcessor.java:707)
at org.apache.solr.update.processor.DistributedUpdateProcessor.processAdd(DistributedUpdateProcessor.java:437)
at org.apache.solr.update.processor.LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:100)
at org.apache.solr.update.PeerSync.handleUpdates(PeerSync.java:496)
at org.apache.solr.update.PeerSync.handleResponse(PeerSync.java:327)
at org.apache.solr.update.PeerSync.sync(PeerSync.java:252)
at org.apache.solr.cloud.RecoveryStrategy.doRecovery(RecoveryStrategy.java:391)
at org.apache.solr.cloud.RecoveryStrategy.run(RecoveryStrategy.java:247)
Caused by: java.lang.NumberFormatException: For input string: "java.math.BigDecimal:1912957986"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Long.parseLong(Long.java:441)
at java.lang.Long.parseLong(Long.java:483)
at org.apache.solr.schema.TrieField.createField(TrieField.java:599)
at org.apache.solr.schema.TrieField.createFields(TrieField.java:650)
at org.apache.solr.update.DocumentBuilder.addField(DocumentBuilder.java:47)
at org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:118)