mirror of https://github.com/apache/lucene.git
LUCENE-6031: Rename TokenStreamFromTermPositionVector to TokenStreamFromTermVector
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1642295 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6083352aa7
commit
d439254a5a
|
@ -123,11 +123,11 @@ public class TokenSources {
|
|||
|
||||
if (!tpv.hasOffsets()) {
|
||||
throw new IllegalArgumentException("Highlighting requires offsets from the TokenStream.");
|
||||
//TokenStreamFromTermPositionVector can handle a lack of offsets if there are positions. But
|
||||
//TokenStreamFromTermVector can handle a lack of offsets if there are positions. But
|
||||
// highlighters require offsets, so we insist here.
|
||||
}
|
||||
|
||||
return new TokenStreamFromTermPositionVector(tpv);
|
||||
return new TokenStreamFromTermVector(tpv);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -43,8 +43,7 @@ import org.apache.lucene.util.UnicodeUtil;
|
|||
*
|
||||
* @lucene.internal
|
||||
*/
|
||||
//TODO rename to TokenStreamFromTermVector
|
||||
public final class TokenStreamFromTermPositionVector extends TokenStream {
|
||||
public final class TokenStreamFromTermVector extends TokenStream {
|
||||
|
||||
//TODO add a maxStartOffset filter, which highlighters will find handy
|
||||
|
||||
|
@ -68,7 +67,7 @@ public final class TokenStreamFromTermPositionVector extends TokenStream {
|
|||
* @param vector Terms that contains the data for
|
||||
* creating the TokenStream. Must have positions and/or offsets.
|
||||
*/
|
||||
public TokenStreamFromTermPositionVector(Terms vector) throws IOException {
|
||||
public TokenStreamFromTermVector(Terms vector) throws IOException {
|
||||
if (!vector.hasPositions() && !vector.hasOffsets()) {
|
||||
throw new IllegalArgumentException("The term vector needs positions and/or offsets.");
|
||||
}
|
Loading…
Reference in New Issue