Caused by: org.apache.solr.common.SolrException: Invalid UUID String: '1'

问题:[quote]Caused by: org.apache.solr.common.SolrException: Invalid UUID String: '1'[/quote]
参考:[url]https://issues.apache.org/jira/browse/SOLR-3398[/url]
当使用

<fieldType name="uuid" class="solr.UUIDField" indexed="true" />
<field name="id" type="uuid" indexed="true" stored="true" required="true" multiValued="false" />

来自动生成ID时,出现下面错误:

org.apache.solr.core.CoreContainer; Error creating core [collection2]: Error initializing QueryElevationComponent.
org.apache.solr.common.SolrException: Error initializing QueryElevationComponent.
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:815)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:658)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:637)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:381)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:375)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor$1.run(ExecutorUtil.java:148)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.solr.common.SolrException: Error initializing QueryElevationComponent.
at org.apache.solr.handler.component.QueryElevationComponent.inform(QueryElevationComponent.java:254)
at org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:619)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:795)
... 9 more
Caused by: org.apache.solr.common.SolrException: Invalid UUID String: '1'
at org.apache.solr.schema.UUIDField.toInternal(UUIDField.java:89)
at org.apache.solr.schema.FieldType.readableToIndexed(FieldType.java:391)
at org.apache.solr.handler.component.QueryElevationComponent$ElevationObj.<init>(QueryElevationComponent.java:150)
at org.apache.solr.handler.component.QueryElevationComponent.loadElevationMap(QueryElevationComponent.java:323)
at org.apache.solr.handler.component.QueryElevationComponent.inform(QueryElevationComponent.java:237)


解决方法:
把conf/elevatel.xml中的不需要的example删掉,改为自己需要的。

[quote]It appears based on the bug report that you have modified the example solr schema.xml to change the uniqueKey field to use UUIDField - however you also seem to still have the QueryElevationComponent enabled in your solrconfig.xml file, configured to use the uniqueKey field, and the elevate.xml file has (example) entries referring to IDs which are not legal UUID values.

So you can either remove the QueryElevationComponent, or edit elevate.xml to remove the examples from elevate.xml, or change the QueryElevationComponent configuration in solrconfig.xml to use some lookup field other then the uniqueKey field.[/quote]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值