mirror of https://github.com/apache/lucene.git
LUCENE-6031: don't call deprecated TokenSources method (in tests)
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1642512 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
015eacf293
commit
e2ed5913cb
|
@ -82,7 +82,7 @@ public class HighlighterPhraseTest extends LuceneTestCase {
|
|||
|
||||
final TokenStream tokenStream = TokenSources
|
||||
.getTokenStream(indexReader.getTermVector(
|
||||
0, FIELD), false);
|
||||
0, FIELD));
|
||||
assertEquals(highlighter.getBestFragment(new TokenStreamConcurrent(),
|
||||
TEXT), highlighter.getBestFragment(tokenStream, TEXT));
|
||||
} finally {
|
||||
|
@ -149,7 +149,7 @@ public class HighlighterPhraseTest extends LuceneTestCase {
|
|||
assertEquals(0, position);
|
||||
final TokenStream tokenStream = TokenSources.getTokenStream(
|
||||
indexReader.getTermVector(position,
|
||||
FIELD), false);
|
||||
FIELD));
|
||||
assertEquals(highlighter.getBestFragment(new TokenStreamConcurrent(),
|
||||
TEXT), highlighter.getBestFragment(tokenStream, TEXT));
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ public class HighlighterPhraseTest extends LuceneTestCase {
|
|||
new QueryScorer(phraseQuery));
|
||||
final TokenStream tokenStream = TokenSources
|
||||
.getTokenStream(indexReader.getTermVector(
|
||||
0, FIELD), false);
|
||||
0, FIELD));
|
||||
assertEquals(
|
||||
highlighter.getBestFragment(new TokenStreamSparse(), TEXT),
|
||||
highlighter.getBestFragment(tokenStream, TEXT));
|
||||
|
@ -231,7 +231,7 @@ public class HighlighterPhraseTest extends LuceneTestCase {
|
|||
new SimpleHTMLFormatter(), new SimpleHTMLEncoder(),
|
||||
new QueryScorer(phraseQuery));
|
||||
final TokenStream tokenStream = TokenSources.getTokenStream(
|
||||
indexReader.getTermVector(0, FIELD), true);
|
||||
indexReader.getTermVector(0, FIELD));
|
||||
assertEquals("the fox <B>did</B> not <B>jump</B>", highlighter
|
||||
.getBestFragment(tokenStream, TEXT));
|
||||
} finally {
|
||||
|
@ -271,7 +271,7 @@ public class HighlighterPhraseTest extends LuceneTestCase {
|
|||
new QueryScorer(phraseQuery));
|
||||
final TokenStream tokenStream = TokenSources
|
||||
.getTokenStream(indexReader.getTermVector(
|
||||
0, FIELD), false);
|
||||
0, FIELD));
|
||||
assertEquals(
|
||||
highlighter.getBestFragment(new TokenStreamSparse(), TEXT),
|
||||
highlighter.getBestFragment(tokenStream, TEXT));
|
||||
|
|
Loading…
Reference in New Issue