问题描述
我最近将 solr 实例从 1,4 升级到 3.6.但是,现在每当我更新索引时,我的日志中似乎都会收到未定义的字段文本"严重消息.
I've recently upgraded my solr instance from 1,4 to 3.6. However, I now appear to be getting an "undefined field text" severe message in my logs whenever I update my index.
我的架构中确实有文本字段(从 1.4 版开始有效),但以前从未必须将其声明为字段类型.这在 3.6 中有变化吗?
I do have text fields in my schema (which was valid as of version 1.4), but never previously had to be declared as a field type. Has this changed in 3.6?
我的架构在这里 >> http://pastebin.com/KrCVab0U
My schema is here >> http://pastebin.com/KrCVab0U
SEVERE: org.apache.solr.common.SolrException: undefined field text
at org.apache.solr.schema.IndexSchema.getDynamicFieldType(IndexSchema.java:1330)
at org.apache.solr.schema.IndexSchema$SolrQueryAnalyzer.getAnalyzer(IndexSchema.java:408)
at org.apache.solr.schema.IndexSchema$SolrIndexAnalyzer.reusableTokenStream(IndexSchema.java:383)
at org.apache.lucene.queryParser.QueryParser.getFieldQuery(QueryParser.java:574)
at org.apache.solr.search.SolrQueryParser.getFieldQuery(SolrQueryParser.java:206)
at org.apache.lucene.queryParser.QueryParser.Term(QueryParser.java:1429)
at org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:1317)
at org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:1245)
at org.apache.lucene.queryParser.QueryParser.TopLevelQuery(QueryParser.java:1234)
at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:206)
at org.apache.solr.search.LuceneQParser.parse(LuceneQParserPlugin.java:79)
at org.apache.solr.search.QParser.getQuery(QParser.java:143)
at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:105)
at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:165)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1376)
at org.apache.solr.handler.PingRequestHandler.handleRequestBody(PingRequestHandler.java:67)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1376)
at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:365)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:260)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:679)
推荐答案
这与字段类型文本"无关.它是关于名为文本"的字段.
It is not about field type "text". It is about field named "text".
您已将配置中的默认字段更改为search_text".请尝试将所有对search_text"的引用重命名为text".如果这解决了问题,那么您知道在配置中的某处您指的是文本"字段,可能在 solrconfig.xml 中,如 Solr 查询 - HTTP 错误 404 未定义字段文本
You've changed the default field in config to "search_text". Please try renaming all references to "search_text" to "text". If this fixes the issue, then you know somewhere in the configuration you're referring to "text" field, possibly in solrconfig.xml as suggested in Solr Query - HTTP error 404 undefined field text
希望有帮助.
这篇关于Solr“未定义字段文本"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!