lux.index.analysis
Class OffsetCharFilter

java.lang.Object
  extended by java.io.Reader
      extended by org.apache.lucene.analysis.CharFilter
          extended by org.apache.lucene.analysis.charfilter.BaseCharFilter
              extended by lux.index.analysis.OffsetCharFilter
All Implemented Interfaces:
Closeable, Readable

public class OffsetCharFilter
extends org.apache.lucene.analysis.charfilter.BaseCharFilter

exposes the offset map so it can be set externally. It seems as if it would be better to be able to reset() and reuse this? But we have to make a new BaseCharFilter for every text node.


Field Summary
 
Fields inherited from class org.apache.lucene.analysis.CharFilter
input
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
OffsetCharFilter(Reader in)
           
 
Method Summary
 void addOffset(int off, int cumulativeDiff)
           
 int read(char[] cbuf, int off, int len)
           
 
Methods inherited from class org.apache.lucene.analysis.charfilter.BaseCharFilter
addOffCorrectMap, correct, getLastCumulativeDiff
 
Methods inherited from class org.apache.lucene.analysis.CharFilter
close, correctOffset
 
Methods inherited from class java.io.Reader
mark, markSupported, read, read, read, ready, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OffsetCharFilter

public OffsetCharFilter(Reader in)
Method Detail

addOffset

public void addOffset(int off,
                      int cumulativeDiff)

read

public int read(char[] cbuf,
                int off,
                int len)
         throws IOException
Specified by:
read in class Reader
Throws:
IOException


Copyright © 2013. All Rights Reserved.