List of usage examples for org.apache.lucene.analysis.tokenattributes PackedTokenAttributeImpl buffer
@Override public final char[] buffer()
From source file:org.alfresco.repo.search.impl.lucene.analysis.MLTokenDuplicator.java
License:Open Source License
@Override public final boolean incrementToken() throws IOException { clearAttributes();//from w ww. ja v a 2 s . c om PackedTokenAttributeImpl next = next(); if (next == null) { return false; } termAtt.copyBuffer(next.buffer(), 0, next.length()); offsetAtt.setOffset(next.startOffset(), next.endOffset()); typeAtt.setType(next.type()); posIncAtt.setPositionIncrement(next.getPositionIncrement()); return true; }
From source file:org.alfresco.repo.search.impl.lucene.analysis.MLTokenDuplicator.java
License:Open Source License
private String termText(PackedTokenAttributeImpl token) { return new String(token.buffer(), 0, token.length()); }
From source file:org.alfresco.repo.search.impl.lucene.analysis.PathTokenFilter.java
License:Open Source License
@Override public final boolean incrementToken() throws IOException { clearAttributes();/*from w w w. j av a2 s . c o m*/ PackedTokenAttributeImpl next = next(); if (next == null) { return false; } termAtt.copyBuffer(next.buffer(), 0, next.length()); offsetAtt.setOffset(correctOffset(next.startOffset()), correctOffset(next.endOffset())); typeAtt.setType(next.type()); posIncAtt.setPositionIncrement(next.getPositionIncrement()); return true; }