solrExecption : org.apache.solr.common.SolrException: undefined field text
2015-01-26 10:25
381 查看
org.apache.solr.common.SolrException: undefined field text at org.apache.solr.schema.IndexSchema.getDynamicFieldType(IndexSchema.java:1241) at org.apache.solr.schema.IndexSchema$SolrQueryAnalyzer.getWrappedAnalyzer(IndexSchema.java:419) at org.apache.lucene.analysis.AnalyzerWrapper.initReader(AnalyzerWrapper.java:117) at org.apache.lucene.analysis.Analyzer.tokenStream(Analyzer.java:178) at org.apache.lucene.util.QueryBuilder.createFieldQuery(QueryBuilder.java:207) at org.apache.solr.parser.SolrQueryParserBase.newFieldQuery(SolrQueryParserBase.java:375) at org.apache.solr.parser.SolrQueryParserBase.getFieldQuery(SolrQueryParserBase.java:743) at org.apache.solr.parser.SolrQueryParserBase.handleBareTokenQuery(SolrQueryParserBase.java:542) at org.apache.solr.parser.QueryParser.Term(QueryParser.java:299) at org.apache.solr.parser.QueryParser.Clause(QueryParser.java:185) at org.apache.solr.parser.QueryParser.Query(QueryParser.java:107) at org.apache.solr.parser.QueryParser.TopLevelQuery(QueryParser.java:96) at org.apache.solr.parser.SolrQueryParserBase.parse(SolrQueryParserBase.java:152) at org.apache.solr.search.LuceneQParser.parse(LuceneQParser.java:50) at org.apache.solr.search.QParser.getQuery(QParser.java:141) at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:145) at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:196) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) at org.apache.solr.core.SolrCore.execute(SolrCore.java:1916) at org.apache.solr.core.QuerySenderListener.newSearcher(QuerySenderListener.java:64) at org.apache.solr.core.SolrCore$5.call(SolrCore.java:1695) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)
这个错误是因为在修改solr配置文件,schema.xml时删掉了下面的默认字段:
<field name="text" type="text_general" indexed="true" stored="false" multiValued="true"/>
只要把这个字段加到schema.xml中就可以了。
source:http://outofmemory.cn/code-snippet/14544/SolrException-undefined-field-text-solution
相关文章推荐
- org.apache.solr.common.SolrException: undefined field text
- org.apache.solr.common.SolrException: undefined field text 的解决办法
- SEVERE: org.apache.solr.common.SolrException: undefined field text
- org.apache.solr.common.SolrException: undefined field text
- Solr org.apache.solr.common.SolrException: undefined field text
- solr启动报错:org.apache.solr.common.SolrException: undefined field text解决方法
- org.apache.solr.common.SolrException undefined field text
- solr error logs org.apache.solr.common.SolrException: ERROR: [doc=17] unknown field alias
- org.apache.solr.common.SolrException
- org.apache.solr.common.SolrException: ERROR: multiple values encountered for non multiValued copy
- 使用SolrCloud出现org.apache.solr.common.SolrException: Collection not found: my_solr2
- 求解决 org.apache.solr.common.SolrException: Internal Server Error
- solr - org.apache.solr.common.SolrException: Could not load config for solrconfig.xml
- solr创建索引时出现的异常org.apache.solr.common.SolrException: Exception writing document id xx to the index;
- org.apache.solr.common.SolrException: Request-URI Too Large
- org.apache.solr.common.SolrException: Error opening new searcher
- org.apache.solr.common.SolrException: No such core: core0
- 解决:ClassNotFoundException: org.apache.oro.text.regex.MalformedPatternException
- solr undefined field text 异常
- Caused by: java.lang.ClassNotFoundException: org.apache.solr.handler.dataimportHandler