Example usage for org.apache.lucene.analysis.tokenattributes PackedTokenAttributeImpl PackedTokenAttributeImpl

List of usage examples for org.apache.lucene.analysis.tokenattributes PackedTokenAttributeImpl PackedTokenAttributeImpl

Introduction

In this page you can find the example usage for org.apache.lucene.analysis.tokenattributes PackedTokenAttributeImpl PackedTokenAttributeImpl.

Prototype

public PackedTokenAttributeImpl() 

Source Link

Document

Constructs the attribute implementation.

Usage

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);
        }
    }
}