- Where Developers Learn, Share, & Build Careers
I have just typed a custom In Solr3, I can only increase the So, I came to know that I should change the I also search for some documents, but it seems that nothing is really useful in it. So, how can I work it out? Example: Thanks in advance. The best way to check for implementation is to see the source code of an existing tokenizer in Lucene eg Rann: - CharTokenizer , and I want to use it in my solar server .
TokenizerFactory and return to my tax code forming the CharTokenizer , but
TokenizerFactory < Solar4 does not exist in / code>
TokenizerFactory with the
TokenFilterFactory , but in this situation, I did not return my custom
CharTokenizer , because the parameters do not match.
The public class expands MyCustomTokenizer CharTokenizer {char anotherSpace = 24; Public MyCustomTokenizer (version matching edition, reader in) {super (in Milan version,); } Protected Boolean isTokenChar (come C) {return! Character.HisSpace (C) & amp; Amp; IsToken ((four)); } Private boolean isToken (char c) {if (c == Other Space || c == ',') {return false; } Back true; }} Public class MyCustomTokenizerFactory token filterfactor (public zero zero (map & lt; string, string & gt; args) {super.init (args); assureMatchVersion ();} @ Override public tokenstream making (token stream) {// sh * Returns the new MyCustomTokenizer (luceneMatchVersion, input) here;}}
Comments
Post a Comment