mirror of
https://github.com/apache/lucene.git
synced 2025-02-07 02:28:49 +00:00
Fix TestPhraseWildcardQuery.testExplain to make it less fragile.
This commit is contained in:
parent
53040984f6
commit
2fe713b348
@ -230,7 +230,8 @@ public class TestPhraseWildcardQuery extends LuceneTestCase {
|
||||
for (ScoreDoc scoreDoc : searcher.search(testQuery, MAX_DOCS).scoreDocs) {
|
||||
Explanation explanation = searcher.explain(testQuery, scoreDoc.doc);
|
||||
assertTrue(explanation.getValue().doubleValue() > 0);
|
||||
assertEquals("weight(phraseWildcard(title:\"t?e b* b*\") in 1) [AssertingSimilarity], result of:", explanation.getDescription());
|
||||
assertTrue("Unexpected explanation \"" + explanation.getDescription() + "\"",
|
||||
explanation.getDescription().startsWith("weight(phraseWildcard(title:\"t?e b* b*\")"));
|
||||
}
|
||||
|
||||
// Verify that if we call PhraseWildcardQuery.PhraseWildcardWeight.scorer() twice,
|
||||
|
Loading…
x
Reference in New Issue
Block a user