lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gucko Gucko <gucko.gu...@googlemail.com>
Subject Exception while creating a Tokenizer
Date Wed, 12 Jun 2013 17:48:10 GMT
Hello all,

I'm trying the following code (trying to play with Tokenizers in order to
create my own Analyzer) but I'm getting an exception:

public class TokenizerTest {

public static void main(String[] args) throws IOException {

 String text = "A #revolution http://hi.com in test@test.com software
technology has 4";

 Tokenizer tokenizer = new UAX29URLEmailTokenizer(Version.LUCENE_43,

  new StringReader(text));

  TokenStream stream = new LowerCaseFilter(tokenizer);

 CharTermAttribute term = stream.addAttribute(CharTermAttribute.class);

 stream.reset();

  while( stream.incrementToken() ) {

 System.out.println( term );

 }


 }

}



Exception:

Exception in thread "main" java.lang.NoSuchMethodError:
org.apache.lucene.util.ArrayUtil.getNextSize(I)I

at
org.apache.lucene.analysis.tokenattributes.TermAttributeImpl.initTermBuffer(
TermAttributeImpl.java:142)

at org.apache.lucene.analysis.tokenattributes.TermAttributeImpl.termBuffer(
TermAttributeImpl.java:92)

at org.apache.lucene.analysis.LowerCaseFilter.incrementToken(
LowerCaseFilter.java:39)

 at tests.TokenizerTest.main(TokenizerTest.java:23)

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message