lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1075413 [2/2] - in /lucene/dev/trunk: lucene/ lucene/src/java/org/apache/lucene/index/ lucene/src/java/org/apache/lucene/index/codecs/preflex/ lucene/src/test/org/apache/lucene/index/ solr/example/
Date Mon, 28 Feb 2011 16:33:18 GMT
Modified: lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestIndexFileDeleter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestIndexFileDeleter.java?rev=1075413&r1=1075412&r2=1075413&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestIndexFileDeleter.java (original)
+++ lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestIndexFileDeleter.java Mon
Feb 28 16:33:16 2011
@@ -92,9 +92,10 @@ public class TestIndexFileDeleter extend
     CompoundFileReader cfsReader = new CompoundFileReader(dir, "_2.cfs");
     FieldInfos fieldInfos = new FieldInfos(cfsReader, "_2.fnm");
     int contentFieldIndex = -1;
-    for (FieldInfo fi : fieldInfos) {
+    for(i=0;i<fieldInfos.size();i++) {
+      FieldInfo fi = fieldInfos.fieldInfo(i);
       if (fi.name.equals("content")) {
-        contentFieldIndex = fi.number;
+        contentFieldIndex = i;
         break;
       }
     }

Modified: lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestPerFieldCodecSupport.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestPerFieldCodecSupport.java?rev=1075413&r1=1075412&r2=1075413&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestPerFieldCodecSupport.java
(original)
+++ lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestPerFieldCodecSupport.java
Mon Feb 28 16:33:16 2011
@@ -216,7 +216,7 @@ public class TestPerFieldCodecSupport ex
               IndexFileNames.FIELD_INFOS_EXTENSION));
       FieldInfo fieldInfo = fieldInfos.fieldInfo(field);
       assertEquals("faild for segment index: " + i, codec[i],
-          codecInfo.codecs[fieldInfo.getCodecId()]);
+          codecInfo.codecs[fieldInfo.codecId]);
     }
   }
 

Modified: lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestSegmentMerger.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestSegmentMerger.java?rev=1075413&r1=1075412&r2=1075413&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestSegmentMerger.java (original)
+++ lucene/dev/trunk/lucene/src/test/org/apache/lucene/index/TestSegmentMerger.java Mon Feb
28 16:33:16 2011
@@ -79,8 +79,8 @@ public class TestSegmentMerger extends L
     int docsMerged = merger.merge();
     assertTrue(docsMerged == 2);
     //Should be able to open a new SegmentReader against the new directory
-    SegmentReader mergedReader = SegmentReader.get(false, mergedDir, new SegmentInfo(mergedSegment,
docsMerged, mergedDir, false,
-                                                                                     merger.getSegmentCodecs(),
merger.fieldInfos()),
+    SegmentReader mergedReader = SegmentReader.get(false, mergedDir, new SegmentInfo(mergedSegment,
docsMerged, mergedDir, false, merger.fieldInfos().hasProx(),
+                                                                                     merger.getSegmentCodecs(),
merger.fieldInfos().hasVectors()),
                                                    BufferedIndexInput.BUFFER_SIZE, true,
IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
 
     assertTrue(mergedReader != null);



Mime
View raw message