lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r825133 - in /lucene/java/branches/flex_1458: ./ contrib/ contrib/analyzers/common/src/java/org/apache/lucene/analysis/ar/ contrib/analyzers/common/src/resources/org/apache/lucene/analysis/ar/ contrib/instantiated/src/java/org/apache/lucene...
Date Wed, 14 Oct 2009 13:44:09 GMT
Author: markrmiller
Date: Wed Oct 14 13:44:08 2009
New Revision: 825133

URL: http://svn.apache.org/viewvc?rev=825133&view=rev
Log:
merge up to r825112

Added:
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/TestPrefixInBooleanQuery.java
      - copied unchanged from r825114, lucene/java/trunk/src/test/org/apache/lucene/search/TestPrefixInBooleanQuery.java
Removed:
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexCommitPoint.java
Modified:
    lucene/java/branches/flex_1458/   (props changed)
    lucene/java/branches/flex_1458/CHANGES.txt
    lucene/java/branches/flex_1458/contrib/CHANGES.txt
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ar/ArabicAnalyzer.java
    lucene/java/branches/flex_1458/contrib/analyzers/common/src/resources/org/apache/lucene/analysis/ar/stopwords.txt
    lucene/java/branches/flex_1458/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndexReader.java
    lucene/java/branches/flex_1458/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestEmptyIndex.java
    lucene/java/branches/flex_1458/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java
    lucene/java/branches/flex_1458/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java
    lucene/java/branches/flex_1458/contrib/memory/src/test/org/apache/lucene/index/memory/PatternAnalyzerTest.java
    lucene/java/branches/flex_1458/contrib/misc/src/test/org/apache/lucene/index/TestFieldNormModifier.java
    lucene/java/branches/flex_1458/contrib/misc/src/test/org/apache/lucene/misc/TestLengthNormModifier.java
    lucene/java/branches/flex_1458/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestDistance.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/CheckIndex.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DirectoryReader.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexCommit.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexReader.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexWriter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/MultiReader.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/SegmentReader.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/SnapshotDeletionPolicy.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/Term.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/Scorer.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java   (props changed)
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/document/TestDateTools.java   (contents, props changed)
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/document/TestNumberTools.java   (props changed)
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/DocHelper.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java   (props changed)
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestConcurrentMergeScheduler.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestDoc.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestDocumentWriter.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexReaderReopen.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriter.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriterDelete.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestMultiLevelSkipList.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestMultiReader.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestPayloads.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestSegmentMerger.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestSegmentReader.java
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestTermVectorsReader.java

Propchange: lucene/java/branches/flex_1458/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct 14 13:44:08 2009
@@ -1,3 +1,4 @@
 /lucene/java/branches/lucene_2_4:748824
 /lucene/java/branches/lucene_2_9:817269-818600
 /lucene/java/branches/lucene_2_9_back_compat_tests:818601-821336
+/lucene/java/trunk:824912-825114

Modified: lucene/java/branches/flex_1458/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/CHANGES.txt?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/CHANGES.txt (original)
+++ lucene/java/branches/flex_1458/CHANGES.txt Wed Oct 14 13:44:08 2009
@@ -5,6 +5,11 @@
 
 Changes in backwards compatibility policy
 
+* LUCENE-1979: Change return type of SnapshotDeletionPolicy#snapshot()
+  from IndexCommitPoint to IndexCommit. Code that uses this method
+  needs to be recompiled against Lucene 3.0 in order to work. The previously
+  deprecated IndexCommitPoint is also removed. (Michael Busch)
+
 Changes in runtime behavior
 
 API Changes
@@ -67,6 +72,9 @@
 
 * LUCENE-944: Remove deprecated methods in BooleanQuery. (Michael Busch)
 
+* LUCENE-1979: Remove remaining deprecations from indexer package.
+  (Michael Busch)
+
 Bug fixes
 
 * LUCENE-1951: When the text provided to WildcardQuery has no wildcard
@@ -75,6 +83,10 @@
   wildcard is form "foo*", for slightly faster performance. (Robert
   Muir via Mike McCandless)
 
+* LUCENE-1974: Fixed nasty bug in BooleanQuery (when it used
+  BooleanScorer for scoring), whereby some matching documents fail to
+  be collected.  (Fulin Tang via Mike McCandless)
+
 New features
 
 * LUCENE-1933: Provide a convenience AttributeFactory that creates a

Modified: lucene/java/branches/flex_1458/contrib/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/CHANGES.txt?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/CHANGES.txt (original)
+++ lucene/java/branches/flex_1458/contrib/CHANGES.txt Wed Oct 14 13:44:08 2009
@@ -10,6 +10,10 @@
 
 Changes in runtime behavior
 
+ * LUCENE-1966: Modified and cleaned the default Arabic stopwords list used
+   by ArabicAnalyzer. You'll need to fully re-index any previously created 
+   indexes.  (Basem Narmok via Robert Muir)
+
  * LUCENE-1963: ArabicAnalyzer now lowercases before checking the stopword
    list. This has no effect on Arabic text, but if you are using a custom
    stopword list that contains some non-Arabic words, you'll need to fully

Modified: lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ar/ArabicAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ar/ArabicAnalyzer.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ar/ArabicAnalyzer.java (original)
+++ lucene/java/branches/flex_1458/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ar/ArabicAnalyzer.java Wed Oct 14 13:44:08 2009
@@ -148,6 +148,7 @@
   public final TokenStream tokenStream(String fieldName, Reader reader) {
     TokenStream result = new ArabicLetterTokenizer( reader );
     result = new LowerCaseFilter(result);
+    // the order here is important: the stopword list is not normalized!
     result = new StopFilter( result, stoptable );
     result = new ArabicNormalizationFilter( result );
     result = new ArabicStemFilter( result );
@@ -175,6 +176,7 @@
       streams = new SavedStreams();
       streams.source = new ArabicLetterTokenizer(reader);
       streams.result = new LowerCaseFilter(streams.source);
+      // the order here is important: the stopword list is not normalized!
       streams.result = new StopFilter(streams.result, stoptable);
       streams.result = new ArabicNormalizationFilter(streams.result);
       streams.result = new ArabicStemFilter(streams.result);

Modified: lucene/java/branches/flex_1458/contrib/analyzers/common/src/resources/org/apache/lucene/analysis/ar/stopwords.txt
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/analyzers/common/src/resources/org/apache/lucene/analysis/ar/stopwords.txt?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/analyzers/common/src/resources/org/apache/lucene/analysis/ar/stopwords.txt (original)
+++ lucene/java/branches/flex_1458/contrib/analyzers/common/src/resources/org/apache/lucene/analysis/ar/stopwords.txt Wed Oct 14 13:44:08 2009
@@ -1,161 +1,123 @@
 # This file was created by Jacques Savoy and is distributed under the BSD license.
 # See http://members.unine.ch/jacques.savoy/clef/index.html.
 # Also see http://www.opensource.org/licenses/bsd-license.html
+# Cleaned on October 11, 2009 (not normalized, so use before normalization)
+من
+ومن
+منها
+منه
+في
+وفي
+فيها
+فيه
+و
+ف
+ثم
+او
+أو
 ب
+بها
+به
 ا
 أ
-،
-عبد
-عدم
-عام
-عاما
+اى
+اي
+أي
+أى
+لا
+ولا
+الا
+ألا
+إلا
+لكن
+ما
+وما
+كما
+فما
 عن
-عند
-عندما
-على
-عليه
-عليها
-تم
-ضد
-بعد
-بعض
-اعادة
-اعلن
-اعلنت
-بسبب
-حتى
-اتفاق
+مع
 اذا
-احد
-اثر
-اجتماع
-اطار
-اربعة
-اخرى
-بان
-ابو
-اجل
-غير
-اطلاق
-بشكل
-حاليا
-بن
-به
-ثم
-اف
+إذا
 ان
-او
-اي
-بها
-جهة
-حيث
-اكد
-الا
-اما
-العام
-السابق
-السلام
-التعاون
+أن
+إن
+انها
+أنها
+إنها
+انه
+أنه
+إنه
+بان
+بأن
+فان
+فأن
+وان
+وأن
+وإن
 التى
 التي
-اكثر
-ايضا
-الذاتي
-الاخيرة
-الثاني
-الثانية
 الذى
 الذي
-الان
-خلال
-حوالى
 الذين
-الحكم
-الاول
-الاولى
-بين
-ذلك
 الى
-انه
-ضمن
-انها
-جميع
-الماضي
-المقبل
-ف
-و
-و6
-قد
-لا
-ما
-مع
-هذا
-واضاف
-واضافت
-فان
-قبل
-كان
-لدى
-نحو
-هذه
-وان
-يذكر
-كانت
-واوضح
-فى
-في
+الي
+إلى
+إلي
+على
+عليها
+عليه
+اما
+أما
+إما
+ايضا
+أيضا
 كل
+وكل
 لم
+ولم
 لن
-له
-من
-هو
+ولن
+هى
 هي
-كما
+هو
+وهى
+وهي
+وهو
+فهى
+فهي
+فهو
+انت
+أنت
+لك
 لها
-منذ
-ولا
-مقابل
+له
+هذه
+هذا
+تلك
+ذلك
 هناك
-وكان
-وكانت
-فيه
-لكن
-وفي
-ولم
-ومن
-وهو
-وهي
-فيها
-منها
+كانت
+كان
 يكون
-أخرى
-إذا
-أربعة
-إطار
-إعادة
-أعلن
-أعلنت
-أف
-أكثر
-أكد
-إلا
-الأخيرة
+تكون
+وكانت
+وكان
+غير
+بعض
+قد
+نحو
+بين
+بينما
+منذ
+ضمن
+حيث
+الان
 الآن
-الأول
-الأولى
-إلى
-أما
-أن
-إن
-إنه
-أنه
-أنها
-إنها
-أو
-اى
-أي
-أى
-أيضا
-بأن
-فإن
+خلال
+بعد
+قبل
+حتى
+عند
+عندما
+لدى
+جميع

Modified: lucene/java/branches/flex_1458/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndexReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndexReader.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndexReader.java (original)
+++ lucene/java/branches/flex_1458/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndexReader.java Wed Oct 14 13:44:08 2009
@@ -144,7 +144,7 @@
     deletedDocuments.clear();
   }
 
-  protected void doCommit() throws IOException {
+  protected void doCommit(Map commitUserData) throws IOException {
     // todo: read/write lock
 
     boolean updated = false;

Modified: lucene/java/branches/flex_1458/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestEmptyIndex.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestEmptyIndex.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestEmptyIndex.java (original)
+++ lucene/java/branches/flex_1458/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestEmptyIndex.java Wed Oct 14 13:44:08 2009
@@ -71,8 +71,7 @@
   private void testNorms(IndexReader r) throws IOException {
     byte[] norms;
     norms = r.norms("foo");
-    if (!r.getDisableFakeNorms()) {
-      assertNotNull(norms);
+    if (norms != null) {
       assertEquals(0, norms.length);
       norms = new byte[10];
       Arrays.fill(norms, (byte)10);

Modified: lucene/java/branches/flex_1458/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java (original)
+++ lucene/java/branches/flex_1458/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java Wed Oct 14 13:44:08 2009
@@ -253,7 +253,7 @@
       byte[] aprioriNorms = aprioriReader.norms((String) field);
       byte[] testNorms = testReader.norms((String) field);
 
-      if (!aprioriReader.getDisableFakeNorms()) {
+      if (aprioriNorms != null) {
         assertEquals(aprioriNorms.length, testNorms.length);
 
         for (int i = 0; i < aprioriNorms.length; i++) {

Modified: lucene/java/branches/flex_1458/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java (original)
+++ lucene/java/branches/flex_1458/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java Wed Oct 14 13:44:08 2009
@@ -1363,7 +1363,7 @@
       throw new UnsupportedOperationException();
     }
   
-    protected void doCommit() {
+    protected void doCommit(Map commitUserData) {
       if (DEBUG) System.err.println("MemoryIndexReader.doCommit");
     }
   

Modified: lucene/java/branches/flex_1458/contrib/memory/src/test/org/apache/lucene/index/memory/PatternAnalyzerTest.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/memory/src/test/org/apache/lucene/index/memory/PatternAnalyzerTest.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/memory/src/test/org/apache/lucene/index/memory/PatternAnalyzerTest.java (original)
+++ lucene/java/branches/flex_1458/contrib/memory/src/test/org/apache/lucene/index/memory/PatternAnalyzerTest.java Wed Oct 14 13:44:08 2009
@@ -17,239 +17,118 @@
  * limitations under the License.
  */
 
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileInputStream;
 import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.StringReader;
-import java.nio.ByteBuffer;
-import java.nio.charset.Charset;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
+import java.util.Arrays;
 import java.util.regex.Pattern;
 
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.analysis.LetterTokenizer;
-import org.apache.lucene.analysis.LowerCaseFilter;
+import org.apache.lucene.analysis.BaseTokenStreamTestCase;
 import org.apache.lucene.analysis.StopAnalyzer;
-import org.apache.lucene.analysis.StopFilter;
-import org.apache.lucene.analysis.Token;
 import org.apache.lucene.analysis.TokenStream;
-import org.apache.lucene.analysis.WhitespaceTokenizer;
-import org.apache.lucene.analysis.tokenattributes.*;
 
 /**
-Verifies that Lucene PatternAnalyzer and normal Lucene Analyzers have the same behaviour,
-returning the same results for any given free text.
-Runs a set of texts against a tokenizers/analyzers
-Can also be used as a simple benchmark.
-<p>
-Example usage:
-<pre>
-cd lucene-cvs
-java org.apache.lucene.index.memory.PatternAnalyzerTest 1 1 patluc 1 2 2 *.txt *.xml docs/*.html src/java/org/apache/lucene/index/*.java xdocs/*.xml ../nux/samples/data/*.xml
-</pre>
-
-with WhitespaceAnalyzer problems can be found; These are not bugs but questionable 
-Lucene features: CharTokenizer.MAX_WORD_LEN = 255.
-Thus the PatternAnalyzer produces correct output, whereas the WhitespaceAnalyzer 
-silently truncates text, and so the comparison results in assertEquals() don't match up. 
-
-TODO: Convert to new TokenStream API!
-*/
-public class PatternAnalyzerTest extends LuceneTestCase {
-  
-  /** Runs the tests and/or benchmark */
-  public static void main(String[] args) throws Throwable {
-    new PatternAnalyzerTest().run(args);    
-  }
-  
-  public void testMany() throws Throwable {
-//    String[] files = MemoryIndexTest.listFiles(new String[] {
-//      "*.txt", "*.html", "*.xml", "xdocs/*.xml", 
-//      "src/test/org/apache/lucene/queryParser/*.java",
-//      "src/org/apache/lucene/index/memory/*.java",
-//    });
-    String[] files = MemoryIndexTest.listFiles(new String[] {
-      "../../*.txt", "../../*.html", "../../*.xml", "../../xdocs/*.xml", 
-      "../../src/test/org/apache/lucene/queryParser/*.java",
-      "src/java/org/apache/lucene/index/memory/*.java",
-    });
-    System.out.println("files = " + java.util.Arrays.asList(files));
-    String[] xargs = new String[] {
-      "1", "1", "patluc", "1", "2", "2",
-    };
-    String[] args = new String[xargs.length + files.length];
-    System.arraycopy(xargs, 0, args, 0, xargs.length);
-    System.arraycopy(files, 0, args, xargs.length, files.length);
-    run(args);
-  }
-  
-  private void run(String[] args) throws Throwable {
-    int k = -1;
-    
-    int iters = 1;
-    if (args.length > ++k) iters = Math.max(1, Integer.parseInt(args[k]));
-    
-    int runs = 1;
-    if (args.length > ++k) runs = Math.max(1, Integer.parseInt(args[k]));
-    
-    String cmd = "patluc";
-    if (args.length > ++k) cmd = args[k];
-    boolean usePattern = cmd.indexOf("pat") >= 0;
-    boolean useLucene  = cmd.indexOf("luc") >= 0;
-    
-    int maxLetters = 1; // = 2: CharTokenizer.MAX_WORD_LEN issue; see class javadoc
-    if (args.length > ++k) maxLetters = Integer.parseInt(args[k]);
-    
-    int maxToLower = 2;
-    if (args.length > ++k) maxToLower = Integer.parseInt(args[k]);
-
-    int maxStops = 2;
-    if (args.length > ++k) maxStops = Integer.parseInt(args[k]);
-    
-    File[] files = new File[] {new File("CHANGES.txt"), new File("LICENSE.txt") };
-    if (args.length > ++k) {
-      files = new File[args.length - k];
-      for (int i=k; i < args.length; i++) {
-        files[i-k] = new File(args[i]);
-      }
-    }
-    
-    for (int iter=0; iter < iters; iter++) {
-      System.out.println("\n########### iteration=" + iter);
-      long start = System.currentTimeMillis();            
-      long bytes = 0;
-      
-      for (int i=0; i < files.length; i++) {
-        File file = files[i];
-        if (!file.exists() || file.isDirectory()) continue; // ignore
-        bytes += file.length();
-        String text = toString(new FileInputStream(file), null);
-        System.out.println("\n*********** FILE=" + file);
-
-        for (int letters=0; letters < maxLetters; letters++) {
-          boolean lettersOnly = letters == 0;
-          
-          for (int stops=0; stops < maxStops; stops++) {
-            Set stopWords = null;
-            if (stops != 0) stopWords = StopAnalyzer.ENGLISH_STOP_WORDS_SET;
-                
-            for (int toLower=0; toLower < maxToLower; toLower++) {
-              boolean toLowerCase = toLower != 0;
-                
-              for (int run=0; run < runs; run++) {
-                TokenStream tokens1 = null; TokenStream tokens2 = null;
-                try {
-                  if (usePattern) tokens1 = patternTokenStream(text, lettersOnly, toLowerCase, stopWords);
-                  if (useLucene) tokens2 = luceneTokenStream(text, lettersOnly, toLowerCase, stopWords);          
-                  if (usePattern && useLucene) {
-                    final TermAttribute termAtt1 = tokens1.addAttribute(TermAttribute.class),
-                      termAtt2 = tokens2.addAttribute(TermAttribute.class);
-                    final OffsetAttribute offsetAtt1 = tokens1.addAttribute(OffsetAttribute.class),
-                      offsetAtt2 = tokens2.addAttribute(OffsetAttribute.class);
-                    final PositionIncrementAttribute posincrAtt1 = tokens1.addAttribute(PositionIncrementAttribute.class),
-                      posincrAtt2 = tokens2.addAttribute(PositionIncrementAttribute.class);
-                    while (tokens1.incrementToken()) {
-                      assertTrue(tokens2.incrementToken());
-                      assertEquals(termAtt1, termAtt2);
-                      assertEquals(offsetAtt1, offsetAtt2);
-                      assertEquals(posincrAtt1, posincrAtt2);
-                    }
-                    assertFalse(tokens2.incrementToken());
-                    tokens1.end(); tokens1.close();
-                    tokens2.end(); tokens2.close();
-                  }
-                } catch (Throwable t) {
-                  if (t instanceof OutOfMemoryError) t.printStackTrace();
-                  System.out.println("fatal error at file=" + file + ", letters="+ lettersOnly + ", toLowerCase=" + toLowerCase + ", stopwords=" + (stopWords != null ? "english" : "none"));
-                  throw t;
-                }
-              }
-            }
-          }
-        }
-        long end = System.currentTimeMillis();
-        System.out.println("\nsecs = " + ((end-start)/1000.0f));
-        System.out.println("files/sec= " + 
-            (1.0f * runs * maxLetters * maxToLower * maxStops * files.length 
-            / ((end-start)/1000.0f)));
-        float mb = (1.0f * bytes * runs * maxLetters * maxToLower * maxStops) / (1024.0f * 1024.0f);
-        System.out.println("MB/sec = " + (mb / ((end-start)/1000.0f)));
-      }
-    }
-    
-    if (usePattern && useLucene) 
-      System.out.println("No bug found. done.");
-    else 
-      System.out.println("Done benchmarking (without checking correctness).");
-  }
+ * Verifies the behavior of PatternAnalyzer.
+ */
+public class PatternAnalyzerTest extends BaseTokenStreamTestCase {
 
-  private TokenStream patternTokenStream(String text, boolean letters, boolean toLowerCase, Set stopWords) {
-    Pattern pattern;
-    if (letters) 
-      pattern = PatternAnalyzer.NON_WORD_PATTERN;
-    else               
-      pattern = PatternAnalyzer.WHITESPACE_PATTERN;
-    PatternAnalyzer analyzer = new PatternAnalyzer(pattern, toLowerCase, stopWords);
-    return analyzer.tokenStream("", text);
-  }
-  
-  private TokenStream luceneTokenStream(String text, boolean letters, boolean toLowerCase, Set stopWords) {
-    TokenStream stream;
-    if (letters) 
-      stream = new LetterTokenizer(new StringReader(text));
-    else
-      stream = new WhitespaceTokenizer(new StringReader(text));
-    if (toLowerCase)  stream = new LowerCaseFilter(stream);
-    if (stopWords != null) stream = new StopFilter(stream, stopWords);
-    return stream;            
-  }
-  
-  // trick to detect default platform charset
-  private static final Charset DEFAULT_PLATFORM_CHARSET = 
-    Charset.forName(new InputStreamReader(new ByteArrayInputStream(new byte[0])).getEncoding());  
-  
-  // the following utility methods below are copied from Apache style Nux library - see http://dsd.lbl.gov/nux
-  private static String toString(InputStream input, Charset charset) throws IOException {
-    if (charset == null) charset = DEFAULT_PLATFORM_CHARSET;      
-    byte[] data = toByteArray(input);
-    return charset.decode(ByteBuffer.wrap(data)).toString();
-  }
-  
-  private static byte[] toByteArray(InputStream input) throws IOException {
-    try {
-      // safe and fast even if input.available() behaves weird or buggy
-      int len = Math.max(256, input.available());
-      byte[] buffer = new byte[len];
-      byte[] output = new byte[len];
-      
-      len = 0;
-      int n;
-      while ((n = input.read(buffer)) >= 0) {
-        if (len + n > output.length) { // grow capacity
-          byte tmp[] = new byte[Math.max(output.length << 1, len + n)];
-          System.arraycopy(output, 0, tmp, 0, len);
-          System.arraycopy(buffer, 0, tmp, len, n);
-          buffer = output; // use larger buffer for future larger bulk reads
-          output = tmp;
-        } else {
-          System.arraycopy(buffer, 0, output, len, n);
-        }
-        len += n;
-      }
-
-      if (len == output.length) return output;
-      buffer = null; // help gc
-      buffer = new byte[len];
-      System.arraycopy(output, 0, buffer, 0, len);
-      return buffer;
-    } finally {
-      if (input != null) input.close();
-    }
+  /**
+   * Test PatternAnalyzer when it is configured with a non-word pattern.
+   * Behavior can be similar to SimpleAnalyzer (depending upon options)
+   */
+  public void testNonWordPattern() throws IOException {
+    // Split on non-letter pattern, do not lowercase, no stopwords
+    PatternAnalyzer a = new PatternAnalyzer(PatternAnalyzer.NON_WORD_PATTERN,
+        false, null);
+    check(a, "The quick brown Fox,the abcd1234 (56.78) dc.", new String[] {
+        "The", "quick", "brown", "Fox", "the", "abcd", "dc" });
+
+    // split on non-letter pattern, lowercase, english stopwords
+    PatternAnalyzer b = new PatternAnalyzer(PatternAnalyzer.NON_WORD_PATTERN,
+        true, StopAnalyzer.ENGLISH_STOP_WORDS_SET);
+    check(b, "The quick brown Fox,the abcd1234 (56.78) dc.", new String[] {
+        "quick", "brown", "fox", "abcd", "dc" });
+  }
+
+  /**
+   * Test PatternAnalyzer when it is configured with a whitespace pattern.
+   * Behavior can be similar to WhitespaceAnalyzer (depending upon options)
+   */
+  public void testWhitespacePattern() throws IOException {
+    // Split on whitespace patterns, do not lowercase, no stopwords
+    PatternAnalyzer a = new PatternAnalyzer(PatternAnalyzer.WHITESPACE_PATTERN,
+        false, null);
+    check(a, "The quick brown Fox,the abcd1234 (56.78) dc.", new String[] {
+        "The", "quick", "brown", "Fox,the", "abcd1234", "(56.78)", "dc." });
+
+    // Split on whitespace patterns, lowercase, english stopwords
+    PatternAnalyzer b = new PatternAnalyzer(PatternAnalyzer.WHITESPACE_PATTERN,
+        true, StopAnalyzer.ENGLISH_STOP_WORDS_SET);
+    check(b, "The quick brown Fox,the abcd1234 (56.78) dc.", new String[] {
+        "quick", "brown", "fox,the", "abcd1234", "(56.78)", "dc." });
+  }
+
+  /**
+   * Test PatternAnalyzer when it is configured with a custom pattern. In this
+   * case, text is tokenized on the comma ","
+   */
+  public void testCustomPattern() throws IOException {
+    // Split on comma, do not lowercase, no stopwords
+    PatternAnalyzer a = new PatternAnalyzer(Pattern.compile(","), false, null);
+    check(a, "Here,Are,some,Comma,separated,words,", new String[] { "Here",
+        "Are", "some", "Comma", "separated", "words" });
+
+    // split on comma, lowercase, english stopwords
+    PatternAnalyzer b = new PatternAnalyzer(Pattern.compile(","), true,
+        StopAnalyzer.ENGLISH_STOP_WORDS_SET);
+    check(b, "Here,Are,some,Comma,separated,words,", new String[] { "here",
+        "some", "comma", "separated", "words" });
+  }
+
+  /**
+   * Test PatternAnalyzer against a large document.
+   */
+  public void testHugeDocument() throws IOException {
+    StringBuilder document = new StringBuilder();
+    // 5000 a's
+    char largeWord[] = new char[5000];
+    Arrays.fill(largeWord, 'a');
+    document.append(largeWord);
+
+    // a space
+    document.append(' ');
+
+    // 2000 b's
+    char largeWord2[] = new char[2000];
+    Arrays.fill(largeWord2, 'b');
+    document.append(largeWord2);
+
+    // Split on whitespace patterns, do not lowercase, no stopwords
+    PatternAnalyzer a = new PatternAnalyzer(PatternAnalyzer.WHITESPACE_PATTERN,
+        false, null);
+    check(a, document.toString(), new String[] { new String(largeWord),
+        new String(largeWord2) });
+  }
+
+  /**
+   * Verify the analyzer analyzes to the expected contents. For PatternAnalyzer,
+   * several methods are verified:
+   * <ul>
+   * <li>Analysis with a normal Reader
+   * <li>Analysis with a FastStringReader
+   * <li>Analysis with a String
+   * </ul>
+   */
+  private void check(PatternAnalyzer analyzer, String document,
+      String expected[]) throws IOException {
+    // ordinary analysis of a Reader
+    assertAnalyzesTo(analyzer, document, expected);
+
+    // analysis with a "FastStringReader"
+    TokenStream ts = analyzer.tokenStream("dummy",
+        new PatternAnalyzer.FastStringReader(document));
+    assertTokenStreamContents(ts, expected);
+
+    // analysis of a String, uses PatternAnalyzer.tokenStream(String, String)
+    TokenStream ts2 = analyzer.tokenStream("dummy", document);
+    assertTokenStreamContents(ts2, expected);
   }
-  
-}
\ No newline at end of file
+}

Modified: lucene/java/branches/flex_1458/contrib/misc/src/test/org/apache/lucene/index/TestFieldNormModifier.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/misc/src/test/org/apache/lucene/index/TestFieldNormModifier.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/misc/src/test/org/apache/lucene/index/TestFieldNormModifier.java (original)
+++ lucene/java/branches/flex_1458/contrib/misc/src/test/org/apache/lucene/index/TestFieldNormModifier.java Wed Oct 14 13:44:08 2009
@@ -92,13 +92,7 @@
     
     // sanity check, norms should all be 1
     assertTrue("Whoops we have norms?", !r.hasNorms("nonorm"));
-    if (!r.getDisableFakeNorms()) {
-      for (int i = 0; i< norms.length; i++) {
-        assertEquals(""+i, DEFAULT_NORM, norms[i]);
-      }
-    } else {
-      assertNull(norms);
-    }
+    assertNull(norms);
     
     r.close();
     
@@ -114,13 +108,7 @@
     
     norms = r.norms("nonorm");
     assertTrue("Whoops we have norms?", !r.hasNorms("nonorm"));
-    if (!r.getDisableFakeNorms()) {
-      for (int i = 0; i< norms.length; i++) {
-        assertEquals(""+i, DEFAULT_NORM, norms[i]);
-      }
-    } else {
-      assertNull(norms);
-    }
+    assertNull(norms);
 
     r.close();
   }

Modified: lucene/java/branches/flex_1458/contrib/misc/src/test/org/apache/lucene/misc/TestLengthNormModifier.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/misc/src/test/org/apache/lucene/misc/TestLengthNormModifier.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/misc/src/test/org/apache/lucene/misc/TestLengthNormModifier.java (original)
+++ lucene/java/branches/flex_1458/contrib/misc/src/test/org/apache/lucene/misc/TestLengthNormModifier.java Wed Oct 14 13:44:08 2009
@@ -98,13 +98,7 @@
 
 	// sanity check, norms should all be 1
 	assertTrue("Whoops we have norms?", !r.hasNorms("nonorm"));
-        if (!r.getDisableFakeNorms()) {
-          for (int i = 0; i< norms.length; i++) {
-	    assertEquals(""+i, DEFAULT_NORM, norms[i]);
-          }
-        } else {
-          assertNull(norms);
-        }
+	assertNull(norms);
 
 	r.close();
 	
@@ -120,13 +114,7 @@
 	
 	norms = r.norms("nonorm");
 	assertTrue("Whoops we have norms?", !r.hasNorms("nonorm"));
-        if (!r.getDisableFakeNorms()) {
-          for (int i = 0; i< norms.length; i++) {
-	    assertEquals(""+i, DEFAULT_NORM, norms[i]);
-          }
-        } else {
-          assertNull(norms);
-        }
+  assertNull(norms);
 
 	r.close();
 	

Modified: lucene/java/branches/flex_1458/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestDistance.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestDistance.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestDistance.java (original)
+++ lucene/java/branches/flex_1458/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestDistance.java Wed Oct 14 13:44:08 2009
@@ -94,7 +94,7 @@
     addPoint(writer,"Iota Club and Cafe",38.8890000,-77.0923000);
     addPoint(writer,"Hilton Washington Embassy Row",38.9103000,-77.0451000);
     addPoint(writer,"HorseFeathers, Bar & Grill", 39.01220000000001, -77.3942);
-    writer.flush();
+    writer.commit();
   }
 
   public void testLatLongFilterOnDeletedDocs() throws Exception {

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/CheckIndex.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/CheckIndex.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/CheckIndex.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/CheckIndex.java Wed Oct 14 13:44:08 2009
@@ -273,23 +273,6 @@
       infoStream.println(msg);
   }
 
-  /** Returns true if index is clean, else false. 
-   *  @deprecated Please instantiate a CheckIndex and then use {@link #checkIndex()} instead */
-  public static boolean check(Directory dir, boolean doFix) throws IOException {
-    return check(dir, doFix, null);
-  }
-
-  /** Returns true if index is clean, else false.
-   *  @deprecated Please instantiate a CheckIndex and then use {@link #checkIndex(List)} instead */
-  public static boolean check(Directory dir, boolean doFix, List onlySegments) throws IOException {
-    CheckIndex checker = new CheckIndex(dir);
-    Status status = checker.checkIndex(onlySegments);
-    if (doFix && !status.clean)
-      checker.fixIndex(status);
-
-    return status.clean;
-  }
-
   /** Returns a {@link Status} instance detailing
    *  the state of the index.
    *
@@ -478,7 +461,7 @@
         }
         if (infoStream != null)
           infoStream.print("    test: open reader.........");
-        reader = SegmentReader.get(info);
+        reader = SegmentReader.get(true, info, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
 
         segInfoStat.openReaderPassed = true;
 

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DirectoryReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DirectoryReader.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DirectoryReader.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DirectoryReader.java Wed Oct 14 13:44:08 2009
@@ -485,7 +485,6 @@
       // the future we could have write make some effort to
       // detect that no changes have occurred
       IndexReader reader = writer.getReader();
-      reader.setDisableFakeNorms(getDisableFakeNorms());
       return reader;
     }
 
@@ -541,7 +540,6 @@
     } else {
       reader = new DirectoryReader(directory, infos, subReaders, starts, normsCache, false, doClone, termInfosIndexDivisor, null);
     }
-    reader.setDisableFakeNorms(getDisableFakeNorms());
     return reader;
   }
 
@@ -669,18 +667,13 @@
   }
 
   private byte[] ones;
-  private byte[] fakeNorms() {
-    if (ones==null) ones=SegmentReader.createFakeNorms(maxDoc());
-    return ones;
-  }
-
   public synchronized byte[] norms(String field) throws IOException {
     ensureOpen();
     byte[] bytes = (byte[])normsCache.get(field);
     if (bytes != null)
       return bytes;          // cache hit
     if (!hasNorms(field))
-      return getDisableFakeNorms() ? null : fakeNorms();
+      return null;
 
     bytes = new byte[maxDoc()];
     for (int i = 0; i < subReaders.length; i++)
@@ -797,11 +790,6 @@
     }
   }
 
-  /** @deprecated  */
-  protected void doCommit() throws IOException {
-    doCommit(null);
-  }
-
   /**
    * Commit changes resulting from delete, undeleteAll, or setNorm operations
    * <p/>
@@ -950,12 +938,6 @@
     return subReaders;
   }
 
-  public void setDisableFakeNorms(boolean disableFakeNorms) {
-    super.setDisableFakeNorms(disableFakeNorms);
-    for (int i = 0; i < subReaders.length; i++)
-        subReaders[i].setDisableFakeNorms(disableFakeNorms);
-  }
-
   /** Returns the directory this index resides in. */
   public Directory directory() {
     // Don't ensureOpen here -- in certain cases, when a

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexCommit.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexCommit.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexCommit.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexCommit.java Wed Oct 14 13:44:08 2009
@@ -41,7 +41,7 @@
  * may suddenly change. </p>
 */
 
-public abstract class IndexCommit implements IndexCommitPoint {
+public abstract class IndexCommit {
 
   /**
    * Get the segments file (<code>segments_N</code>) associated 

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexReader.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexReader.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexReader.java Wed Oct 14 13:44:08 2009
@@ -1126,18 +1126,9 @@
     hasChanges = false;
   }
 
-  /** Implements commit.
-   *  @deprecated Please implement {@link #doCommit(Map)
-   *  instead}. */
-  protected abstract void doCommit() throws IOException;
-
   /** Implements commit.  NOTE: subclasses should override
    *  this.  In 3.0 this will become an abstract method. */
-  void doCommit(Map commitUserData) throws IOException {
-    // Default impl discards commitUserData; all Lucene
-    // subclasses override this (do not discard it).
-    doCommit();
-  }
+  protected abstract void doCommit(Map commitUserData) throws IOException;
 
   /**
    * Closes files associated with this index.
@@ -1316,8 +1307,7 @@
     return null;
   }
 
-  /** Expert    
-   *  @deprecated */
+  /** Expert */
   public Object getFieldCacheKey() {
     return this;
   }
@@ -1346,26 +1336,4 @@
     }
     return numTerms;
   }
-
-  /** Expert: Return the state of the flag that disables fakes norms in favor of representing the absence of field norms with null.
-   * @return true if fake norms are disabled
-   * @deprecated This currently defaults to false (to remain
-   * back-compatible), but in 3.0 it will be hardwired to
-   * true, meaning the norms() methods will return null for
-   * fields that had disabled norms.
-   */
-  public boolean getDisableFakeNorms() {
-    return disableFakeNorms;
-  }
-
-  /** Expert: Set the state of the flag that disables fakes norms in favor of representing the absence of field norms with null.
-   * @param disableFakeNorms true to disable fake norms, false to preserve the legacy behavior
-   * @deprecated This currently defaults to false (to remain
-   * back-compatible), but in 3.0 it will be hardwired to
-   * true, meaning the norms() methods will return null for
-   * fields that had disabled norms.
-   */
-  public void setDisableFakeNorms(boolean disableFakeNorms) {
-    this.disableFakeNorms = disableFakeNorms;
- }
 }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexWriter.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexWriter.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexWriter.java Wed Oct 14 13:44:08 2009
@@ -612,7 +612,8 @@
         // TODO: we may want to avoid doing this while
         // synchronized
         // Returns a ref, which we xfer to readerMap:
-        sr = SegmentReader.get(info, readBufferSize, doOpenStores, termsIndexDivisor);
+        // nocommit: old api
+        sr = SegmentReader.get(false, info.dir, info, readBufferSize, doOpenStores, termsIndexDivisor, null);
         readerMap.put(info, sr);
       } else {
         if (doOpenStores) {
@@ -3421,30 +3422,6 @@
     throws IOException {
   }
 
-  /**
-   * Flush all in-memory buffered updates (adds and deletes)
-   * to the Directory. 
-   * <p>Note: while this will force buffered docs to be
-   * pushed into the index, it will not make these docs
-   * visible to a reader.  Use {@link #commit()} instead
-   *
-   * <p><b>NOTE</b>: if this method hits an OutOfMemoryError
-   * you should immediately close the writer.  See <a
-   * href="#OOME">above</a> for details.</p>
-   *
-   * @deprecated please call {@link #commit()}) instead
-   *
-   * @throws CorruptIndexException if the index is corrupt
-   * @throws IOException if there is a low-level IO error
-   */
-  public final void flush() throws CorruptIndexException, IOException {  
-    if (hitOOM) {
-      throw new IllegalStateException("this writer hit an OutOfMemoryError; cannot flush");
-    }
-
-    flush(true, false, true);
-  }
-
   /** Expert: prepare for commit.
    *
    * <p><b>NOTE</b>: if this method hits an OutOfMemoryError

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/MultiReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/MultiReader.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/MultiReader.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/MultiReader.java Wed Oct 14 13:44:08 2009
@@ -201,7 +201,6 @@
       }
       MultiReader mr = new MultiReader(newSubReaders);
       mr.decrefOnClose = newDecrefOnClose;
-      mr.setDisableFakeNorms(getDisableFakeNorms());
       return mr;
     } else {
       return this;
@@ -311,7 +310,7 @@
     if (bytes != null)
       return bytes;          // cache hit
     if (!hasNorms(field))
-      return getDisableFakeNorms() ? null : fakeNorms();
+      return null;
 
     bytes = new byte[maxDoc()];
     for (int i = 0; i < subReaders.length; i++)

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/SegmentReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/SegmentReader.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/SegmentReader.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/SegmentReader.java Wed Oct 14 13:44:08 2009
@@ -751,7 +751,6 @@
         }
       }
 
-      clone.setDisableFakeNorms(getDisableFakeNorms());
       clone.norms = new HashMap();
 
       // Clone norms
@@ -1108,11 +1107,6 @@
   }
 
   private byte[] ones;
-  private byte[] fakeNorms() {
-    assert !getDisableFakeNorms();
-    if (ones==null) ones=createFakeNorms(maxDoc());
-    return ones;
-  }
 
   // can return null if norms aren't stored
   protected synchronized byte[] getNorms(String field) throws IOException {
@@ -1125,7 +1119,6 @@
   public synchronized byte[] norms(String field) throws IOException {
     ensureOpen();
     byte[] bytes = getNorms(field);
-    if (bytes==null && !getDisableFakeNorms()) bytes=fakeNorms();
     return bytes;
   }
 

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/SnapshotDeletionPolicy.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/SnapshotDeletionPolicy.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/SnapshotDeletionPolicy.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/SnapshotDeletionPolicy.java Wed Oct 14 13:44:08 2009
@@ -71,8 +71,7 @@
    *  you call optimize()) then in the worst case this could
    *  consume an extra 1X of your total index size, until
    *  you release the snapshot. */
-  // TODO 3.0: change this to return IndexCommit instead
-  public synchronized IndexCommitPoint snapshot() {
+  public synchronized IndexCommit snapshot() {
     if (snapshot == null)
       snapshot = lastCommit.getSegmentsFileName();
     else

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/Term.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/Term.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/Term.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/Term.java Wed Oct 14 13:44:08 2009
@@ -35,7 +35,7 @@
    * <p>Note that a null field or null text value results in undefined
    * behavior for most Lucene APIs that accept a Term parameter. */
   public Term(String fld, String txt) {
-    field = StringHelper.intern(fld);
+    field = fld == null ? null : StringHelper.intern(fld);
     text = txt;
   }
 

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/Scorer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/Scorer.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/Scorer.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/Scorer.java Wed Oct 14 13:44:08 2009
@@ -87,7 +87,7 @@
       collector.collect(doc);
       doc = nextDoc();
     }
-    return doc == NO_MORE_DOCS;
+    return doc != NO_MORE_DOCS;
   }
   
   /** Returns the score of the current document matching the query.

Propchange: lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct 14 13:44:08 2009
@@ -1 +1,2 @@
 /lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:748824
+/lucene/java/trunk/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:824912-825114

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/document/TestDateTools.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/document/TestDateTools.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/document/TestDateTools.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/document/TestDateTools.java Wed Oct 14 13:44:08 2009
@@ -9,7 +9,6 @@
 import java.util.Locale;
 
 import org.apache.lucene.util.LocalizedTestCase;
-import org.apache.lucene.util.LuceneTestCase;
 
 /**
  * Licensed to the Apache Software Foundation (ASF) under one or more

Propchange: lucene/java/branches/flex_1458/src/test/org/apache/lucene/document/TestDateTools.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct 14 13:44:08 2009
@@ -1 +1,2 @@
 /lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/document/TestDateTools.java:748824
+/lucene/java/trunk/src/test/org/apache/lucene/document/TestDateTools.java:824912-825114

Propchange: lucene/java/branches/flex_1458/src/test/org/apache/lucene/document/TestNumberTools.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct 14 13:44:08 2009
@@ -1 +1,2 @@
 /lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/document/TestNumberTools.java:748824
+/lucene/java/trunk/src/test/org/apache/lucene/document/TestNumberTools.java:824912-825114

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/DocHelper.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/DocHelper.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/DocHelper.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/DocHelper.java Wed Oct 14 13:44:08 2009
@@ -238,7 +238,7 @@
     writer.setSimilarity(similarity);
     //writer.setUseCompoundFile(false);
     writer.addDocument(doc);
-    writer.flush();
+    writer.commit();
     SegmentInfo info = writer.newestSegment();
     writer.close();
     return info;

Propchange: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct 14 13:44:08 2009
@@ -1 +1,2 @@
 /lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:748824
+/lucene/java/trunk/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:824912-825114

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestConcurrentMergeScheduler.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestConcurrentMergeScheduler.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestConcurrentMergeScheduler.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestConcurrentMergeScheduler.java Wed Oct 14 13:44:08 2009
@@ -88,7 +88,7 @@
         writer.addDocument(doc);
         failure.setDoFail();
         try {
-          writer.flush();
+          writer.flush(true, false, true);
           if (failure.hitExc) {
             fail("failed to hit IOException");
           }
@@ -140,7 +140,7 @@
         delID += 10;
       }
 
-      writer.flush();
+      writer.commit();
     }
 
     writer.close();
@@ -210,7 +210,7 @@
       // stress out aborting them on close:
       writer.setMergeFactor(3);
       writer.addDocument(doc);
-      writer.flush();
+      writer.commit();
 
       writer.close(false);
 

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestDoc.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestDoc.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestDoc.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestDoc.java Wed Oct 14 13:44:08 2009
@@ -169,15 +169,15 @@
       Document doc = new Document();
       doc.add(new Field("contents", new FileReader(file)));
       writer.addDocument(doc);
-      writer.flush();
+      writer.commit();
       return writer.newestSegment();
    }
 
 
    private SegmentInfo merge(SegmentInfo si1, SegmentInfo si2, String merged, boolean useCompoundFile)
    throws Exception {
-      SegmentReader r1 = SegmentReader.get(si1);
-      SegmentReader r2 = SegmentReader.get(si2);
+      SegmentReader r1 = SegmentReader.get(true, si1, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
+      SegmentReader r2 = SegmentReader.get(true, si2, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
 
       SegmentMerger merger = new SegmentMerger(si1.dir, merged);
 
@@ -202,7 +202,7 @@
 
    private void printSegment(PrintWriter out, SegmentInfo si)
    throws Exception {
-      SegmentReader reader = SegmentReader.get(si);
+      SegmentReader reader = SegmentReader.get(true, si, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
 
       for (int i = 0; i < reader.numDocs(); i++)
         out.println(reader.document(i));

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestDocumentWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestDocumentWriter.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestDocumentWriter.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestDocumentWriter.java Wed Oct 14 13:44:08 2009
@@ -63,11 +63,11 @@
     Analyzer analyzer = new WhitespaceAnalyzer();
     IndexWriter writer = new IndexWriter(dir, analyzer, true, IndexWriter.MaxFieldLength.LIMITED);
     writer.addDocument(testDoc);
-    writer.flush();
+    writer.commit();
     SegmentInfo info = writer.newestSegment();
     writer.close();
     //After adding the document, we should be able to read it back in
-    SegmentReader reader = SegmentReader.get(info);
+    SegmentReader reader = SegmentReader.get(true, info, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
     assertTrue(reader != null);
     Document doc = reader.document(0);
     assertTrue(doc != null);
@@ -123,10 +123,10 @@
     doc.add(new Field("repeated", "repeated two", Field.Store.YES, Field.Index.ANALYZED));
 
     writer.addDocument(doc);
-    writer.flush();
+    writer.commit();
     SegmentInfo info = writer.newestSegment();
     writer.close();
-    SegmentReader reader = SegmentReader.get(info);
+    SegmentReader reader = SegmentReader.get(true, info, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
 
     TermPositions termPositions = reader.termPositions(new Term("repeated", "repeated"));
     assertTrue(termPositions.next());
@@ -183,10 +183,10 @@
     doc.add(new Field("f1", "a 5 a a", Field.Store.YES, Field.Index.ANALYZED));
 
     writer.addDocument(doc);
-    writer.flush();
+    writer.commit();
     SegmentInfo info = writer.newestSegment();
     writer.close();
-    SegmentReader reader = SegmentReader.get(info);
+    SegmentReader reader = SegmentReader.get(true, info, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
 
     TermPositions termPositions = reader.termPositions(new Term("f1", "a"));
     assertTrue(termPositions.next());
@@ -223,10 +223,10 @@
     }, TermVector.NO));
     
     writer.addDocument(doc);
-    writer.flush();
+    writer.commit();
     SegmentInfo info = writer.newestSegment();
     writer.close();
-    SegmentReader reader = SegmentReader.get(info);
+    SegmentReader reader = SegmentReader.get(true, info, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
 
     TermPositions termPositions = reader.termPositions(new Term("preanalyzed", "term1"));
     assertTrue(termPositions.next());

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexReaderReopen.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexReaderReopen.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexReaderReopen.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexReaderReopen.java Wed Oct 14 13:44:08 2009
@@ -935,7 +935,7 @@
     for (int i = 0; i < 100; i++) {
       w.addDocument(createDocument(i, 4));
       if (multiSegment && (i % 10) == 0) {
-        w.flush();
+        w.commit();
       }
     }
     

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriter.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriter.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriter.java Wed Oct 14 13:44:08 2009
@@ -1134,7 +1134,7 @@
     public void testIndexNoDocuments() throws IOException {
       RAMDirectory dir = new RAMDirectory();      
       IndexWriter writer  = new IndexWriter(dir, new WhitespaceAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
-      writer.flush();
+      writer.commit();
       writer.close();
 
       IndexReader reader = IndexReader.open(dir, true);
@@ -1143,7 +1143,7 @@
       reader.close();
 
       writer  = new IndexWriter(dir, new WhitespaceAnalyzer(), false, IndexWriter.MaxFieldLength.LIMITED);
-      writer.flush();
+      writer.commit();
       writer.close();
 
       reader = IndexReader.open(dir, true);
@@ -1504,7 +1504,7 @@
       Document doc = new Document();
       doc.add(new Field("field", "aaa", Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.WITH_POSITIONS_OFFSETS));
       writer.addDocument(doc);
-      writer.flush();
+      writer.commit();
       writer.addDocument(new Document());
       writer.close();
       _TestUtil.checkIndex(dir);
@@ -1596,13 +1596,13 @@
                            Field.TermVector.NO));
     iw.addDocument(document);
     // Make first segment
-    iw.flush();
+    iw.commit();
 
     document.add(new Field("tvtest", "a b c", Field.Store.NO, Field.Index.ANALYZED,
         Field.TermVector.YES));
     iw.addDocument(document);
     // Make 2nd segment
-    iw.flush();
+    iw.commit();
 
     iw.optimize();
     iw.close();
@@ -1617,14 +1617,14 @@
     document.add(new Field("tvtest", "a b c", Field.Store.NO, Field.Index.ANALYZED,
         Field.TermVector.YES));
     iw.addDocument(document);
-    iw.flush();
+    iw.commit();
 
     document = new Document();
     document.add(new Field("tvtest", "x y z", Field.Store.NO, Field.Index.ANALYZED,
                            Field.TermVector.NO));
     iw.addDocument(document);
     // Make first segment
-    iw.flush();
+    iw.commit();
 
     iw.optimize();
 
@@ -1632,7 +1632,7 @@
         Field.TermVector.YES));
     iw.addDocument(document);
     // Make 2nd segment
-    iw.flush();
+    iw.commit();
     iw.optimize();
 
     iw.close();

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriterDelete.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriterDelete.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriterDelete.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriterDelete.java Wed Oct 14 13:44:08 2009
@@ -151,7 +151,7 @@
 
       addDoc(modifier, ++id, value);
       assertEquals(0, modifier.getSegmentCount());
-      modifier.flush();
+      modifier.commit();
 
       modifier.commit();
 

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestMultiLevelSkipList.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestMultiLevelSkipList.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestMultiLevelSkipList.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestMultiLevelSkipList.java Wed Oct 14 13:44:08 2009
@@ -63,7 +63,7 @@
       d1.add(new Field(term.field(), term.text(), Store.NO, Index.ANALYZED));
       writer.addDocument(d1);
     }
-    writer.flush();
+    writer.commit();
     writer.optimize();
     writer.close();
 

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestMultiReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestMultiReader.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestMultiReader.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestMultiReader.java Wed Oct 14 13:44:08 2009
@@ -28,8 +28,8 @@
     IndexReader reader;
 
     sis.read(dir);
-    SegmentReader reader1 = SegmentReader.get(sis.info(0));
-    SegmentReader reader2 = SegmentReader.get(sis.info(1));
+    SegmentReader reader1 = SegmentReader.get(false, sis.info(0), IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
+    SegmentReader reader2 = SegmentReader.get(false, sis.info(1), IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
     readers[0] = reader1;
     readers[1] = reader2;
     assertTrue(reader1 != null);

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestPayloads.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestPayloads.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestPayloads.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestPayloads.java Wed Oct 14 13:44:08 2009
@@ -202,7 +202,7 @@
         }
         
         // make sure we create more than one segment to test merging
-        writer.flush();
+        writer.commit();
         
         // now we make sure to have different payload lengths next at the next skip point        
         for (int i = 0; i < numDocs; i++) {

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestSegmentMerger.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestSegmentMerger.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestSegmentMerger.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestSegmentMerger.java Wed Oct 14 13:44:08 2009
@@ -49,8 +49,8 @@
     SegmentInfo info1 = DocHelper.writeDoc(merge1Dir, doc1);
     DocHelper.setupDoc(doc2);
     SegmentInfo info2 = DocHelper.writeDoc(merge2Dir, doc2);
-    reader1 = SegmentReader.get(info1);
-    reader2 = SegmentReader.get(info2);
+    reader1 = SegmentReader.get(true, info1, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
+    reader2 = SegmentReader.get(true, info2, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
   }
 
   public void test() {

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestSegmentReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestSegmentReader.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestSegmentReader.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestSegmentReader.java Wed Oct 14 13:44:08 2009
@@ -43,7 +43,7 @@
     super.setUp();
     DocHelper.setupDoc(testDoc);
     SegmentInfo info = DocHelper.writeDoc(dir, testDoc);
-    reader = SegmentReader.get(info);
+    reader = SegmentReader.get(true, info, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
   }
 
   public void test() {
@@ -73,7 +73,7 @@
     Document docToDelete = new Document();
     DocHelper.setupDoc(docToDelete);
     SegmentInfo info = DocHelper.writeDoc(dir, docToDelete);
-    SegmentReader deleteReader = SegmentReader.get(info);
+    SegmentReader deleteReader = SegmentReader.get(false, info, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
     assertTrue(deleteReader != null);
     assertTrue(deleteReader.numDocs() == 1);
     deleteReader.deleteDocument(0);
@@ -170,14 +170,7 @@
           // test for fake norms of 1.0 or null depending on the flag
           byte [] norms = reader.norms(f.name());
           byte norm1 = DefaultSimilarity.encodeNorm(1.0f);
-          if (reader.getDisableFakeNorms())
-            assertNull(norms);
-          else {
-            assertEquals(norms.length,reader.maxDoc());
-            for (int j=0; j<reader.maxDoc(); j++) {
-              assertEquals(norms[j], norm1);
-            }
-          }
+          assertNull(norms);
           norms = new byte[reader.maxDoc()];
           reader.norms(f.name(),norms, 0);
           for (int j=0; j<reader.maxDoc(); j++) {

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestTermVectorsReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestTermVectorsReader.java?rev=825133&r1=825132&r2=825133&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestTermVectorsReader.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestTermVectorsReader.java Wed Oct 14 13:44:08 2009
@@ -111,7 +111,7 @@
     //terms
     for(int j=0;j<5;j++)
       writer.addDocument(doc);
-    writer.flush();
+    writer.commit();
     seg = writer.newestSegment().name;
     writer.close();
 



Mime
View raw message