如何在Solr 9中配置ICUCOLLATION FIELD类型?
我尝试在Solr 9中重新创建Solr 8配置,但是在创建Core时,配置中的以下部分会导致错误。
<fieldType name="text_gen_sort" class="solr.ICUCollationField" locale=""
numeric="true" strength="primary" multiValued="true" />
在solrconfig.xml
中添加了以下路径:
<lib path="..../solr/modules/analysis-extras/lib/solr-analysis-extras-9.0.0.jar" />
<lib path="..../solr/modules/analysis-extras/lib/icu4j-68.2.jar" />
<lib path="..../solr/modules/analysis-extras/lib/lucene-analysis-icu-9.0.0.jar" />
我检查了,通往罐子的路径是正确的。
堆栈跟踪很漫长,这里是其中的相关部分:
<h3>Caused by:</h3><pre>java.lang.IllegalAccessError:
class org.apache.solr.schema.ICUCollationField tried to access
protected field org.apache.solr.schema.IndexSchema.luceneVersion
(org.apache.solr.schema.ICUCollationField is in
unnamed module of loader java.net.FactoryURLClassLoader @61639b88;
org.apache.solr.schema.IndexSchema is in unnamed module of loader
org.eclipse.jetty.webapp.WebAppClassLoader @6a988392)
at org.apache.solr.schema.ICUCollationField.init(ICUCollationField.java:128)
at org.apache.solr.schema.FieldType.setArgs(FieldType.java:202)
at org.apache.solr.schema.FieldTypePluginLoader.init(FieldTypePluginLoader.java:149)
at org.apache.solr.schema.FieldTypePluginLoader.init(FieldTypePluginLoader.java:43)
at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:189)
at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:531)
at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:188)
at org.apache.solr.schema.ManagedIndexSchema.<init>(ManagedIndexSchema.java:119)
at org.apache.solr.schema.ManagedIndexSchemaFactory.create(ManagedIndexSchemaFactory.java:279)
at org.apache.solr.schema.ManagedIndexSchemaFactory.create(ManagedIndexSchemaFactory.java:51)
at org.apache.solr.core.ConfigSetService.createIndexSchema(ConfigSetService.java:342)
at org.apache.solr.core.ConfigSetService.lambda$loadConfigSet$0(ConfigSetService.java:253)
at org.apache.solr.core.ConfigSet.<init>(ConfigSet.java:49)
at org.apache.solr.core.ConfigSetService.loadConfigSet(ConfigSetService.java:249)
at org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1550)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:1426)
at org.apache.solr.handler.admin.CoreAdminOperation.lambda$static$0(CoreAdminOperation.java:92)
具有相同3个库的先前配置,并且字段类型可行。我使用bin/solr create_core -c my_core -d my_configset
。更改在托管schema.xml
中。 (过去曾经是在SOLR 8中管理Schema
,但我从新默认值中重新创建了配置。)
使用private build openjdk 64位服务器VM 13.0.7 13.0.7+5-ubuntu -0ubuntu120.04如果很重要。
这可能是什么原因以及如何克服问题的原因?
I've tried to recreate Solr 8 configuration in Solr 9, but the following part in the config causes an error when creating core.
<fieldType name="text_gen_sort" class="solr.ICUCollationField" locale=""
numeric="true" strength="primary" multiValued="true" />
The following paths has been added in the solrconfig.xml
:
<lib path="..../solr/modules/analysis-extras/lib/solr-analysis-extras-9.0.0.jar" />
<lib path="..../solr/modules/analysis-extras/lib/icu4j-68.2.jar" />
<lib path="..../solr/modules/analysis-extras/lib/lucene-analysis-icu-9.0.0.jar" />
and I checked, that the paths to jars are correct.
The stack trace is lengthy, here the relevant part of it:
<h3>Caused by:</h3><pre>java.lang.IllegalAccessError:
class org.apache.solr.schema.ICUCollationField tried to access
protected field org.apache.solr.schema.IndexSchema.luceneVersion
(org.apache.solr.schema.ICUCollationField is in
unnamed module of loader java.net.FactoryURLClassLoader @61639b88;
org.apache.solr.schema.IndexSchema is in unnamed module of loader
org.eclipse.jetty.webapp.WebAppClassLoader @6a988392)
at org.apache.solr.schema.ICUCollationField.init(ICUCollationField.java:128)
at org.apache.solr.schema.FieldType.setArgs(FieldType.java:202)
at org.apache.solr.schema.FieldTypePluginLoader.init(FieldTypePluginLoader.java:149)
at org.apache.solr.schema.FieldTypePluginLoader.init(FieldTypePluginLoader.java:43)
at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:189)
at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:531)
at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:188)
at org.apache.solr.schema.ManagedIndexSchema.<init>(ManagedIndexSchema.java:119)
at org.apache.solr.schema.ManagedIndexSchemaFactory.create(ManagedIndexSchemaFactory.java:279)
at org.apache.solr.schema.ManagedIndexSchemaFactory.create(ManagedIndexSchemaFactory.java:51)
at org.apache.solr.core.ConfigSetService.createIndexSchema(ConfigSetService.java:342)
at org.apache.solr.core.ConfigSetService.lambda$loadConfigSet$0(ConfigSetService.java:253)
at org.apache.solr.core.ConfigSet.<init>(ConfigSet.java:49)
at org.apache.solr.core.ConfigSetService.loadConfigSet(ConfigSetService.java:249)
at org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1550)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:1426)
at org.apache.solr.handler.admin.CoreAdminOperation.lambda$static$0(CoreAdminOperation.java:92)
Previous configuration with the same 3 libraries and the field type worked. I used bin/solr create_core -c my_core -d my_configset
. The change is in the managed-schema.xml
. (It used to be just manages-schema
in Solr 8, but I recreated the configuration from the new default.)
Using Private Build OpenJDK 64-Bit Server VM 13.0.7 13.0.7+5-Ubuntu-0ubuntu120.04 if that matters.
What can be the cause of this and how to overcome the problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论