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:
David Wayne Smiley 2014-11-28 13:38:13 +00:00
parent 6083352aa7
commit d439254a5a
2 changed files with 4 additions and 5 deletions

View File

@ -123,11 +123,11 @@ public class TokenSources {
if (!tpv.hasOffsets()) { if (!tpv.hasOffsets()) {
throw new IllegalArgumentException("Highlighting requires offsets from the TokenStream."); 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. // highlighters require offsets, so we insist here.
} }
return new TokenStreamFromTermPositionVector(tpv); return new TokenStreamFromTermVector(tpv);
} }
/** /**

View File

@ -43,8 +43,7 @@ import org.apache.lucene.util.UnicodeUtil;
* *
* @lucene.internal * @lucene.internal
*/ */
//TODO rename to TokenStreamFromTermVector public final class TokenStreamFromTermVector extends TokenStream {
public final class TokenStreamFromTermPositionVector extends TokenStream {
//TODO add a maxStartOffset filter, which highlighters will find handy //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 * @param vector Terms that contains the data for
* creating the TokenStream. Must have positions and/or offsets. * 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()) { if (!vector.hasPositions() && !vector.hasOffsets()) {
throw new IllegalArgumentException("The term vector needs positions and/or offsets."); throw new IllegalArgumentException("The term vector needs positions and/or offsets.");
} }