lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mharw...@apache.org
Subject svn commit: r529417 - /lucene/java/trunk/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java
Date Mon, 16 Apr 2007 22:04:07 GMT
Author: mharwood
Date: Mon Apr 16 15:04:07 2007
New Revision: 529417

URL: http://svn.apache.org/viewvc?view=rev&rev=529417
Log:
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

Modified:
    lucene/java/trunk/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java

Modified: lucene/java/trunk/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java?view=diff&rev=529417&r1=529416&r2=529417
==============================================================================
--- lucene/java/trunk/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java
(original)
+++ lucene/java/trunk/contrib/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java
Mon Apr 16 15:04:07 2007
@@ -132,7 +132,14 @@
 	}
 	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);
 	}



Mime
View raw message