waiteryee127 / mmseg4j

Automatically exported from code.google.com/p/mmseg4j
Apache License 2.0
1 stars 0 forks source link

solr4.0 eg4j-1.9.0.v20120712-SNAPSHOT.zip 高亮时出错 #36

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.
异常信息:
信息: [collection1] webapp=/solr path=/select 
params={q=news_title:程序&hl.simple.pre=<em>&hl.simple.post=</em>&hl.fl=news_t
itle&wt=xml&hl=true} hits=2 status=500 QTime=150 
十月 11, 2012 5:11:19 下午 org.apache.solr.common.SolrException log
严重: null:java.io.IOException: Stream closed
    at java.io.StringReader.ensureOpen(Unknown Source)
    at java.io.StringReader.read(Unknown Source)
    at java.io.BufferedReader.fill(Unknown Source)
    at java.io.BufferedReader.read(Unknown Source)
    at java.io.FilterReader.read(Unknown Source)
    at java.io.PushbackReader.read(Unknown Source)
    at com.chenlb.mmseg4j.MMSeg.readNext(MMSeg.java:42)
    at com.chenlb.mmseg4j.MMSeg.next(MMSeg.java:64)
    at com.chenlb.mmseg4j.analysis.MMSegTokenizer.incrementToken(MMSegTokenizer.java:63)
    at org.apache.solr.highlight.TokenOrderingFilter.incrementToken(DefaultSolrHighlighter.java:629)
    at org.apache.lucene.search.highlight.OffsetLimitTokenFilter.incrementToken(OffsetLimitTokenFilter.java:43)
    at org.apache.lucene.analysis.CachingTokenFilter.fillCache(CachingTokenFilter.java:78)
    at org.apache.lucene.analysis.CachingTokenFilter.incrementToken(CachingTokenFilter.java:50)
    at org.apache.lucene.search.highlight.Highlighter.getBestTextFragments(Highlighter.java:225)
    at org.apache.solr.highlight.DefaultSolrHighlighter.doHighlightingByHighlighter(DefaultSolrHighlighter.java:510)
    at org.apache.solr.highlight.DefaultSolrHighlighter.doHighlighting(DefaultSolrHighlighter.java:401)
    at org.apache.solr.handler.component.HighlightComponent.process(HighlightComponent.java:136)
    at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:206)
    at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
    at org.apache.solr.core.SolrCore.execute(SolrCore.java:1656)
    at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:454)
    at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:275)
    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:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    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:1001)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1770)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Original issue reported on code.google.com by qq29903...@gmail.com on 11 Oct 2012 at 9:25

GoogleCodeExporter commented 9 years ago
当去掉

public void reset(Reader input) throws IOException {
        //super.reset(input);
        //super.setReader(input);
        mmSeg.reset(input);
    }

去除super.setReader(input);后无措了,可是返回的高亮信息只有一
条

Original comment by qq29903...@gmail.com on 11 Oct 2012 at 10:01

Attachments:

GoogleCodeExporter commented 9 years ago
使用 2.0.0

参考 https://github.com/chenlb/mmseg4j-solr

看看

Original comment by chenlb2...@gmail.com on 19 May 2014 at 11:35