Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lucene 2.9 修改了 Tokenizer 类接口,导致 MMSegTokenizer 无法运行 #5

Closed
GoogleCodeExporter opened this issue Dec 25, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

lucene 2.4 中 Tokenizer 类中维护了一个 protected Reader input;
但在 lucene 2.9 中,变成了 protected CharStream input;

导致 MMSegTokenizer  抛异常:
java.lang.NoSuchFieldError: input
    at com.chenlb.mmseg4j.analysis.MMSegTokenizer.init(MMSegTokenizer.java:34)
    at com.chenlb.mmseg4j.analysis.MMSegTokenizer.<init>(MMSegTokenizer.java:30)
    at
com.chenlb.mmseg4j.analysis.MMSegAnalyzer.tokenStream(MMSegAnalyzer.java:63)
    at search.analysis.MyAnalyzer.getMMseg4jTokenStream(MyAnalyzer.java:97)

修改建议:
在 MMSegTokenizer 类中自己维护一个 Reader input 成员吧。


Original issue reported on code.google.com by tangfu...@gmail.com on 6 Aug 2009 at 11:42

@GoogleCodeExporter
Copy link
Author

准备修正这个 bug 时,发现 CharStream extends 
Reader。原因是使用了Tokenizer 类的 input
属性,所以会报这个错误。

快捷的方式是下载 mmseg4j 源码,把 lucene 2.4 换为 lucene 2.9 
重新编译就行。

下一版本会修正。


Original comment by chenlb2...@gmail.com on 8 Aug 2009 at 4:23

Attachments:

@GoogleCodeExporter
Copy link
Author

Original comment by chenlb2...@gmail.com on 21 Oct 2009 at 3:09

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant