mirror of https://github.com/apache/lucene.git
Fixed Junit failure due to recent change in QueryParser default behaviour. Needed to explicitly require old style of RangeQuery implementation rather than new default of RangeFilters
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@529417 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
934a56e55f
commit
1877f9e3dc
|
@ -132,7 +132,14 @@ public class HighlighterTest extends TestCase implements Formatter
|
|||
}
|
||||
public void testGetRangeFragments() throws Exception
|
||||
{
|
||||
doSearching(FIELD_NAME + ":[kannedy TO kznnedy]"); //bug?needs lower case
|
||||
String queryString=FIELD_NAME + ":[kannedy TO kznnedy]";
|
||||
|
||||
//Need to explicitly set the QueryParser property to use RangeQuery rather than RangeFilters
|
||||
QueryParser parser=new QueryParser(FIELD_NAME, new StandardAnalyzer());
|
||||
parser.setUseOldRangeQuery(true);
|
||||
query = parser.parse(queryString);
|
||||
doSearching(query);
|
||||
|
||||
doStandardHighlights();
|
||||
assertTrue("Failed to find correct number of highlights " + numHighlights + " found", numHighlights == 5);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue