We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
重新实现了IKAnalyzerSolrFactory,大家可以用下! package org.wltea.analyzer.lucene; import java.io.Reader; import java.util.Map; import org.apache.lucene.analysis.Tokenizer; import org.apache.lucene.analysis.util.TokenizerFactory; import org.apache.lucene.util.AttributeSource.AttributeFactory; public class IKAnalyzerSolrFactory extends TokenizerFactory{ private boolean useSmart; public boolean useSmart() { return useSmart; } public void setUseSmart(boolean useSmart) { this.useSmart = useSmart; } public IKAnalyzerSolrFactory(Map<String,String> args) { super(args); assureMatchVersion(); this.setUseSmart(args.get("useSmart").toString().equals("true")); } @Override public Tokenizer create(AttributeFactory factory, Reader input) { Tokenizer _IKTokenizer = new IKTokenizer(input , this.useSmart); return _IKTokenizer; } } <fieldType name="text_ika" class="solr.TextField" > <analyzer type="index"> <tokenizer class="org.wltea.analyzer.lucene.IKAnalyzerSolrFactory" useSmart="false"/> </analyzer> <analyzer type="query"> <tokenizer class="org.wltea.analyzer.lucene.IKAnalyzerSolrFactory" useSmart="true"/> </analyzer> </fieldType>
Original issue reported on code.google.com by [email protected] on 13 Sep 2013 at 7:22
[email protected]
The text was updated successfully, but these errors were encountered:
Nice shot!
Original comment by [email protected] on 19 Nov 2013 at 8:44
Sorry, something went wrong.
楼主看到回复能否留个Email,有问题请教。
Original comment by [email protected] on 20 Nov 2013 at 8:16
好用,感谢!
Original comment by [email protected] on 29 Nov 2013 at 2:34
No branches or pull requests
Original issue reported on code.google.com by
[email protected]
on 13 Sep 2013 at 7:22The text was updated successfully, but these errors were encountered: