List of usage examples for org.apache.lucene.analysis.tokenattributes PackedTokenAttributeImpl PackedTokenAttributeImpl
public PackedTokenAttributeImpl()
From source file:org.elasticsearch.index.analysis.standardnumber.StandardnumberTokenFilter.java
License:Open Source License
protected void detect() throws CharacterCodingException { CharSequence term = new String(termAtt.buffer(), 0, termAtt.length()); Collection<CharSequence> variants = service.lookup(settings, term); for (CharSequence ch : variants) { if (ch != null) { PackedTokenAttributeImpl token = new PackedTokenAttributeImpl(); token.append(ch);/*from ww w. j ava 2 s. c o m*/ tokens.add(token); } } }