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
|
final TokenStream tokenStream = TokenSources
|
||||||
.getTokenStream(indexReader.getTermVector(
|
.getTokenStream(indexReader.getTermVector(
|
||||||
0, FIELD), false);
|
0, FIELD));
|
||||||
assertEquals(highlighter.getBestFragment(new TokenStreamConcurrent(),
|
assertEquals(highlighter.getBestFragment(new TokenStreamConcurrent(),
|
||||||
TEXT), highlighter.getBestFragment(tokenStream, TEXT));
|
TEXT), highlighter.getBestFragment(tokenStream, TEXT));
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -149,7 +149,7 @@ public class HighlighterPhraseTest extends LuceneTestCase {
|
||||||
assertEquals(0, position);
|
assertEquals(0, position);
|
||||||
final TokenStream tokenStream = TokenSources.getTokenStream(
|
final TokenStream tokenStream = TokenSources.getTokenStream(
|
||||||
indexReader.getTermVector(position,
|
indexReader.getTermVector(position,
|
||||||
FIELD), false);
|
FIELD));
|
||||||
assertEquals(highlighter.getBestFragment(new TokenStreamConcurrent(),
|
assertEquals(highlighter.getBestFragment(new TokenStreamConcurrent(),
|
||||||
TEXT), highlighter.getBestFragment(tokenStream, TEXT));
|
TEXT), highlighter.getBestFragment(tokenStream, TEXT));
|
||||||
}
|
}
|
||||||
|
@ -191,7 +191,7 @@ public class HighlighterPhraseTest extends LuceneTestCase {
|
||||||
new QueryScorer(phraseQuery));
|
new QueryScorer(phraseQuery));
|
||||||
final TokenStream tokenStream = TokenSources
|
final TokenStream tokenStream = TokenSources
|
||||||
.getTokenStream(indexReader.getTermVector(
|
.getTokenStream(indexReader.getTermVector(
|
||||||
0, FIELD), false);
|
0, FIELD));
|
||||||
assertEquals(
|
assertEquals(
|
||||||
highlighter.getBestFragment(new TokenStreamSparse(), TEXT),
|
highlighter.getBestFragment(new TokenStreamSparse(), TEXT),
|
||||||
highlighter.getBestFragment(tokenStream, TEXT));
|
highlighter.getBestFragment(tokenStream, TEXT));
|
||||||
|
@ -231,7 +231,7 @@ public class HighlighterPhraseTest extends LuceneTestCase {
|
||||||
new SimpleHTMLFormatter(), new SimpleHTMLEncoder(),
|
new SimpleHTMLFormatter(), new SimpleHTMLEncoder(),
|
||||||
new QueryScorer(phraseQuery));
|
new QueryScorer(phraseQuery));
|
||||||
final TokenStream tokenStream = TokenSources.getTokenStream(
|
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
|
assertEquals("the fox <B>did</B> not <B>jump</B>", highlighter
|
||||||
.getBestFragment(tokenStream, TEXT));
|
.getBestFragment(tokenStream, TEXT));
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -271,7 +271,7 @@ public class HighlighterPhraseTest extends LuceneTestCase {
|
||||||
new QueryScorer(phraseQuery));
|
new QueryScorer(phraseQuery));
|
||||||
final TokenStream tokenStream = TokenSources
|
final TokenStream tokenStream = TokenSources
|
||||||
.getTokenStream(indexReader.getTermVector(
|
.getTokenStream(indexReader.getTermVector(
|
||||||
0, FIELD), false);
|
0, FIELD));
|
||||||
assertEquals(
|
assertEquals(
|
||||||
highlighter.getBestFragment(new TokenStreamSparse(), TEXT),
|
highlighter.getBestFragment(new TokenStreamSparse(), TEXT),
|
||||||
highlighter.getBestFragment(tokenStream, TEXT));
|
highlighter.getBestFragment(tokenStream, TEXT));
|
||||||
|
|
Loading…
Reference in New Issue