You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2013/01/03 14:29:36 UTC

svn commit: r1428338 - /lucene/dev/trunk/lucene/sandbox/src/test/org/apache/lucene/sandbox/postingshighlight/TestPostingsHighlighterRanking.java

Author: rmuir
Date: Thu Jan  3 13:29:35 2013
New Revision: 1428338

URL: http://svn.apache.org/viewvc?rev=1428338&view=rev
Log:
LUCENE-4290: use SimpleAnalyzer so we test single-word sentences too

Modified:
    lucene/dev/trunk/lucene/sandbox/src/test/org/apache/lucene/sandbox/postingshighlight/TestPostingsHighlighterRanking.java

Modified: lucene/dev/trunk/lucene/sandbox/src/test/org/apache/lucene/sandbox/postingshighlight/TestPostingsHighlighterRanking.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/sandbox/src/test/org/apache/lucene/sandbox/postingshighlight/TestPostingsHighlighterRanking.java?rev=1428338&r1=1428337&r2=1428338&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/sandbox/src/test/org/apache/lucene/sandbox/postingshighlight/TestPostingsHighlighterRanking.java (original)
+++ lucene/dev/trunk/lucene/sandbox/src/test/org/apache/lucene/sandbox/postingshighlight/TestPostingsHighlighterRanking.java Thu Jan  3 13:29:35 2013
@@ -23,6 +23,8 @@ import java.util.HashSet;
 import java.util.Locale;
 import java.util.Random;
 
+import org.apache.lucene.analysis.MockAnalyzer;
+import org.apache.lucene.analysis.MockTokenizer;
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
 import org.apache.lucene.document.FieldType;
@@ -62,7 +64,7 @@ public class TestPostingsHighlighterRank
     final int maxNumSentences = 20;
     
     Directory dir = newDirectory();
-    RandomIndexWriter iw = new RandomIndexWriter(random(), dir);
+    RandomIndexWriter iw = new RandomIndexWriter(random(), dir, new MockAnalyzer(random(), MockTokenizer.SIMPLE, true));
     Document document = new Document();
     Field id = new StringField("id", "", Field.Store.NO);
     FieldType offsetsType = new FieldType(TextField.TYPE_STORED);