lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r1374718 [2/3] - in /lucene/dev/branches/lucene3312: ./ dev-tools/ dev-tools/eclipse/ dev-tools/idea/solr/contrib/extraction/ lucene/ lucene/analysis/ lucene/analysis/common/ lucene/analysis/common/src/java/org/apache/lucene/analysis/charfi...
Date Sun, 19 Aug 2012 09:35:31 GMT
Modified: lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/index/SortedBytesMergeUtils.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/index/SortedBytesMergeUtils.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/index/SortedBytesMergeUtils.java (original)
+++ lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/index/SortedBytesMergeUtils.java Sun Aug 19 09:35:25 2012
@@ -32,6 +32,9 @@ import org.apache.lucene.util.PriorityQu
 import org.apache.lucene.util.packed.PackedInts;
 
 /**
+ * Utility class for merging SortedBytes DocValues
+ * instances.
+ *  
  * @lucene.internal
  */
 public final class SortedBytesMergeUtils {
@@ -54,7 +57,14 @@ public final class SortedBytesMergeUtils
     }
     return new MergeContext(comp, mergeDocCount, size, type);
   }
-
+  /**
+   * Encapsulates contextual information about the merge. 
+   * This class holds document id to ordinal mappings, offsets for
+   * variable length values and the comparator to sort the merged
+   * bytes.
+   * 
+   * @lucene.internal
+   */
   public static final class MergeContext {
     private final Comparator<BytesRef> comp;
     private final BytesRef missingValue = new BytesRef();
@@ -169,10 +179,36 @@ public final class SortedBytesMergeUtils
     return merger.currentOrd;
   }
   
+  /**
+   * Implementation of this interface consume the merged bytes with their
+   * corresponding ordinal and byte offset. The offset is the byte offset in
+   * target sorted source where the currently merged {@link BytesRef} instance
+   * should be stored at.
+   */
   public static interface BytesRefConsumer {
+    
+    /**
+     * Consumes a single {@link BytesRef}. The provided {@link BytesRef}
+     * instances are strictly increasing with respect to the used
+     * {@link Comparator} used for merging
+     * 
+     * @param ref
+     *          the {@link BytesRef} to consume
+     * @param ord
+     *          the ordinal of the given {@link BytesRef} in the merge target
+     * @param offset
+     *          the byte offset of the given {@link BytesRef} in the merge
+     *          target
+     * @throws IOException
+     *           if an {@link IOException} occurs
+     */
     public void consume(BytesRef ref, int ord, long offset) throws IOException;
   }
   
+  /**
+   * A simple {@link BytesRefConsumer} that writes the merged {@link BytesRef}
+   * instances sequentially to an {@link IndexOutput}.
+   */
   public static final class IndexOutputBytesRefConsumer implements BytesRefConsumer {
     private final IndexOutput datOut;
     
@@ -186,7 +222,15 @@ public final class SortedBytesMergeUtils
           currentMergedBytes.length);      
     }
   }
-
+  
+  /**
+   * {@link RecordMerger} merges a list of {@link SortedSourceSlice} lazily by
+   * consuming the sorted source records one by one and de-duplicates records
+   * that are shared across slices. The algorithm is based on a lazy priority queue
+   * that prevents reading merge sources into heap memory. 
+   * 
+   * @lucene.internal
+   */
   private static final class RecordMerger {
     private final MergeQueue queue;
     private final SortedSourceSlice[] top;
@@ -231,6 +275,12 @@ public final class SortedBytesMergeUtils
     }
   }
 
+  /**
+   * {@link SortedSourceSlice} represents a single {@link SortedSource} merge candidate.
+   * It encapsulates ordinal and pre-calculated target doc id to ordinal mappings.
+   * This class also holds state private to the merge process.
+   * @lucene.internal
+   */
   public static class SortedSourceSlice {
     final SortedSource source;
     final int readerIdx;

Modified: lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/FieldCache.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/FieldCache.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/FieldCache.java (original)
+++ lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/FieldCache.java Sun Aug 19 09:35:25 2012
@@ -45,6 +45,9 @@ import org.apache.lucene.util.packed.Pac
  */
 public interface FieldCache {
 
+  /**
+   * Placeholder indicating creation of this cache is currently in-progress.
+   */
   public static final class CreationPlaceholder {
     Object value;
   }

Modified: lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/FieldComparator.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/FieldComparator.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/FieldComparator.java (original)
+++ lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/FieldComparator.java Sun Aug 19 09:35:25 2012
@@ -194,6 +194,9 @@ public abstract class FieldComparator<T>
    *  than the provided value. */
   public abstract int compareDocToValue(int doc, T value) throws IOException;
 
+  /**
+   * Base FieldComparator class for numeric types
+   */
   public static abstract class NumericComparator<T extends Number> extends FieldComparator<T> {
     protected final T missingValue;
     protected final String field;

Modified: lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/FieldValueHitQueue.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/FieldValueHitQueue.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/FieldValueHitQueue.java (original)
+++ lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/FieldValueHitQueue.java Sun Aug 19 09:35:25 2012
@@ -33,6 +33,10 @@ import org.apache.lucene.util.PriorityQu
  */
 public abstract class FieldValueHitQueue<T extends FieldValueHitQueue.Entry> extends PriorityQueue<T> {
 
+  /**
+   * Extension of ScoreDoc to also store the 
+   * {@link FieldComparator} slot.
+   */
   public static class Entry extends ScoreDoc {
     public int slot;
 

Modified: lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/FuzzyTermsEnum.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/FuzzyTermsEnum.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/FuzzyTermsEnum.java (original)
+++ lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/FuzzyTermsEnum.java Sun Aug 19 09:35:25 2012
@@ -398,12 +398,17 @@ public class FuzzyTermsEnum extends Term
     return scale_factor;
   }
   
-  /** @lucene.internal */
+  /**
+   * reuses compiled automata across different segments,
+   * because they are independent of the index
+   * @lucene.internal */
   public static interface LevenshteinAutomataAttribute extends Attribute {
     public List<CompiledAutomaton> automata();
   }
     
-  /** @lucene.internal */
+  /** 
+   * Stores compiled automata as a list (indexed by edit distance)
+   * @lucene.internal */
   public static final class LevenshteinAutomataAttributeImpl extends AttributeImpl implements LevenshteinAutomataAttribute {
     private final List<CompiledAutomaton> automata = new ArrayList<CompiledAutomaton>();
       

Modified: lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java (original)
+++ lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java Sun Aug 19 09:35:25 2012
@@ -83,7 +83,7 @@ public class IndexSearcher {
   // in the next release
   protected final IndexReaderContext readerContext;
   protected final List<AtomicReaderContext> leafContexts;
-  // used with executor - each slice holds a set of leafs executed within one thread
+  /** used with executor - each slice holds a set of leafs executed within one thread */
   protected final LeafSlice[] leafSlices;
 
   // These are only used for multi-threaded search

Modified: lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/ScoringRewrite.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/ScoringRewrite.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/ScoringRewrite.java (original)
+++ lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/ScoringRewrite.java Sun Aug 19 09:35:25 2012
@@ -32,7 +32,11 @@ import org.apache.lucene.util.BytesRefHa
 import org.apache.lucene.util.RamUsageEstimator;
 import org.apache.lucene.util.BytesRefHash.DirectBytesStartArray;
 
-/** @lucene.internal Only public to be accessible by spans package. */
+/** 
+ * Base rewrite method that translates each term into a query, and keeps
+ * the scores as computed by the query.
+ * <p>
+ * @lucene.internal Only public to be accessible by spans package. */
 public abstract class ScoringRewrite<Q extends Query> extends TermCollectingRewrite<Q> {
 
   /** A rewrite method that first translates each term into

Modified: lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/SortField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/SortField.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/SortField.java (original)
+++ lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/SortField.java Sun Aug 19 09:35:25 2012
@@ -38,6 +38,9 @@ import org.apache.lucene.util.StringHelp
  */
 public class SortField {
 
+  /**
+   * Specifies the type of the terms to be sorted, or special types such as CUSTOM
+   */
   public static enum Type {
 
     /** Sort by document score (relevance).  Sort values are Float and higher

Modified: lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/TimeLimitingCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/TimeLimitingCollector.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/TimeLimitingCollector.java (original)
+++ lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/TimeLimitingCollector.java Sun Aug 19 09:35:25 2012
@@ -225,6 +225,8 @@ public class TimeLimitingCollector exten
   }
 
   /**
+   * Thread used to timeout search requests.
+   * Can be stopped completely with {@link TimerThread#stopTimer()}
    * @lucene.experimental
    */
   public static final class TimerThread extends Thread  {

Modified: lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/TopDocsCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/TopDocsCollector.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/TopDocsCollector.java (original)
+++ lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/search/TopDocsCollector.java Sun Aug 19 09:35:25 2012
@@ -33,8 +33,8 @@ import org.apache.lucene.util.PriorityQu
  */
 public abstract class TopDocsCollector<T extends ScoreDoc> extends Collector {
 
-  // This is used in case topDocs() is called with illegal parameters, or there
-  // simply aren't (enough) results.
+  /** This is used in case topDocs() is called with illegal parameters, or there
+   *  simply aren't (enough) results. */
   protected static final TopDocs EMPTY_TOPDOCS = new TopDocs(0, new ScoreDoc[0], Float.NaN);
   
   /**

Modified: lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/store/FSDirectory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/store/FSDirectory.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/store/FSDirectory.java (original)
+++ lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/store/FSDirectory.java Sun Aug 19 09:35:25 2012
@@ -436,6 +436,9 @@ public abstract class FSDirectory extend
     return chunkSize;
   }
 
+  /**
+   * Writes output with {@link RandomAccessFile#write(byte[], int, int)}
+   */
   protected static class FSIndexOutput extends BufferedIndexOutput {
     private final FSDirectory parent;
     private final String name;

Modified: lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/store/NIOFSDirectory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/store/NIOFSDirectory.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/store/NIOFSDirectory.java (original)
+++ lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/store/NIOFSDirectory.java Sun Aug 19 09:35:25 2012
@@ -106,6 +106,9 @@ public class NIOFSDirectory extends FSDi
     };
   }
 
+  /**
+   * Reads bytes with {@link FileChannel#read(ByteBuffer, long)}
+   */
   protected static class NIOFSIndexInput extends SimpleFSDirectory.SimpleFSIndexInput {
 
     private ByteBuffer byteBuf; // wraps the buffer for NIO

Modified: lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/store/RAMFile.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/store/RAMFile.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/store/RAMFile.java (original)
+++ lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/store/RAMFile.java Sun Aug 19 09:35:25 2012
@@ -19,7 +19,9 @@ package org.apache.lucene.store;
 
 import java.util.ArrayList;
 
-/** @lucene.internal */
+/** 
+ * Represents a file in RAM as a list of byte[] buffers.
+ * @lucene.internal */
 public class RAMFile {
   protected ArrayList<byte[]> buffers = new ArrayList<byte[]>();
   long length;

Modified: lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/store/SimpleFSDirectory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/store/SimpleFSDirectory.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/store/SimpleFSDirectory.java (original)
+++ lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/store/SimpleFSDirectory.java Sun Aug 19 09:35:25 2012
@@ -85,8 +85,16 @@ public class SimpleFSDirectory extends F
     };
   }
 
+  /**
+   * Reads bytes with {@link RandomAccessFile#seek(long)} followed by
+   * {@link RandomAccessFile#read(byte[], int, int)}.  
+   */
   protected static class SimpleFSIndexInput extends BufferedIndexInput {
   
+    /**
+     * Extension of RandomAccessFile that tracks if the file is 
+     * open.
+     */
     protected static class Descriptor extends RandomAccessFile {
       // remember if the file is open, so that we don't try to close it
       // more than once

Modified: lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/ByteBlockPool.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/ByteBlockPool.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/ByteBlockPool.java (original)
+++ lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/ByteBlockPool.java Sun Aug 19 09:35:25 2012
@@ -117,10 +117,13 @@ public final class ByteBlockPool {
   public byte[][] buffers = new byte[10][];
 
   int bufferUpto = -1;                        // Which buffer we are upto
-  public int byteUpto = BYTE_BLOCK_SIZE;             // Where we are in head buffer
+  /** Where we are in head buffer */
+  public int byteUpto = BYTE_BLOCK_SIZE;
 
-  public byte[] buffer;                              // Current head buffer
-  public int byteOffset = -BYTE_BLOCK_SIZE;          // Current head offset
+  /** Current head buffer */
+  public byte[] buffer;
+  /** Current head offset */
+  public int byteOffset = -BYTE_BLOCK_SIZE;
 
   private final Allocator allocator;
 

Modified: lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/FuzzySet.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/FuzzySet.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/FuzzySet.java (original)
+++ lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/FuzzySet.java Sun Aug 19 09:35:25 2012
@@ -48,6 +48,11 @@ public class FuzzySet {
   
   public static final int FUZZY_SERIALIZATION_VERSION=1;
   
+  /**
+   * Result from {@link FuzzySet#contains(BytesRef)}:
+   * can never return definitively YES (always MAYBE), 
+   * but can sometimes definitely return NO.
+   */
   public enum ContainsResult {
     MAYBE, NO
   };

Modified: lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/fst/FST.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/fst/FST.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/fst/FST.java (original)
+++ lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/fst/FST.java Sun Aug 19 09:35:25 2012
@@ -158,7 +158,7 @@ public final class FST<T> {
   private final boolean packed;
   private PackedInts.Reader nodeRefToAddress;
 
-  // If arc has this label then that arc is final/accepted
+  /** If arc has this label then that arc is final/accepted */
   public static final int END_LABEL = -1;
 
   private boolean allowArrayArcs = true;
@@ -174,7 +174,7 @@ public final class FST<T> {
     // building an FST w/ willPackFST=true:
     int node;
 
-    // To node (ord or address):
+    /** To node (ord or address) */
     public int target;
 
     byte flags;
@@ -542,8 +542,8 @@ public final class FST<T> {
     return v;
   }
 
-  // returns true if the node at this address has any
-  // outgoing arcs
+  /** returns true if the node at this address has any
+   *  outgoing arcs */
   public static<T> boolean targetHasArcs(Arc<T> arc) {
     return arc.target > 0;
   }

Modified: lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/fst/Util.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/fst/Util.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/fst/Util.java (original)
+++ lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/fst/Util.java Sun Aug 19 09:35:25 2012
@@ -767,6 +767,19 @@ public final class Util {
     }
   }
 
+  /** Just maps each UTF16 unit (char) to the ints in an
+   *  IntsRef. */
+  public static IntsRef toUTF16(CharSequence s, IntsRef scratch) {
+    final int charLimit = s.length();
+    scratch.offset = 0;
+    scratch.length = charLimit;
+    scratch.grow(charLimit);
+    for (int idx = 0; idx < charLimit; idx++) {
+      scratch.ints[idx] = (int) s.charAt(idx);
+    }
+    return scratch;
+  }    
+
   /** Decodes the Unicode codepoints from the provided
    *  CharSequence and places them in the provided scratch
    *  IntsRef, which must not be null, returning it. */

Modified: lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java (original)
+++ lucene/dev/branches/lucene3312/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java Sun Aug 19 09:35:25 2012
@@ -572,7 +572,7 @@ public class PackedInts {
         }
         return new Packed64(in, valueCount, bitsPerValue);
       default:
-        throw new AssertionError("Unknwown Writer format: " + format);
+        throw new AssertionError("Unknown Writer format: " + format);
     }
   }
 

Modified: lucene/dev/branches/lucene3312/lucene/core/src/test/org/apache/lucene/search/TestSimilarityProvider.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/core/src/test/org/apache/lucene/search/TestSimilarityProvider.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/core/src/test/org/apache/lucene/search/TestSimilarityProvider.java (original)
+++ lucene/dev/branches/lucene3312/lucene/core/src/test/org/apache/lucene/search/TestSimilarityProvider.java Sun Aug 19 09:35:25 2012
@@ -20,12 +20,13 @@ package org.apache.lucene.search;
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
+import org.apache.lucene.index.AtomicReader;
+import org.apache.lucene.index.DirectoryReader;
 import org.apache.lucene.index.FieldInvertState;
-import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.IndexWriterConfig;
-import org.apache.lucene.index.MultiDocValues;
 import org.apache.lucene.index.Norm;
 import org.apache.lucene.index.RandomIndexWriter;
+import org.apache.lucene.index.SlowCompositeReaderWrapper;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.search.similarities.PerFieldSimilarityWrapper;
 import org.apache.lucene.search.similarities.Similarity;
@@ -36,7 +37,7 @@ import org.apache.lucene.util.LuceneTest
 
 public class TestSimilarityProvider extends LuceneTestCase {
   private Directory directory;
-  private IndexReader reader;
+  private DirectoryReader reader;
   private IndexSearcher searcher;
   
   @Override
@@ -75,8 +76,9 @@ public class TestSimilarityProvider exte
   public void testBasics() throws Exception {
     // sanity check of norms writer
     // TODO: generalize
-    byte fooNorms[] = (byte[]) MultiDocValues.getNormDocValues(reader, "foo").getSource().getArray();
-    byte barNorms[] = (byte[]) MultiDocValues.getNormDocValues(reader, "bar").getSource().getArray();
+    AtomicReader slow = new SlowCompositeReaderWrapper(reader);
+    byte fooNorms[] = (byte[]) slow.normValues("foo").getSource().getArray();
+    byte barNorms[] = (byte[]) slow.normValues("bar").getSource().getArray();
     for (int i = 0; i < fooNorms.length; i++) {
       assertFalse(fooNorms[i] == barNorms[i]);
     }

Modified: lucene/dev/branches/lucene3312/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestFailIfDirectoryNotClosed.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestFailIfDirectoryNotClosed.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestFailIfDirectoryNotClosed.java (original)
+++ lucene/dev/branches/lucene3312/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestFailIfDirectoryNotClosed.java Sun Aug 19 09:35:25 2012
@@ -17,13 +17,7 @@ package org.apache.lucene.util.junitcomp
  * limitations under the License.
  */
 
-import java.io.IOException;
-
-import org.apache.lucene.index.IndexWriter;
-import org.apache.lucene.index.IndexWriterConfig;
 import org.apache.lucene.store.Directory;
-import org.apache.lucene.store.MockDirectoryWrapper;
-import org.apache.lucene.store.SingleInstanceLockFactory;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.JUnitCore;
@@ -40,39 +34,10 @@ public class TestFailIfDirectoryNotClose
       System.out.println(dir.toString());
     }
   }
-  
-  public static class Nested2 extends WithNestedTests.AbstractNestedTest {
-    public void testDummy() throws IOException {
-      MockDirectoryWrapper dir = newMockDirectory();
-      IndexWriter iw = new IndexWriter(dir, new IndexWriterConfig(TEST_VERSION_CURRENT, null));
-      dir.close();
-    }
-  }
-  
-  public static class Nested3 extends WithNestedTests.AbstractNestedTest {
-    public void testDummy() throws IOException {
-      MockDirectoryWrapper dir = newMockDirectory();
-      dir.setLockFactory(new SingleInstanceLockFactory());
-      IndexWriter iw = new IndexWriter(dir, new IndexWriterConfig(TEST_VERSION_CURRENT, null));
-      dir.close();
-    }
-  }
 
   @Test
   public void testFailIfDirectoryNotClosed() {
     Result r = JUnitCore.runClasses(Nested1.class);
     Assert.assertEquals(1, r.getFailureCount());
   }
-  
-  @Test
-  public void testFailIfIndexWriterNotClosed() {
-    Result r = JUnitCore.runClasses(Nested2.class);
-    Assert.assertEquals(1, r.getFailureCount());
-  }
-  
-  @Test
-  public void testFailIfIndexWriterNotClosedChangeLockFactory() {
-    Result r = JUnitCore.runClasses(Nested3.class);
-    Assert.assertEquals(1, r.getFailureCount());
-  }
 }

Modified: lucene/dev/branches/lucene3312/lucene/grouping/src/java/org/apache/lucene/search/grouping/AbstractDistinctValuesCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/grouping/src/java/org/apache/lucene/search/grouping/AbstractDistinctValuesCollector.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/grouping/src/java/org/apache/lucene/search/grouping/AbstractDistinctValuesCollector.java (original)
+++ lucene/dev/branches/lucene3312/lucene/grouping/src/java/org/apache/lucene/search/grouping/AbstractDistinctValuesCollector.java Sun Aug 19 09:35:25 2012
@@ -44,6 +44,10 @@ public abstract class AbstractDistinctVa
   public void setScorer(Scorer scorer) throws IOException {
   }
 
+  /**
+   * Returned by {@link AbstractDistinctValuesCollector#getGroups()},
+   * representing the value and set of distinct values for the group.
+   */
   public abstract static class GroupCount<GROUP_VALUE_TYPE> {
 
     public final GROUP_VALUE_TYPE groupValue;

Modified: lucene/dev/branches/lucene3312/lucene/grouping/src/java/org/apache/lucene/search/grouping/CollectedSearchGroup.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/grouping/src/java/org/apache/lucene/search/grouping/CollectedSearchGroup.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/grouping/src/java/org/apache/lucene/search/grouping/CollectedSearchGroup.java (original)
+++ lucene/dev/branches/lucene3312/lucene/grouping/src/java/org/apache/lucene/search/grouping/CollectedSearchGroup.java Sun Aug 19 09:35:25 2012
@@ -17,7 +17,12 @@
 
 package org.apache.lucene.search.grouping;
 
-/** @lucene.internal */
+import org.apache.lucene.search.FieldComparator; // javadocs
+
+/** 
+ * Expert: representation of a group in {@link AbstractFirstPassGroupingCollector},
+ * tracking the top doc and {@link FieldComparator} slot.
+ * @lucene.internal */
 public class CollectedSearchGroup<T> extends SearchGroup<T> {
   int topDoc;
   int comparatorSlot;

Modified: lucene/dev/branches/lucene3312/lucene/module-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/module-build.xml?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/module-build.xml (original)
+++ lucene/dev/branches/lucene3312/lucene/module-build.xml Sun Aug 19 09:35:25 2012
@@ -90,6 +90,28 @@
     </sequential>
   </macrodef>
 
+  <property name="test-framework.jar" value="${common.dir}/build/test-framework/lucene-test-framework-${version}.jar"/>
+  <target name="check-test-framework-uptodate" unless="test-framework.uptodate">
+    <module-uptodate name="test-framework" jarfile="${test-framework.jar}" property="test-framework.uptodate"/>
+  </target>
+  <target name="jar-test-framework" unless="test-framework.uptodate" depends="check-test-framework-uptodate">
+    <ant dir="${common.dir}/test-framework" target="jar-core" inheritall="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+    <property name="test-framework.uptodate" value="true"/>
+  </target>
+
+  <property name="test-framework-javadoc.jar" value="${common.dir}/build/test-framework/lucene-test-framework-${version}-javadoc.jar"/>
+  <target name="check-test-framework-javadocs-uptodate" unless="test-framework-javadocs.uptodate">
+    <module-uptodate name="test-framework" jarfile="${test-framework-javadoc.jar}" property="test-framework-javadocs.uptodate"/>
+  </target>
+  <target name="javadocs-test-framework" unless="test-framework-javadocs.uptodate" depends="check-test-framework-javadocs-uptodate">
+    <ant dir="${common.dir}/test-framework" target="javadocs" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+    <property name="test-framework-javadocs.uptodate" value="true"/>
+  </target>
+
   <property name="queryparser.jar" value="${common.dir}/build/queryparser/lucene-queryparser-${version}.jar"/>
   <target name="check-queryparser-uptodate" unless="queryparser.uptodate">
     <module-uptodate name="queryparser" jarfile="${queryparser.jar}" property="queryparser.uptodate"/>

Modified: lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/DoubleConstValueSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/DoubleConstValueSource.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/DoubleConstValueSource.java (original)
+++ lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/DoubleConstValueSource.java Sun Aug 19 09:35:25 2012
@@ -24,6 +24,9 @@ import org.apache.lucene.queries.functio
 import java.io.IOException;
 import java.util.Map;
 
+/**
+ * Function that returns a constant double value for every document.
+ */
 public class DoubleConstValueSource extends ConstNumberSource {
   final double constant;
   private final float fv;

Modified: lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/IDFValueSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/IDFValueSource.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/IDFValueSource.java (original)
+++ lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/IDFValueSource.java Sun Aug 19 09:35:25 2012
@@ -28,7 +28,13 @@ import org.apache.lucene.util.BytesRef;
 import java.io.IOException;
 import java.util.Map;
 
-/** @lucene.internal */
+/** 
+ * Function that returns {@link TFIDFSimilarity #idf(long, long)}
+ * for every document.
+ * <p>
+ * Note that the configured Similarity for the field must be
+ * a subclass of {@link TFIDFSimilarity}
+ * @lucene.internal */
 public class IDFValueSource extends DocFreqValueSource {
   public IDFValueSource(String field, String val, String indexedField, BytesRef indexedBytes) {
     super(field, val, indexedField, indexedBytes);

Modified: lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/IfFunction.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/IfFunction.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/IfFunction.java (original)
+++ lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/IfFunction.java Sun Aug 19 09:35:25 2012
@@ -30,6 +30,10 @@ import java.util.List;
 import java.util.Map;
 
 
+/**
+ * Depending on the boolean value of the <code>ifSource</code> function,
+ * returns the value of the <code>trueSource</code> or <code>falseSource</code> function.
+ */
 public class IfFunction extends BoolFunction {
   private final ValueSource ifSource;
   private final ValueSource trueSource;

Modified: lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/MaxDocValueSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/MaxDocValueSource.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/MaxDocValueSource.java (original)
+++ lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/MaxDocValueSource.java Sun Aug 19 09:35:25 2012
@@ -17,6 +17,7 @@
 package org.apache.lucene.queries.function.valuesource;
 
 import org.apache.lucene.index.AtomicReaderContext;
+import org.apache.lucene.index.IndexReader; // javadocs
 import org.apache.lucene.queries.function.FunctionValues;
 import org.apache.lucene.queries.function.ValueSource;
 import org.apache.lucene.search.IndexSearcher;
@@ -24,6 +25,11 @@ import org.apache.lucene.search.IndexSea
 import java.io.IOException;
 import java.util.Map;
 
+/**
+ * Returns the value of {@link IndexReader#maxDoc()}
+ * for every document. This is the number of documents
+ * including deletions.
+ */
 public class MaxDocValueSource extends ValueSource {
   public String name() {
     return "maxdoc";

Modified: lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/NormValueSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/NormValueSource.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/NormValueSource.java (original)
+++ lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/NormValueSource.java Sun Aug 19 09:35:25 2012
@@ -28,6 +28,13 @@ import org.apache.lucene.search.similari
 import java.io.IOException;
 import java.util.Map;
 
+/** 
+ * Function that returns {@link TFIDFSimilarity#decodeNormValue(byte)}
+ * for every document.
+ * <p>
+ * Note that the configured Similarity for the field must be
+ * a subclass of {@link TFIDFSimilarity}
+ * @lucene.internal */
 public class NormValueSource extends ValueSource {
   protected final String field;
   public NormValueSource(String field) {

Modified: lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/SumTotalTermFreqValueSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/SumTotalTermFreqValueSource.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/SumTotalTermFreqValueSource.java (original)
+++ lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/SumTotalTermFreqValueSource.java Sun Aug 19 09:35:25 2012
@@ -30,7 +30,10 @@ import java.io.IOException;
 import java.util.Map;
 
 /**
- * <code>TotalTermFreqValueSource</code> returns the total term freq (sum of term freqs across all docuyments).
+ * <code>SumTotalTermFreqValueSource</code> returns the number of tokens.
+ * (sum of term freqs across all documents, across all terms).
+ * Returns -1 if frequencies were omitted for the field, or if 
+ * the codec doesn't support this statistic.
  * @lucene.internal
  */
 public class SumTotalTermFreqValueSource extends ValueSource {

Modified: lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TFValueSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TFValueSource.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TFValueSource.java (original)
+++ lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TFValueSource.java Sun Aug 19 09:35:25 2012
@@ -28,6 +28,13 @@ import org.apache.lucene.util.BytesRef;
 import java.io.IOException;
 import java.util.Map;
 
+/** 
+ * Function that returns {@link TFIDFSimilarity#tf(int)}
+ * for every document.
+ * <p>
+ * Note that the configured Similarity for the field must be
+ * a subclass of {@link TFIDFSimilarity}
+ * @lucene.internal */
 public class TFValueSource extends TermFreqValueSource {
   public TFValueSource(String field, String val, String indexedField, BytesRef indexedBytes) {
     super(field, val, indexedField, indexedBytes);

Modified: lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TermFreqValueSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TermFreqValueSource.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TermFreqValueSource.java (original)
+++ lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TermFreqValueSource.java Sun Aug 19 09:35:25 2012
@@ -26,6 +26,13 @@ import org.apache.lucene.util.BytesRef;
 import java.io.IOException;
 import java.util.Map;
 
+/**
+ * Function that returns {@link DocsEnum#freq()} for the
+ * supplied term in every document.
+ * <p>
+ * If the term does not exist in the document, returns 0.
+ * If frequencies are omitted, returns 1.
+ */
 public class TermFreqValueSource extends DocFreqValueSource {
   public TermFreqValueSource(String field, String val, String indexedField, BytesRef indexedBytes) {
     super(field, val, indexedField, indexedBytes);

Modified: lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TotalTermFreqValueSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TotalTermFreqValueSource.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TotalTermFreqValueSource.java (original)
+++ lucene/dev/branches/lucene3312/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TotalTermFreqValueSource.java Sun Aug 19 09:35:25 2012
@@ -28,7 +28,10 @@ import java.io.IOException;
 import java.util.Map;
 
 /**
- * <code>TotalTermFreqValueSource</code> returns the total term freq (sum of term freqs across all docuyments).
+ * <code>TotalTermFreqValueSource</code> returns the total term freq 
+ * (sum of term freqs across all documents).
+ * Returns -1 if frequencies were omitted for the field, or if 
+ * the codec doesn't support this statistic.
  * @lucene.internal
  */
 public class TotalTermFreqValueSource extends ValueSource {

Modified: lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/analysis/MockHoleInjectingTokenFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/analysis/MockHoleInjectingTokenFilter.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/analysis/MockHoleInjectingTokenFilter.java (original)
+++ lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/analysis/MockHoleInjectingTokenFilter.java Sun Aug 19 09:35:25 2012
@@ -29,7 +29,9 @@ import org.apache.lucene.util._TestUtil;
 // a MockRemovesTokensTF, ideally subclassing FilteringTF
 // (in modules/analysis)
 
-// Randomly injects holes:
+/** 
+ * Randomly injects holes (similar to what a stopfilter would do)
+ */
 public final class MockHoleInjectingTokenFilter extends TokenFilter {
 
   private final long randomSeed;

Modified: lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/analysis/MockPayloadAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/analysis/MockPayloadAnalyzer.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/analysis/MockPayloadAnalyzer.java (original)
+++ lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/analysis/MockPayloadAnalyzer.java Sun Aug 19 09:35:25 2012
@@ -27,8 +27,9 @@ import java.io.Reader;
 
 
 /**
- *
- *
+ * Wraps a whitespace tokenizer with a filter that sets
+ * the first token, and odd tokens to posinc=1, and all others
+ * to 0, encoding the position as pos: XXX in the payload.
  **/
 public final class MockPayloadAnalyzer extends Analyzer {
 

Modified: lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40ords/Lucene40WithOrds.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40ords/Lucene40WithOrds.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40ords/Lucene40WithOrds.java (original)
+++ lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40ords/Lucene40WithOrds.java Sun Aug 19 09:35:25 2012
@@ -30,6 +30,7 @@ import org.apache.lucene.codecs.Postings
 import org.apache.lucene.codecs.PostingsWriterBase;
 import org.apache.lucene.codecs.TermsIndexReaderBase;
 import org.apache.lucene.codecs.TermsIndexWriterBase;
+import org.apache.lucene.codecs.lucene40.Lucene40Codec; // javadocs
 import org.apache.lucene.codecs.lucene40.Lucene40PostingsReader;
 import org.apache.lucene.codecs.lucene40.Lucene40PostingsWriter;
 import org.apache.lucene.index.SegmentReadState;
@@ -39,6 +40,10 @@ import org.apache.lucene.util.BytesRef;
 // TODO: we could make separate base class that can wrapp
 // any PostingsBaseFormat and make it ord-able...
 
+/**
+ * Customized version of {@link Lucene40Codec} that uses
+ * {@link FixedGapTermsIndexWriter}.
+ */
 public class Lucene40WithOrds extends PostingsFormat {
     
   public Lucene40WithOrds() {

Modified: lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/mockintblock/MockFixedIntBlockPostingsFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/mockintblock/MockFixedIntBlockPostingsFormat.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/mockintblock/MockFixedIntBlockPostingsFormat.java (original)
+++ lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/mockintblock/MockFixedIntBlockPostingsFormat.java Sun Aug 19 09:35:25 2012
@@ -72,6 +72,9 @@ public class MockFixedIntBlockPostingsFo
     return new MockIntFactory(blockSize);
   }
 
+  /**
+   * Encodes blocks as vInts of a fixed block size.
+   */
   public static class MockIntFactory extends IntStreamFactory {
     private final int blockSize;
 

Modified: lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/mockintblock/MockVariableIntBlockPostingsFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/mockintblock/MockVariableIntBlockPostingsFormat.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/mockintblock/MockVariableIntBlockPostingsFormat.java (original)
+++ lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/mockintblock/MockVariableIntBlockPostingsFormat.java Sun Aug 19 09:35:25 2012
@@ -70,6 +70,10 @@ public class MockVariableIntBlockPosting
     return getName() + "(baseBlockSize="+ baseBlockSize + ")";
   }
 
+  /**
+   * If the first value is <= 3, writes baseBlockSize vInts at once,
+   * otherwise writes 2*baseBlockSize vInts.
+   */
   public static class MockIntFactory extends IntStreamFactory {
 
     private final int baseBlockSize;

Modified: lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/mocksep/MockSingleIntFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/mocksep/MockSingleIntFactory.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/mocksep/MockSingleIntFactory.java (original)
+++ lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/mocksep/MockSingleIntFactory.java Sun Aug 19 09:35:25 2012
@@ -25,7 +25,10 @@ import org.apache.lucene.codecs.sep.IntS
 
 import java.io.IOException;
 
-/** @lucene.experimental */
+/** 
+ * Encodes ints directly as vInts with {@link MockSingleIntIndexOutput}
+ * @lucene.experimental 
+ */
 public class MockSingleIntFactory extends IntStreamFactory {
   @Override
   public IntIndexInput openInput(Directory dir, String fileName, IOContext context) throws IOException {

Modified: lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/mocksep/MockSingleIntIndexInput.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/mocksep/MockSingleIntIndexInput.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/mocksep/MockSingleIntIndexInput.java (original)
+++ lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/codecs/mocksep/MockSingleIntIndexInput.java Sun Aug 19 09:35:25 2012
@@ -28,7 +28,7 @@ import org.apache.lucene.store.IndexInpu
 
 /** Reads IndexInputs written with {@link
  *  MockSingleIntIndexOutput}.  NOTE: this class is just for
- *  demonstration puprposes (it is a very slow way to read a
+ *  demonstration purposes (it is a very slow way to read a
  *  block of ints).
  *
  * @lucene.experimental
@@ -54,6 +54,9 @@ public class MockSingleIntIndexInput ext
     in.close();
   }
 
+  /**
+   * Just reads a vInt directly from the file.
+   */
   public static class Reader extends IntIndexInput.Reader {
     // clone:
     private final IndexInput in;

Modified: lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/index/AlcoholicMergePolicy.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/index/AlcoholicMergePolicy.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/index/AlcoholicMergePolicy.java (original)
+++ lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/index/AlcoholicMergePolicy.java Sun Aug 19 09:35:25 2012
@@ -68,7 +68,7 @@ public class AlcoholicMergePolicy extend
     return info.sizeInBytes();
   }
   
-  public static enum Drink {
+  private static enum Drink {
     
     Beer(15), Wine(17), Champagne(21), WhiteRussian(22), SingleMalt(30);
     
@@ -77,11 +77,6 @@ public class AlcoholicMergePolicy extend
     Drink(long drunkFactor) {
       this.drunkFactor = drunkFactor;
     }
-    
-    public long drunk() {
-      return drunkFactor;
-    }
-    
   }
   
 }

Modified: lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/index/FieldFilterAtomicReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/index/FieldFilterAtomicReader.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/index/FieldFilterAtomicReader.java (original)
+++ lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/index/FieldFilterAtomicReader.java Sun Aug 19 09:35:25 2012
@@ -20,9 +20,14 @@ package org.apache.lucene.index;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Iterator;
-import java.util.NoSuchElementException;
 import java.util.Set;
 
+import org.apache.lucene.util.FilterIterator;
+
+/**
+ * A {@link FilterAtomicReader} that exposes only a subset
+ * of fields from the underlying wrapped reader.
+ */
 public final class FieldFilterAtomicReader extends FilterAtomicReader {
   
   private final Set<String> fields;
@@ -58,8 +63,9 @@ public final class FieldFilterAtomicRead
       return null;
     }
     f = new FieldFilterFields(f);
-    // we need to check for emptyness, so we can return null:
-    return (f.iterator().next() == null) ? null : f;
+    // we need to check for emptyness, so we can return
+    // null:
+    return f.iterator().hasNext() ? f : null;
   }
 
   @Override
@@ -134,55 +140,16 @@ public final class FieldFilterAtomicRead
 
     @Override
     public int size() {
-      // TODO: add faster implementation!
-      int c = 0;
-      final Iterator<String> it = iterator();
-      while (it.next() != null) {
-        c++;
-      }
-      return c;
+      // this information is not cheap, return -1 like MultiFields does:
+      return -1;
     }
 
     @Override
     public Iterator<String> iterator() {
-      final Iterator<String> in = super.iterator();
-      return new Iterator<String>() {
-        String cached = null;
-        
-        @Override
-        public String next() {
-          if (cached != null) {
-            String next = cached;
-            cached = null;
-            return next;
-          } else {
-            String next = doNext();
-            if (next == null) {
-              throw new NoSuchElementException();
-            } else {
-              return next;
-            }
-          }
-        }
-
-        @Override
-        public boolean hasNext() {
-          return cached != null || (cached = doNext()) != null;
-        }
-        
-        private String doNext() {
-          while (in.hasNext()) {
-            String field = in.next();
-            if (hasField(field)) {
-              return field;
-            }
-          }
-          return null;
-        }
-
+      return new FilterIterator<String>(super.iterator()) {
         @Override
-        public void remove() {
-          throw new UnsupportedOperationException();
+        protected boolean predicateFunction(String field) {
+          return hasField(field);
         }
       };
     }

Modified: lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/search/ShardSearchingTestBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/search/ShardSearchingTestBase.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/search/ShardSearchingTestBase.java (original)
+++ lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/search/ShardSearchingTestBase.java Sun Aug 19 09:35:25 2012
@@ -42,9 +42,15 @@ import org.apache.lucene.util._TestUtil;
 //   - doc blocks?  so we can test joins/grouping...
 //   - controlled consistency (NRTMgr)
 
+/**
+ * Base test class for simulating distributed search across multiple shards.
+ */
 public abstract class ShardSearchingTestBase extends LuceneTestCase {
 
   // TODO: maybe SLM should throw this instead of returning null...
+  /**
+   * Thrown when the lease for a searcher has expired.
+   */
   public static class SearcherExpiredException extends RuntimeException {
     public SearcherExpiredException(String message) {
       super(message);
@@ -604,6 +610,9 @@ public abstract class ShardSearchingTest
     }
   }
 
+  /**
+   * An IndexSearcher and associated version (lease)
+   */
   protected static class SearcherAndVersion {
     public final IndexSearcher searcher;
     public final long version;

Modified: lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java (original)
+++ lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java Sun Aug 19 09:35:25 2012
@@ -146,6 +146,12 @@ public class MockDirectoryWrapper extend
     preventDoubleWrite = value;
   }
   
+  /**
+   * Enum for controlling hard disk throttling.
+   * Set via {@link MockDirectoryWrapper #setThrottling(Throttling)}
+   * <p>
+   * WARNING: can make tests very slow.
+   */
   public static enum Throttling {
     /** always emulate a slow hard disk. could be very slow! */
     ALWAYS,

Modified: lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/CloseableFile.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/CloseableFile.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/CloseableFile.java (original)
+++ lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/CloseableFile.java Sun Aug 19 09:35:25 2012
@@ -24,25 +24,30 @@ import java.io.*;
  */
 final class CloseableFile implements Closeable {
   private final File file;
+  private final TestRuleMarkFailure failureMarker;
 
-  public CloseableFile(File file) {
+  public CloseableFile(File file, TestRuleMarkFailure failureMarker) {
     this.file = file;
+    this.failureMarker = failureMarker;
   }
 
   @Override
   public void close() throws IOException {
-    if (file.exists()) {
-      try {
-        _TestUtil.rmDir(file);
-      } catch (IOException e) {
-        // Ignore the exception from rmDir.
-      }
-
-      // Re-check.
+    // only if there were no other test failures.
+    if (failureMarker.wasSuccessful()) {
       if (file.exists()) {
-        throw new IOException(
+        try {
+          _TestUtil.rmDir(file);
+        } catch (IOException e) {
+          // Ignore the exception from rmDir.
+        }
+
+        // Re-check.
+        if (file.exists()) {
+          throw new IOException(
             "Could not remove: " + file.getAbsolutePath());
-      }
+        }
+    }
     }
   }
 }
\ No newline at end of file

Modified: lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/English.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/English.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/English.java (original)
+++ lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/English.java Sun Aug 19 09:35:25 2012
@@ -18,6 +18,7 @@ package org.apache.lucene.util;
  */
 
 /**
+ * Converts numbers to english strings for testing.
  * @lucene.internal
  */ 
 public final class English {

Modified: lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/RollingBuffer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/RollingBuffer.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/RollingBuffer.java (original)
+++ lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/RollingBuffer.java Sun Aug 19 09:35:25 2012
@@ -26,6 +26,9 @@ package org.apache.lucene.util;
  *  @lucene.internal */
 public abstract class RollingBuffer<T extends RollingBuffer.Resettable> {
 
+  /**
+   * Implement to reset an instance
+   */
   public static interface Resettable {
     public void reset();
   }

Modified: lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleFieldCacheSanity.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleFieldCacheSanity.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleFieldCacheSanity.java (original)
+++ lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleFieldCacheSanity.java Sun Aug 19 09:35:25 2012
@@ -1,10 +1,5 @@
 package org.apache.lucene.util;
 
-import org.apache.lucene.search.FieldCache;
-import org.junit.rules.TestRule;
-import org.junit.runner.Description;
-import org.junit.runners.model.Statement;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -22,6 +17,30 @@ import org.junit.runners.model.Statement
  * limitations under the License.
  */
 
+import org.apache.lucene.search.FieldCache;
+import org.apache.lucene.util.FieldCacheSanityChecker; // javadocs
+import org.junit.rules.TestRule;
+import org.junit.runner.Description;
+import org.junit.runners.model.Statement;
+
+/**
+ * This rule will fail the test if it has insane field caches.
+ * <p>
+ * calling assertSaneFieldCaches here isn't as useful as having test
+ * classes call it directly from the scope where the index readers
+ * are used, because they could be gc'ed just before this tearDown
+ * method is called.
+ * <p>
+ * But it's better then nothing.
+ * <p>
+ * If you are testing functionality that you know for a fact
+ * "violates" FieldCache sanity, then you should either explicitly
+ * call purgeFieldCache at the end of your test method, or refactor
+ * your Test class so that the inconsistent FieldCache usages are
+ * isolated in distinct test methods
+ * 
+ * @see FieldCacheSanityChecker
+ */
 public class TestRuleFieldCacheSanity implements TestRule {
   
   @Override
@@ -33,18 +52,6 @@ public class TestRuleFieldCacheSanity im
 
         Throwable problem = null;
         try {
-          // calling assertSaneFieldCaches here isn't as useful as having test
-          // classes call it directly from the scope where the index readers
-          // are used, because they could be gc'ed just before this tearDown
-          // method is called.
-          //
-          // But it's better then nothing.
-          //
-          // If you are testing functionality that you know for a fact
-          // "violates" FieldCache sanity, then you should either explicitly
-          // call purgeFieldCache at the end of your test method, or refactor
-          // your Test class so that the inconsistent FieldCache usages are
-          // isolated in distinct test methods
           LuceneTestCase.assertSaneFieldCaches(d.getDisplayName());
         } catch (Throwable t) {
           problem = t;

Modified: lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleStoreClassName.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleStoreClassName.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleStoreClassName.java (original)
+++ lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleStoreClassName.java Sun Aug 19 09:35:25 2012
@@ -21,6 +21,10 @@ import org.junit.rules.TestRule;
 import org.junit.runner.Description;
 import org.junit.runners.model.Statement;
 
+/**
+ * Stores the suite name so you can retrieve it
+ * from {@link #getTestClass()}
+ */
 public class TestRuleStoreClassName implements TestRule {
   private volatile Description description;
 

Modified: lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/_TestUtil.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/_TestUtil.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/_TestUtil.java (original)
+++ lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/_TestUtil.java Sun Aug 19 09:35:25 2012
@@ -94,7 +94,7 @@ public class _TestUtil {
     try {
       File f = createTempFile(desc, "tmp", LuceneTestCase.TEMP_DIR);
       f.delete();
-      LuceneTestCase.closeAfterSuite(new CloseableFile(f));
+      LuceneTestCase.closeAfterSuite(new CloseableFile(f, LuceneTestCase.suiteFailureMarker));
       return f;
     } catch (IOException e) {
       throw new RuntimeException(e);
@@ -136,7 +136,7 @@ public class _TestUtil {
     rmDir(destDir);
 
     destDir.mkdir();
-    LuceneTestCase.closeAfterSuite(new CloseableFile(destDir));
+    LuceneTestCase.closeAfterSuite(new CloseableFile(destDir, LuceneTestCase.suiteFailureMarker));
 
     while (entries.hasMoreElements()) {
       ZipEntry entry = entries.nextElement();

Modified: lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/automaton/AutomatonTestUtil.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/automaton/AutomatonTestUtil.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/automaton/AutomatonTestUtil.java (original)
+++ lucene/dev/branches/lucene3312/lucene/test-framework/src/java/org/apache/lucene/util/automaton/AutomatonTestUtil.java Sun Aug 19 09:35:25 2012
@@ -127,6 +127,13 @@ public class AutomatonTestUtil {
     return code;
   }
 
+  /**
+   * Lets you retrieve random strings accepted
+   * by an Automaton.
+   * <p>
+   * Once created, call {@link #getRandomAcceptedString(Random)}
+   * to get a new string (in UTF-32 codepoints).
+   */
   public static class RandomAcceptedStrings {
 
     private final Map<Transition,Boolean> leadsToAccept;

Modified: lucene/dev/branches/lucene3312/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/solr/CHANGES.txt?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/solr/CHANGES.txt (original)
+++ lucene/dev/branches/lucene3312/solr/CHANGES.txt Sun Aug 19 09:35:25 2012
@@ -26,6 +26,14 @@ $Id$
 
 ==================  4.0.0 ==================
 
+Versions of Major Components
+---------------------
+Apache Tika 1.2
+Carrot2 3.5.0
+Velocity 1.6.4 and Velocity Tools 2.0
+Apache UIMA 2.3.1
+Apache ZooKeeper 3.3.6
+
 Upgrading from Solr 4.0.0-BETA
 ----------------------
 
@@ -63,6 +71,27 @@ Bug Fixes
 * SOLR-3649: Fixed bug in JavabinLoader that caused deleteById(List<String> ids)
   to not work in SolrJ (siren)
 
+* SOLR-3730: Rollback is not implemented quite right and can cause corner case fails in 
+  SolrCloud tests. (rmuir, Mark Miller)
+
+* SOLR-2981: Fixed StatsComponent to no longer return duplicated information 
+  when requesting multiple stats.facet fields.
+  (Roman Kliewer via hossman)
+
+Other Changes
+----------------------
+
+* SOLR-3690: Fixed binary release packages to include dependencie needed for 
+  the solr-test-framework (hossman)
+
+* SOLR-2857: The /update/json and /update/csv URLs were restored to aid
+  in the migration of existing clients.  (yonik)
+
+* SOLR-3691: SimplePostTool: Mode for crawling/posting web pages
+  See http://wiki.apache.org/solr/ExtractingRequestHandler for examples (janhoy)
+
+* SOLR-3707: Upgrade Solr to Tika 1.2 (janhoy)
+
 ==================  4.0.0-BETA ===================
 
 
@@ -271,7 +300,6 @@ Other Changes
   Also, the configuration itself can be passed using the "dataConfig" parameter rather than
   using a file (this previously worked in debug mode only).  When configuration errors are 
   encountered, the error message is returned in XML format.  (James Dyer)
-  
 * SOLR-3439: Make SolrCell easier to use out of the box. Also improves "/browse" to display
   rich-text documents correctly, along with facets for author and content_type.  
   With the new "content" field, highlighting of body is supported. See also SOLR-3672 for

Modified: lucene/dev/branches/lucene3312/solr/NOTICE.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/solr/NOTICE.txt?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/solr/NOTICE.txt (original)
+++ lucene/dev/branches/lucene3312/solr/NOTICE.txt Sun Aug 19 09:35:25 2012
@@ -310,12 +310,11 @@ Copyright 2004 Sun Microsystems, Inc. (R
 
 Copyright 2002-2008 by John Cowan (TagSoup -- http://ccil.org/~cowan/XML/tagsoup/)
 
-Copyright (C) 1999-2007 Shigeru Chiba. All Rights Reserved.
-(Javassist, MPL licensed: http://www.csg.ci.i.u-tokyo.ac.jp/~chiba/javassist/)
-
 Copyright (C) 1994-2007 by the Xiph.org Foundation, http://www.xiph.org/ (OggVorbis)
 
-Scannotation (C) Bill Burke
+Copyright 2012 Kohei Taketa juniversalchardet (http://code.google.com/p/juniversalchardet/)
+
+Lasse Collin and others, XZ for Java (http://tukaani.org/xz/java.html)
 
 =========================================================================
 ==  Language Detection Notices                                         ==

Modified: lucene/dev/branches/lucene3312/solr/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/solr/build.xml?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/solr/build.xml (original)
+++ lucene/dev/branches/lucene3312/solr/build.xml Sun Aug 19 09:35:25 2012
@@ -386,8 +386,9 @@
       <tarfileset dir="."
                   prefix="${fullnamever}"
                   includes="LICENSE.txt NOTICE.txt CHANGES.txt README.txt example/**
-                             client/README.txt client/ruby/solr-ruby/** contrib/**/lib/**
-                             contrib/**/README.txt licenses/**"
+                            client/README.txt client/ruby/solr-ruby/** 
+                            contrib/**/lib/** contrib/**/README.txt 
+                            licenses/**"
                   excludes="lib/README.committers.txt **/data/ **/logs/* 
                             **/classes/ **/*.sh **/ivy.xml **/build.xml
                             **/bin/ **/*.iml **/*.ipr **/*.iws **/pom.xml 
@@ -401,7 +402,9 @@
                   includes="example/**/*.sh example/**/bin/" />
       <tarfileset dir="."
                   prefix="${fullnamever}"
-                  includes="dist/*.jar dist/*.war dist/solrj-lib/*"
+                  includes="dist/*.jar dist/*.war 
+                            dist/solrj-lib/*
+                            dist/test-framework/**"
                   excludes="**/*.tgz **/*.zip **/*.md5 **/*src*.jar **/*docs*.jar **/*.sha1" />
       <tarfileset dir="${dest}/docs"
                   prefix="${fullnamever}/docs" />

Modified: lucene/dev/branches/lucene3312/solr/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/solr/common-build.xml?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/solr/common-build.xml (original)
+++ lucene/dev/branches/lucene3312/solr/common-build.xml Sun Aug 19 09:35:25 2012
@@ -193,7 +193,7 @@
   <property name="lucenedocs" location="${common.dir}/build/docs"/>
 
   <!-- dependency to ensure all lucene javadocs are present -->
-  <target name="lucene-javadocs" depends="javadocs-lucene-core,javadocs-analyzers-common,javadocs-analyzers-icu,javadocs-analyzers-kuromoji,javadocs-analyzers-phonetic,javadocs-analyzers-smartcn,javadocs-analyzers-morfologik,javadocs-analyzers-stempel,javadocs-analyzers-uima,javadocs-suggest,javadocs-grouping,javadocs-queries,javadocs-queryparser,javadocs-highlighter,javadocs-memory,javadocs-misc,javadocs-spatial"/>
+  <target name="lucene-javadocs" depends="javadocs-lucene-core,javadocs-analyzers-common,javadocs-analyzers-icu,javadocs-analyzers-kuromoji,javadocs-analyzers-phonetic,javadocs-analyzers-smartcn,javadocs-analyzers-morfologik,javadocs-analyzers-stempel,javadocs-analyzers-uima,javadocs-suggest,javadocs-grouping,javadocs-queries,javadocs-queryparser,javadocs-highlighter,javadocs-memory,javadocs-misc,javadocs-spatial,javadocs-test-framework"/>
 
   <!-- create javadocs for the current module -->
   <target name="javadocs" depends="compile-core,define-lucene-javadoc-url,lucene-javadocs">

Modified: lucene/dev/branches/lucene3312/solr/contrib/extraction/ivy.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/solr/contrib/extraction/ivy.xml?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/solr/contrib/extraction/ivy.xml (original)
+++ lucene/dev/branches/lucene3312/solr/contrib/extraction/ivy.xml Sun Aug 19 09:35:25 2012
@@ -20,36 +20,36 @@
     <info organisation="org.apache.solr" module="extraction"/>
     <dependencies>
       <!-- Tika JARs -->
-      <dependency org="org.apache.tika" name="tika-core" rev="1.1" transitive="false"/>
-      <dependency org="org.apache.tika" name="tika-parsers" rev="1.1" transitive="false"/>
-      <!-- Tika dependencies - see http://tika.apache.org/1.1/gettingstarted.html#Using_Tika_as_a_Maven_dependency -->
+      <dependency org="org.apache.tika" name="tika-core" rev="1.2" transitive="false"/>
+      <dependency org="org.apache.tika" name="tika-parsers" rev="1.2" transitive="false"/>
+      <!-- Tika dependencies - see http://tika.apache.org/1.2/gettingstarted.html#Using_Tika_as_a_Maven_dependency -->
       <!-- When upgrading Tika, upgrade dependencies versions and add any new ones
            (except slf4j-api, commons-codec, commons-logging, geronimo-stax-api_1.0_spec) -->
       <dependency org="org.gagravarr" name="vorbis-java-tika" rev="0.1" transitive="false"/>
       <dependency org="org.gagravarr" name="vorbis-java-core" rev="0.1" transitive="false"/>
       <dependency org="edu.ucar" name="netcdf" rev="4.2-min" transitive="false"/>
-      <dependency org="org.apache.james" name="apache-mime4j-core" rev="0.7" transitive="false"/>
-      <dependency org="org.apache.james" name="apache-mime4j-dom" rev="0.7" transitive="false"/>
-      <dependency org="org.apache.commons" name="commons-compress" rev="1.3" transitive="false"/>
-      <dependency org="org.apache.pdfbox" name="pdfbox" rev="1.6.0" transitive="false"/>
-      <dependency org="org.apache.pdfbox" name="fontbox" rev="1.6.0" transitive="false"/>
-      <dependency org="org.apache.pdfbox" name="jempbox" rev="1.6.0" transitive="false"/>
+      <dependency org="org.apache.james" name="apache-mime4j-core" rev="0.7.2" transitive="false"/>
+      <dependency org="org.apache.james" name="apache-mime4j-dom" rev="0.7.2" transitive="false"/>
+      <dependency org="org.apache.commons" name="commons-compress" rev="1.4.1" transitive="false"/>
+      <dependency org="org.apache.pdfbox" name="pdfbox" rev="1.7.0" transitive="false"/>
+      <dependency org="org.apache.pdfbox" name="fontbox" rev="1.7.0" transitive="false"/>
+      <dependency org="org.apache.pdfbox" name="jempbox" rev="1.7.0" transitive="false"/>
       <dependency org="org.bouncycastle" name="bcmail-jdk15" rev="1.45" transitive="false"/>
       <dependency org="org.bouncycastle" name="bcprov-jdk15" rev="1.45" transitive="false"/>
-      <dependency org="org.apache.poi" name="poi" rev="3.8-beta5" transitive="false"/>
-      <dependency org="org.apache.poi" name="poi-scratchpad" rev="3.8-beta5" transitive="false"/>
-      <dependency org="org.apache.poi" name="poi-ooxml" rev="3.8-beta5" transitive="false"/>
-      <dependency org="org.apache.poi" name="poi-ooxml-schemas" rev="3.8-beta5" transitive="false"/>
+      <dependency org="org.apache.poi" name="poi" rev="3.8" transitive="false"/>
+      <dependency org="org.apache.poi" name="poi-scratchpad" rev="3.8" transitive="false"/>
+      <dependency org="org.apache.poi" name="poi-ooxml" rev="3.8" transitive="false"/>
+      <dependency org="org.apache.poi" name="poi-ooxml-schemas" rev="3.8" transitive="false"/>
       <dependency org="org.apache.xmlbeans" name="xmlbeans" rev="2.3.0" transitive="false"/>
       <dependency org="dom4j" name="dom4j" rev="1.6.1" transitive="false"/>
       <dependency org="org.ccil.cowan.tagsoup" name="tagsoup" rev="1.2.1" transitive="false"/>
-      <dependency org="com.googlecode.mp4parser" name="isoparser" rev="1.0-beta-5" transitive="false"/>
-      <dependency org="net.sf.scannotation" name="scannotation" rev="1.0.2" transitive="false"/>
-      <dependency org="javassist" name="javassist" rev="3.6.0.GA" transitive="false"/>
+      <dependency org="com.googlecode.mp4parser" name="isoparser" rev="1.0-RC-1" transitive="false"/>
       <dependency org="com.drewnoakes" name="metadata-extractor" rev="2.4.0-beta-1" transitive="false"/>
       <dependency org="de.l3s.boilerpipe" name="boilerpipe" rev="1.1.0" transitive="false"/>
       <dependency org="rome" name="rome" rev="0.9" transitive="false"/>
       <dependency org="jdom" name="jdom" rev="1.0" transitive="false"/>
+      <dependency org="com.googlecode.juniversalchardet" name="juniversalchardet" rev="1.0.3" transitive="false"/>
+      <dependency org="org.tukaani" name="xz" rev="1.0" transitive="false"/>
       <!-- Other ExtracingRequestHandler dependencies -->
       <dependency org="com.ibm.icu" name="icu4j" rev="49.1" transitive="false"/>
       <dependency org="xerces" name="xercesImpl" rev="2.9.1" transitive="false"/>

Modified: lucene/dev/branches/lucene3312/solr/contrib/extraction/src/test/org/apache/solr/handler/extraction/ExtractingRequestHandlerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/solr/contrib/extraction/src/test/org/apache/solr/handler/extraction/ExtractingRequestHandlerTest.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/solr/contrib/extraction/src/test/org/apache/solr/handler/extraction/ExtractingRequestHandlerTest.java (original)
+++ lucene/dev/branches/lucene3312/solr/contrib/extraction/src/test/org/apache/solr/handler/extraction/ExtractingRequestHandlerTest.java Sun Aug 19 09:35:25 2012
@@ -64,8 +64,7 @@ public class ExtractingRequestHandlerTes
             "fmap.producer", "extractedProducer",
             "fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
             "fmap.Creation-Date", "extractedDate",
-            "fmap.AAPL:Keywords", "ignored_a",
-            "fmap.xmpTPg:NPages", "ignored_a",
+            "uprefix", "ignored_",
             "fmap.Author", "extractedAuthor",
             "fmap.content", "extractedContent",
            "literal.id", "one",
@@ -81,6 +80,7 @@ public class ExtractingRequestHandlerTes
             "fmap.Author", "extractedAuthor",
             "fmap.language", "extractedLanguage",
             "literal.id", "two",
+            "uprefix", "ignored_",
             "fmap.content", "extractedContent",
             "fmap.Last-Modified", "extractedDate"
     );
@@ -136,6 +136,7 @@ public class ExtractingRequestHandlerTes
             "fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
             "fmap.Author", "extractedAuthor",
             "literal.id", "three",
+            "uprefix", "ignored_",
             "fmap.content", "extractedContent",
             "fmap.language", "extractedLanguage",
             "fmap.Last-Modified", "extractedDate"
@@ -206,6 +207,7 @@ public class ExtractingRequestHandlerTes
             "fmap.Author", "extractedAuthor",
             "fmap.content", "extractedContent",
             "literal.id", "one",
+            "uprefix", "ignored_",
             "fmap.language", "extractedLanguage",
             "literal.extractionLiteralMV", "one",
             "literal.extractionLiteralMV", "two",
@@ -374,9 +376,8 @@ public class ExtractingRequestHandlerTes
     loadLocal("extraction/arabic.pdf", "fmap.created", "extractedDate", "fmap.producer", "extractedProducer",
         "fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
         "fmap.Creation-Date", "extractedDate",
-        "fmap.AAPL:Keywords", "ignored_a",
-        "fmap.xmpTPg:NPages", "ignored_a",
         "fmap.Author", "extractedAuthor",
+        "uprefix", "ignored_",
         "fmap.content", "wdf_nocase",
        "literal.id", "one",
         "fmap.Last-Modified", "extractedDate");
@@ -404,8 +405,7 @@ public class ExtractingRequestHandlerTes
       loadLocal("extraction/password-is-solrcell.docx", "fmap.created", "extractedDate", "fmap.producer", "extractedProducer",
           "fmap.creator", "extractedCreator", "fmap.Keywords", "extractedKeywords",
           "fmap.Creation-Date", "extractedDate",
-          "fmap.AAPL:Keywords", "ignored_a",
-          "fmap.xmpTPg:NPages", "ignored_a",
+          "uprefix", "ignored_",
           "fmap.Author", "extractedAuthor",
           "fmap.content", "wdf_nocase",
           "literal.id", "one",
@@ -462,8 +462,7 @@ public class ExtractingRequestHandlerTes
             "fmap.content", "extractedContent",
             "fmap.language", "extractedLanguage",
             "fmap.Creation-Date", "extractedDate",
-            "fmap.AAPL:Keywords", "ignored_a",
-            "fmap.xmpTPg:NPages", "ignored_a",
+            "uprefix", "ignored_",
             "fmap.Last-Modified", "extractedDate");
 
     // Here the literal value should override the Tika-parsed title:
@@ -478,8 +477,7 @@ public class ExtractingRequestHandlerTes
             "fmap.content", "extractedContent",
             "fmap.language", "extractedLanguage",
             "fmap.Creation-Date", "extractedDate",
-            "fmap.AAPL:Keywords", "ignored_a",
-            "fmap.xmpTPg:NPages", "ignored_a",
+            "uprefix", "ignored_",
             "fmap.Last-Modified", "extractedDate");
 
     // Here we mimic the old behaviour where literals are added, not overridden
@@ -498,8 +496,7 @@ public class ExtractingRequestHandlerTes
             "fmap.content", "extractedContent",
             "fmap.language", "extractedLanguage",
             "fmap.Creation-Date", "extractedDate",
-            "fmap.AAPL:Keywords", "ignored_a",
-            "fmap.xmpTPg:NPages", "ignored_a",
+            "uprefix", "ignored_",
             "fmap.Last-Modified", "extractedDate");
 
     assertU(commit());

Modified: lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/core/CachingDirectoryFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/core/CachingDirectoryFactory.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/core/CachingDirectoryFactory.java (original)
+++ lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/core/CachingDirectoryFactory.java Sun Aug 19 09:35:25 2012
@@ -125,6 +125,7 @@ public abstract class CachingDirectoryFa
       }
       cacheValue.refCnt--;
       if (cacheValue.refCnt == 0 && cacheValue.doneWithDir) {
+        log.info("Closing directory:" + cacheValue.path);
         directory.close();
         byDirectoryCache.remove(directory);
         byPathCache.remove(cacheValue.path);
@@ -194,6 +195,7 @@ public abstract class CachingDirectoryFa
         
         byDirectoryCache.put(directory, newCacheValue);
         byPathCache.put(fullPath, newCacheValue);
+        log.info("return new directory for " + fullPath + " forceNew:" + forceNew);
       } else {
         cacheValue.refCnt++;
       }

Modified: lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/core/SolrCore.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/core/SolrCore.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/core/SolrCore.java (original)
+++ lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/core/SolrCore.java Sun Aug 19 09:35:25 2012
@@ -1554,7 +1554,7 @@ public final class SolrCore implements S
         } catch (Throwable e) {
           // do not allow decref() operations to fail since they are typically called in finally blocks
           // and throwing another exception would be very unexpected.
-          SolrException.log(log, "Error closing searcher:", e);
+          SolrException.log(log, "Error closing searcher:" + this, e);
         }
       }
     };

Modified: lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/handler/CSVRequestHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/handler/CSVRequestHandler.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/handler/CSVRequestHandler.java (original)
+++ lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/handler/CSVRequestHandler.java Sun Aug 19 09:35:25 2012
@@ -29,7 +29,7 @@ public class CSVRequestHandler extends U
   public void init(NamedList args) {
     super.init(args);
     setAssumeContentType("application/csv");
-    log.warn("Using deprecated class: "+this.getClass().getSimpleName()+" -- replace with UpdateRequestHandler");
+    // log.warn("Using deprecated class: "+this.getClass().getSimpleName()+" -- replace with UpdateRequestHandler");
   }
 
   //////////////////////// SolrInfoMBeans methods //////////////////////

Modified: lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/handler/JsonUpdateRequestHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/handler/JsonUpdateRequestHandler.java?rev=1374718&r1=1374717&r2=1374718&view=diff
==============================================================================
--- lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/handler/JsonUpdateRequestHandler.java (original)
+++ lucene/dev/branches/lucene3312/solr/core/src/java/org/apache/solr/handler/JsonUpdateRequestHandler.java Sun Aug 19 09:35:25 2012
@@ -29,7 +29,7 @@ public class JsonUpdateRequestHandler ex
   public void init(NamedList args) {
     super.init(args);
     setAssumeContentType("application/json");
-    log.warn("Using deprecated class: "+this.getClass().getSimpleName()+" -- replace with UpdateRequestHandler");
+    // log.warn("Using deprecated class: "+this.getClass().getSimpleName()+" -- replace with UpdateRequestHandler");
   }
 
   //////////////////////// SolrInfoMBeans methods //////////////////////



Mime
View raw message