`
feng_tai_jun
  • 浏览: 112965 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

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

    博客分类:
  • Solr
阅读更多
问题:
引用
Caused by: org.apache.solr.common.SolrException: Invalid UUID String: '1'

参考:https://issues.apache.org/jira/browse/SOLR-3398
当使用
<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删掉,改为自己需要的。

引用
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.
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics