org.compass.core.lucene.engine.highlighter.support
Class MultiValueTokenStream
java.lang.Object
org.apache.lucene.analysis.TokenStream
org.compass.core.lucene.engine.highlighter.support.MultiValueTokenStream
public class MultiValueTokenStream
- extends TokenStream
Helper class which creates a single TokenStream out of values from a
multi-valued field.
- Author:
- kimchy
|
Method Summary |
String |
asSingleValue()
Returns all values as a single String into which the Tokens index with
their offsets. |
Token |
next()
Returns the next token in the stream, or null at EOS. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultiValueTokenStream
public MultiValueTokenStream(String fieldName,
String[] values,
Analyzer analyzer,
boolean orderTokenOffsets)
- Constructs a TokenStream for consecutively-analyzed field values
- Parameters:
fieldName - name of the fieldvalues - array of field dataanalyzer - analyzer instance
next
public Token next()
throws IOException
- Returns the next token in the stream, or null at EOS.
- Overrides:
next in class TokenStream
- Throws:
IOException
asSingleValue
public String asSingleValue()
- Returns all values as a single String into which the Tokens index with
their offsets.
Copyright (c) 2004-2008 The Compass Project.