可能重复:
Solr:QueryElevationComponent 需要 StrField uniqueKeyField 错误
我已经为 schema.xml 配置了不同的字段,例如
<fields>
<field name="id" type="int" indexed="true" stored="true" required="true" />
</fields>
<uniqueKey>id</uniqueKey>
当我运行 solr 服务时,它给了我一个错误,就像uniquekey field must be string
我将字段类型 int 更改为 string 之后它工作正常
<fields>
<field name="id" type="string" indexed="true" stored="true" required="true" />
</fields>
<uniqueKey>id</uniqueKey>
但我想在 int 类型中唯一键。
HTTP 状态 500 - solr 配置中的严重错误。检查您的日志文件以获取有关可能出现问题的更多详细信息。如果你希望solr在配置错误后继续,更改:false in null ------------------------------------ -------------------------- org.apache.solr.common.SolrException: QueryElevationComponent 要求架构具有使用 StrField 在 org 实现的 uniqueKeyField。 org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:508) 中的 apache.solr.handler.component.QueryElevationComponent.inform(QueryElevationComponent.java:157) org.apache.solr.core.SolrCore.(SolrCore .java:588)在 org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83) 的 org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:137)。 catalina.core。