org.compass.core.lucene.engine.highlighter.support
Class TokenOrderingFilter

java.lang.Object
  extended by org.apache.lucene.analysis.TokenStream
      extended by org.apache.lucene.analysis.TokenFilter
          extended by org.compass.core.lucene.engine.highlighter.support.TokenOrderingFilter

public class TokenOrderingFilter
extends TokenFilter

Orders Tokens in a window first by their startOffset ascending. endOffset is currently ignored.

This is meant to work around fickleness in the highlighter only. It can mess up token positions and should not be used for indexing or querying.

Author:
kimchy

Field Summary
 
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
 
Constructor Summary
TokenOrderingFilter(TokenStream input, int windowSize)
           
 
Method Summary
 Token next()
           
 
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close
 
Methods inherited from class org.apache.lucene.analysis.TokenStream
next, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenOrderingFilter

public TokenOrderingFilter(TokenStream input,
                           int windowSize)
Method Detail

next

public Token next()
           throws IOException
Overrides:
next in class TokenStream
Throws:
IOException


Copyright (c) 2004-2008 The Compass Project.