solr4.0 + mmseg4j-1.9.0.v20120712-SNAPSHOT 分词出现系统错误..

124 views
Skip to first unread message

hexua...@gmail.com

unread,
Jan 9, 2013, 10:44:09 AM1/9/13
to mms...@googlegroups.com
给solr配置上 mmseg后...tomcat可以正常启动...是按的readme.txt里设定的配置

<fieldType name="textComplex" class="solr.TextField" positionIncrementGap="100" >
<analyzer>
<tokenizer class="com.chenlb.mmseg4j.solr.MMSegTokenizerFactory" mode="complex" dicPath="/usr/local/solr/dict"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>

<fieldType name="textMaxWord" class="solr.TextField" positionIncrementGap="100" >
<analyzer>
<tokenizer class="com.chenlb.mmseg4j.solr.MMSegTokenizerFactory" mode="max-word" dicPath="/usr/local/solr/dict"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>

<fieldType name="textSimple" class="solr.TextField" positionIncrementGap="100" >
<analyzer>
<tokenizer class="com.chenlb.mmseg4j.solr.MMSegTokenizerFactory" mode="simple" dicPath="/usr/local/solr/dict"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>




去分词时..提示


2009-5-26 15:00:02 com.chenlb.mmseg4j.solr.MMSegTokenizerFactory newSeg
信息: use complex mode
2009-5-26 15:00:02 org.apache.solr.common.SolrException log
严重: null:java.lang.RuntimeException: java.lang.NoSuchMethodError: org.apache.lucene.analysis.Tokenizer.reset(Ljava/io/Reader;)V
        at org.apache.solr.servlet.SolrDispatchFilter.sendError(SolrDispatchFilter.java:469)
        at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:297)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
        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)
Caused by: java.lang.NoSuchMethodError: org.apache.lucene.analysis.Tokenizer.reset(Ljava/io/Reader;)V
        at com.chenlb.mmseg4j.analysis.MMSegTokenizer.reset(MMSegTokenizer.java:33)
        at com.chenlb.mmseg4j.solr.MMSegTokenizerFactory.create(MMSegTokenizerFactory.java:51)
        at org.apache.solr.handler.AnalysisRequestHandlerBase.analyzeValue(AnalysisRequestHandlerBase.java:114)
        at org.apache.solr.handler.FieldAnalysisRequestHandler.analyzeValues(FieldAnalysisRequestHandler.java:220)
        at org.apache.solr.handler.FieldAnalysisRequestHandler.handleAnalysisRequest(FieldAnalysisRequestHandler.java:181)
        at org.apache.solr.handler.FieldAnalysisRequestHandler.doAnalysis(FieldAnalysisRequestHandler.java:100)
        at org.apache.solr.handler.AnalysisRequestHandlerBase.handleRequestBody(AnalysisRequestHandlerBase.java:59)
        at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
        at org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.handleRequest(RequestHandlers.java:240)
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1699)
        at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:455)
        at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:276)
        ... 15 more




与环境版本不兼容???
Reply all
Reply to author
Forward
0 new messages