lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1554710 - in /lucene/dev/branches/lucene5339/lucene: core/src/java/org/apache/lucene/document/ facet/ facet/src/java/org/apache/lucene/facet/ facet/src/java/org/apache/lucene/facet/range/ facet/src/java/org/apache/lucene/facet/sortedset/ f...
Date Thu, 02 Jan 2014 00:23:25 GMT
Author: mikemccand
Date: Thu Jan  2 00:23:24 2014
New Revision: 1554710

URL: http://svn.apache.org/r1554710
Log:
LUCENE-5339: javadocs

Modified:
    lucene/dev/branches/lucene5339/lucene/core/src/java/org/apache/lucene/document/Field.java
    lucene/dev/branches/lucene5339/lucene/facet/build.xml
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/CachedOrdinalsReader.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/DocValuesOrdinalsReader.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/DrillSideways.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/FacetResult.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/Facets.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/FacetsCollector.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/FacetsConfig.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/LabelAndValue.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/MultiFacets.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/OrdinalsReader.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/TopOrdAndFloatQueue.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/TopOrdAndIntQueue.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/range/DoubleRange.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/range/LongRange.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/range/Range.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/range/RangeFacetCounts.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/sortedset/SortedSetDocValuesFacetCounts.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/sortedset/SortedSetDocValuesFacetField.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/sortedset/SortedSetDocValuesReaderState.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/AssociationFacetField.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/FacetLabel.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/FloatTaxonomyFacets.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/IntTaxonomyFacets.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/ParallelTaxonomyArrays.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/PrintTaxonomyStats.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/SearcherTaxonomyManager.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/TaxonomyFacetSumValueSource.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/TaxonomyFacets.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/TaxonomyReader.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyReader.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/Cl2oTaxonomyWriterCache.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/CollisionMap.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/CompactLabelToOrdinal.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/LabelToOrdinal.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/LruTaxonomyWriterCache.java
    lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/NameIntCacheLRU.java

Modified: lucene/dev/branches/lucene5339/lucene/core/src/java/org/apache/lucene/document/Field.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/core/src/java/org/apache/lucene/document/Field.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/core/src/java/org/apache/lucene/document/Field.java (original)
+++ lucene/dev/branches/lucene5339/lucene/core/src/java/org/apache/lucene/document/Field.java Thu Jan  2 00:23:24 2014
@@ -554,7 +554,7 @@ public class Field implements IndexableF
       return analyzer.tokenStream(name(), stringValue());
     }
 
-    throw new IllegalArgumentException("Field must have either TokenStream, String, Reader or Number value; this=" + this);
+    throw new IllegalArgumentException("Field must have either TokenStream, String, Reader or Number value; got " + this);
   }
   
   static final class StringTokenStream extends TokenStream {

Modified: lucene/dev/branches/lucene5339/lucene/facet/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/build.xml?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/build.xml (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/build.xml Thu Jan  2 00:23:24 2014
@@ -24,7 +24,7 @@
   </description>
 
   <property name="forbidden-sysout-excludes" value="
-    org/apache/lucene/facet/util/PrintTaxonomyStats.class
+    org/apache/lucene/facet/taxonomy/PrintTaxonomyStats.class
   "/>
 
   <import file="../module-build.xml"/>

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/CachedOrdinalsReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/CachedOrdinalsReader.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/CachedOrdinalsReader.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/CachedOrdinalsReader.java Thu Jan  2 00:23:24 2014
@@ -59,6 +59,7 @@ public class CachedOrdinalsReader extend
 
   private final Map<Object,CachedOrds> ordsCache = new WeakHashMap<Object,CachedOrds>();
 
+  /** Sole constructor. */
   public CachedOrdinalsReader(OrdinalsReader source) {
     this.source = source;
   }
@@ -94,8 +95,11 @@ public class CachedOrdinalsReader extend
 
   /** Holds the cached ordinals in two paralel {@code int[]} arrays. */
   public static final class CachedOrds {
-    
+
+    /** Index into {@link #ordinals} for each document. */
     public final int[] offsets;
+
+    /** Holds ords for all docs. */
     public final int[] ordinals;
 
     /**

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/DocValuesOrdinalsReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/DocValuesOrdinalsReader.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/DocValuesOrdinalsReader.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/DocValuesOrdinalsReader.java Thu Jan  2 00:23:24 2014
@@ -30,10 +30,12 @@ import org.apache.lucene.util.IntsRef;
 public class DocValuesOrdinalsReader extends OrdinalsReader {
   private final String field;
 
+  /** Default constructor. */
   public DocValuesOrdinalsReader() {
     this(FacetsConfig.DEFAULT_INDEX_FIELD_NAME);
   }
 
+  /** Create this, with the specified indexed field name. */
   public DocValuesOrdinalsReader(String field) {
     this.field = field;
   }

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/DrillSideways.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/DrillSideways.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/DrillSideways.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/DrillSideways.java Thu Jan  2 00:23:24 2014
@@ -66,9 +66,17 @@ import org.apache.lucene.search.Weight;
  */
 public class DrillSideways {
 
+  /** {@link IndexSearcher} passed to constructor. */
   protected final IndexSearcher searcher;
+
+  /** {@link TaxonomyReader} passed to constructor. */
   protected final TaxonomyReader taxoReader;
+
+  /** {@link SortedSetDocValuesReaderState} passed to
+   *  constructor; can be null. */
   protected final SortedSetDocValuesReaderState state;
+
+  /** {@link FacetsConfig} passed to constructor. */
   protected final FacetsConfig config;
 
   /** Create a new {@code DrillSideways} instance. */
@@ -371,6 +379,8 @@ public class DrillSideways {
     return false;
   }
 
+  /** Result of a drill sideways search, including the
+   *  {@link Facets} and {@link TopDocs}. */
   public static class DrillSidewaysResult {
     /** Combined drill down & sideways results. */
     public final Facets facets;
@@ -378,6 +388,7 @@ public class DrillSideways {
     /** Hits. */
     public final TopDocs hits;
 
+    /** Sole constructor. */
     public DrillSidewaysResult(Facets facets, TopDocs hits) {
       this.facets = facets;
       this.hits = hits;

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/FacetResult.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/FacetResult.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/FacetResult.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/FacetResult.java Thu Jan  2 00:23:24 2014
@@ -19,6 +19,7 @@ package org.apache.lucene.facet;
 
 import java.util.Arrays;
 
+/** Counts or aggregates for a single dimension. */
 public final class FacetResult {
 
   /** Dimension that was requested. */
@@ -38,6 +39,7 @@ public final class FacetResult {
   /** Child counts. */
   public final LabelAndValue[] labelValues;
 
+  /** Sole constructor. */
   public FacetResult(String dim, String[] path, Number value, LabelAndValue[] labelValues, int childCount) {
     this.dim = dim;
     this.path = path;

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/Facets.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/Facets.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/Facets.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/Facets.java Thu Jan  2 00:23:24 2014
@@ -25,6 +25,10 @@ import java.util.List;
  *  @lucene.experimental */
 public abstract class Facets {
 
+  /** Default constructor. */
+  public Facets() {
+  }
+
   /** Returns the topN child labels under the specified
    *  path.  Returns null if the specified path doesn't
    *  exist or if this dimension was never seen. */

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/FacetsCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/FacetsCollector.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/FacetsCollector.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/FacetsCollector.java Thu Jan  2 00:23:24 2014
@@ -62,11 +62,19 @@ public final class FacetsCollector exten
    */
   public final static class MatchingDocs {
     
+    /** Context for this segment. */
     public final AtomicReaderContext context;
+
+    /** Which documents were seen. */
     public final FixedBitSet bits;
+
+    /** Non-sparse scores array. */
     public final float[] scores;
-    public final int totalHits;
     
+    /** Total number of hits */
+    public final int totalHits;
+
+    /** Sole constructor. */
     public MatchingDocs(AtomicReaderContext context, FixedBitSet bits, int totalHits, float[] scores) {
       this.context = context;
       this.bits = bits;
@@ -75,14 +83,18 @@ public final class FacetsCollector exten
     }
   }
 
+  /** Default constructor */
   public FacetsCollector() {
     this(false);
   }
 
+  /** Create this; if {@code keepScores} is true then a
+   *  float[] is allocated to hold score of all hits. */
   public FacetsCollector(boolean keepScores) {
     this.keepScores = keepScores;
   }
 
+  /** True if scores were saved. */
   public boolean getKeepScores() {
     return keepScores;
   }

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/FacetsConfig.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/FacetsConfig.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/FacetsConfig.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/FacetsConfig.java Thu Jan  2 00:23:24 2014
@@ -59,6 +59,8 @@ import org.apache.lucene.util.IntsRef;
  *  @lucene.experimental */
 public class FacetsConfig {
 
+  /** Which Lucene field holds the drill-downs and ords (as
+   *  doc values). */
   public static final String DEFAULT_INDEX_FIELD_NAME = "$facets";
 
   private final Map<String,DimConfig> fieldTypes = new ConcurrentHashMap<String,DimConfig>();
@@ -84,6 +86,10 @@ public class FacetsConfig {
     /** Actual field where this dimension's facet labels
      *  should be indexed */
     public String indexFieldName = DEFAULT_INDEX_FIELD_NAME;
+
+    /** Default constructor. */
+    public DimConfig() {
+    }
   }
 
   /** Default per-dimension configuration. */
@@ -148,6 +154,7 @@ public class FacetsConfig {
     ft.indexFieldName = indexFieldName;
   }
 
+  /** Returns map of field name to {@link DimConfig}. */
   public Map<String,DimConfig> getDimConfigs() {
     return fieldTypes;
   }

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/LabelAndValue.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/LabelAndValue.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/LabelAndValue.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/LabelAndValue.java Thu Jan  2 00:23:24 2014
@@ -17,6 +17,8 @@ package org.apache.lucene.facet;
  * limitations under the License.
  */
 
+/** Single label and its value, usually contained in a
+ *  {@link FacetResult}. */
 public final class LabelAndValue {
   /** Facet's label. */
   public final String label;
@@ -24,6 +26,7 @@ public final class LabelAndValue {
   /** Value associated with this label. */
   public final Number value;
 
+  /** Sole constructor. */
   public LabelAndValue(String label, Number value) {
     this.label = label;
     this.value = value;

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/MultiFacets.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/MultiFacets.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/MultiFacets.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/MultiFacets.java Thu Jan  2 00:23:24 2014
@@ -27,10 +27,13 @@ public class MultiFacets extends Facets 
   private final Map<String,Facets> dimToFacets;
   private final Facets defaultFacets;
 
+  /** Create this, with no default {@link Facets}. */
   public MultiFacets(Map<String,Facets> dimToFacets) {
     this(dimToFacets, null);
   }
 
+  /** Create this, with the specified default {@link Facets}
+   *  for fields not included in {@code dimToFacets}. */
   public MultiFacets(Map<String,Facets> dimToFacets, Facets defaultFacets) {
     this.dimToFacets = dimToFacets;
     this.defaultFacets = defaultFacets;

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/OrdinalsReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/OrdinalsReader.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/OrdinalsReader.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/OrdinalsReader.java Thu Jan  2 00:23:24 2014
@@ -26,14 +26,25 @@ import org.apache.lucene.util.IntsRef;
 
 public abstract class OrdinalsReader {
 
+  /** Returns ordinals for documents in one segment. */
   public static abstract class OrdinalsSegmentReader {
     /** Get the ordinals for this document.  ordinals.offset
      *  must always be 0! */
     public abstract void get(int doc, IntsRef ordinals) throws IOException;
+
+    /** Default constructor. */
+    public OrdinalsSegmentReader() {
+    }
+  }
+
+  /** Default constructor. */
+  public OrdinalsReader() {
   }
 
   /** Set current atomic reader. */
   public abstract OrdinalsSegmentReader getReader(AtomicReaderContext context) throws IOException;
 
+  /** Returns the indexed field name this {@code
+   *  OrdinalsReader} is reading from. */
   public abstract String getIndexFieldName();
 }

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/TopOrdAndFloatQueue.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/TopOrdAndFloatQueue.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/TopOrdAndFloatQueue.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/TopOrdAndFloatQueue.java Thu Jan  2 00:23:24 2014
@@ -23,11 +23,21 @@ import org.apache.lucene.util.PriorityQu
  *  then tie break by smallest ord. */
 public class TopOrdAndFloatQueue extends PriorityQueue<TopOrdAndFloatQueue.OrdAndValue> {
 
+  /** Holds a single entry. */
   public static final class OrdAndValue {
+
+    /** Ordinal of the entry. */
     public int ord;
+
+    /** Value associated with the ordinal. */
     public float value;
+
+    /** Default constructor. */
+    public OrdAndValue() {
+    }
   }
 
+  /** Sole constructor. */
   public TopOrdAndFloatQueue(int topN) {
     super(topN, false);
   }

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/TopOrdAndIntQueue.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/TopOrdAndIntQueue.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/TopOrdAndIntQueue.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/TopOrdAndIntQueue.java Thu Jan  2 00:23:24 2014
@@ -23,11 +23,21 @@ import org.apache.lucene.util.PriorityQu
  *  then tie break by smallest ord. */
 public class TopOrdAndIntQueue extends PriorityQueue<TopOrdAndIntQueue.OrdAndValue> {
 
+  /** Holds a single entry. */
   public static final class OrdAndValue {
+
+    /** Ordinal of the entry. */
     public int ord;
+
+    /** Value associated with the ordinal. */
     public int value;
+
+    /** Default constructor. */
+    public OrdAndValue() {
+    }
   }
 
+  /** Sole constructor. */
   public TopOrdAndIntQueue(int topN) {
     super(topN, false);
   }

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/range/DoubleRange.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/range/DoubleRange.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/range/DoubleRange.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/range/DoubleRange.java Thu Jan  2 00:23:24 2014
@@ -26,7 +26,7 @@ import org.apache.lucene.queries.functio
 import org.apache.lucene.search.DocIdSet;
 import org.apache.lucene.search.DocIdSetIterator;
 import org.apache.lucene.search.Filter;
-import org.apache.lucene.search.NumericRangeFilter;
+import org.apache.lucene.search.NumericRangeFilter; // javadocs
 import org.apache.lucene.util.Bits;
 import org.apache.lucene.util.NumericUtils;
 
@@ -35,9 +35,16 @@ public final class DoubleRange extends R
   final double minIncl;
   final double maxIncl;
 
+  /** Minimum. */
   public final double min;
+
+  /** Maximum. */
   public final double max;
+
+  /** True if the minimum value is inclusive. */
   public final boolean minInclusive;
+
+  /** True if the maximum value is inclusive. */
   public final boolean maxInclusive;
 
   /** Create a DoubleRange. */
@@ -76,6 +83,7 @@ public final class DoubleRange extends R
     this.maxIncl = maxIn;
   }
 
+  /** True if this range accepts the provided value. */
   public boolean accept(double value) {
     return value >= minIncl && value <= maxIncl;
   }

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/range/LongRange.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/range/LongRange.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/range/LongRange.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/range/LongRange.java Thu Jan  2 00:23:24 2014
@@ -26,7 +26,7 @@ import org.apache.lucene.queries.functio
 import org.apache.lucene.search.DocIdSet;
 import org.apache.lucene.search.DocIdSetIterator;
 import org.apache.lucene.search.Filter;
-import org.apache.lucene.search.NumericRangeFilter;
+import org.apache.lucene.search.NumericRangeFilter; // javadocs
 import org.apache.lucene.util.Bits;
 
 /** Represents a range over long values. */
@@ -34,9 +34,16 @@ public final class LongRange extends Ran
   final long minIncl;
   final long maxIncl;
 
+  /** Minimum. */
   public final long min;
+
+  /** Maximum. */
   public final long max;
+
+  /** True if the minimum value is inclusive. */
   public final boolean minInclusive;
+
+  /** True if the maximum value is inclusive. */
   public final boolean maxInclusive;
 
   // TODO: can we require fewer args? (same for
@@ -74,6 +81,7 @@ public final class LongRange extends Ran
     this.maxIncl = maxIn;
   }
 
+  /** True if this range accepts the provided value. */
   public boolean accept(long value) {
     return value >= minIncl && value <= maxIncl;
   }

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/range/Range.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/range/Range.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/range/Range.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/range/Range.java Thu Jan  2 00:23:24 2014
@@ -21,8 +21,11 @@ package org.apache.lucene.facet.range;
  *
  *  @lucene.experimental */
 public abstract class Range {
+
+  /** Label that identifies this range. */
   public final String label;
 
+  /** Sole constructor. */
   protected Range(String label) {
     if (label == null) {
       throw new NullPointerException("label cannot be null");
@@ -30,6 +33,7 @@ public abstract class Range {
     this.label = label;
   }
 
+  /** Invoke this for a useless range. */
   protected void failNoMatch() {
     throw new IllegalArgumentException("range \"" + label + "\" matches nothing");
   }

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/range/RangeFacetCounts.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/range/RangeFacetCounts.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/range/RangeFacetCounts.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/range/RangeFacetCounts.java Thu Jan  2 00:23:24 2014
@@ -30,9 +30,16 @@ import org.apache.lucene.queries.functio
  *
  *  @lucene.experimental */
 abstract class RangeFacetCounts extends Facets {
+  /** Ranges passed to constructor. */
   protected final Range[] ranges;
+
+  /** Counts, initialized in by subclass. */
   protected final int[] counts;
+
+  /** Our field name. */
   protected final String field;
+
+  /** Total number of hits. */
   protected int totCount;
 
   /** Create {@code RangeFacetCounts}, using {@link

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/sortedset/SortedSetDocValuesFacetCounts.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/sortedset/SortedSetDocValuesFacetCounts.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/sortedset/SortedSetDocValuesFacetCounts.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/sortedset/SortedSetDocValuesFacetCounts.java Thu Jan  2 00:23:24 2014
@@ -54,7 +54,7 @@ import org.apache.lucene.util.BytesRef;
  *  then used from a single thread, because it holds a
  *  thread-private instance of {@link SortedSetDocValues}.
  * 
- * <p><b>NOTE:<b/>: tie-break is by unicode sort order
+ * <p><b>NOTE:</b>: tie-break is by unicode sort order
  *
  * @lucene.experimental */
 public class SortedSetDocValuesFacetCounts extends Facets {

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/sortedset/SortedSetDocValuesFacetField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/sortedset/SortedSetDocValuesFacetField.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/sortedset/SortedSetDocValuesFacetField.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/sortedset/SortedSetDocValuesFacetField.java Thu Jan  2 00:23:24 2014
@@ -30,10 +30,14 @@ public class SortedSetDocValuesFacetFiel
     TYPE.setIndexed(true);
     TYPE.freeze();
   }
-  
+
+  /** Dimension. */
   public final String dim;
+
+  /** Label. */
   public final String label;
 
+  /** Sole constructor. */
   public SortedSetDocValuesFacetField(String dim, String label) {
     super("dummy", TYPE);
     this.dim = dim;

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/sortedset/SortedSetDocValuesReaderState.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/sortedset/SortedSetDocValuesReaderState.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/sortedset/SortedSetDocValuesReaderState.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/sortedset/SortedSetDocValuesReaderState.java Thu Jan  2 00:23:24 2014
@@ -50,6 +50,8 @@ public final class SortedSetDocValuesRea
   private final String field;
   private final AtomicReader topReader;
   private final int valueCount;
+
+  /** {@link IndexReader} passed to the constructor. */
   public final IndexReader origReader;
 
   /** Holds start/end range of ords, which maps to one
@@ -126,22 +128,27 @@ public final class SortedSetDocValuesRea
     }
   }
 
+  /** Return top-level doc values. */
   public SortedSetDocValues getDocValues() throws IOException {
     return topReader.getSortedSetDocValues(field);
   }
 
+  /** Returns mapping from prefix to {@link OrdRange}. */
   public Map<String,OrdRange> getPrefixToOrdRange() {
     return prefixToOrdRange;
   }
 
+  /** Returns the {@link OrdRange} for this dimension. */
   public OrdRange getOrdRange(String dim) {
     return prefixToOrdRange.get(dim);
   }
 
+  /** Indexed field we are reading. */
   public String getField() {
     return field;
   }
 
+  /** Number of unique labels. */
   public int getSize() {
     return valueCount;
   }

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/AssociationFacetField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/AssociationFacetField.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/AssociationFacetField.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/AssociationFacetField.java Thu Jan  2 00:23:24 2014
@@ -43,8 +43,13 @@ public class AssociationFacetField exten
     TYPE.freeze();
   }
   
+  /** Dimension for this field. */
   public final String dim;
+
+  /** Facet path for this field. */
   public final String[] path;
+
+  /** Associated value. */
   public final BytesRef assoc;
 
   /** Creates this from {@code dim} and {@code path} and an

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/FacetLabel.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/FacetLabel.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/FacetLabel.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/FacetLabel.java Thu Jan  2 00:23:24 2014
@@ -21,8 +21,8 @@ import static org.apache.lucene.util.Byt
 
 import java.util.Arrays;
 
-import org.apache.lucene.facet.taxonomy.writercache.LruTaxonomyWriterCache;
-import org.apache.lucene.facet.taxonomy.writercache.NameHashIntCacheLRU;
+import org.apache.lucene.facet.taxonomy.writercache.LruTaxonomyWriterCache; // javadocs
+import org.apache.lucene.facet.taxonomy.writercache.NameHashIntCacheLRU; // javadocs
 
 /**
  * Holds a sequence of string components, specifying the hierarchical name of a

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/FloatTaxonomyFacets.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/FloatTaxonomyFacets.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/FloatTaxonomyFacets.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/FloatTaxonomyFacets.java Thu Jan  2 00:23:24 2014
@@ -30,13 +30,16 @@ import org.apache.lucene.facet.TopOrdAnd
  *  to a per-ords float[]. */
 public abstract class FloatTaxonomyFacets extends TaxonomyFacets {
 
+  /** Per-ordinal value. */
   protected final float[] values;
 
+  /** Sole constructor. */
   protected FloatTaxonomyFacets(String indexFieldName, TaxonomyReader taxoReader, FacetsConfig config) throws IOException {
     super(indexFieldName, taxoReader, config);
     values = new float[taxoReader.getSize()];
   }
   
+  /** Rolls up any single-valued hierarchical dimensions. */
   protected void rollup() throws IOException {
     // Rollup any necessary dims:
     for(Map.Entry<String,DimConfig> ent : config.getDimConfigs().entrySet()) {

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/IntTaxonomyFacets.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/IntTaxonomyFacets.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/IntTaxonomyFacets.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/IntTaxonomyFacets.java Thu Jan  2 00:23:24 2014
@@ -31,13 +31,16 @@ import org.apache.lucene.facet.TopOrdAnd
 
 public abstract class IntTaxonomyFacets extends TaxonomyFacets {
 
+  /** Per-ordinal value. */
   protected final int[] values;
 
+  /** Sole constructor. */
   protected IntTaxonomyFacets(String indexFieldName, TaxonomyReader taxoReader, FacetsConfig config) throws IOException {
     super(indexFieldName, taxoReader, config);
     values = new int[taxoReader.getSize()];
   }
   
+  /** Rolls up any single-valued hierarchical dimensions. */
   protected void rollup() throws IOException {
     // Rollup any necessary dims:
     for(Map.Entry<String,DimConfig> ent : config.getDimConfigs().entrySet()) {

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/ParallelTaxonomyArrays.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/ParallelTaxonomyArrays.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/ParallelTaxonomyArrays.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/ParallelTaxonomyArrays.java Thu Jan  2 00:23:24 2014
@@ -42,6 +42,10 @@ package org.apache.lucene.facet.taxonomy
  */
 public abstract class ParallelTaxonomyArrays {
 
+  /** Sole constructor. */
+  public ParallelTaxonomyArrays() {
+  }
+
   /**
    * Returns the parents array, where {@code parents[i]} denotes the parent of
    * category ordinal {@code i}.

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/PrintTaxonomyStats.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/PrintTaxonomyStats.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/PrintTaxonomyStats.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/PrintTaxonomyStats.java Thu Jan  2 00:23:24 2014
@@ -31,6 +31,11 @@ import org.apache.lucene.store.FSDirecto
 // java -cp ../build/core/classes/java:../build/facet/classes/java org.apache.lucene.facet.util.PrintTaxonomyStats -printTree /s2/scratch/indices/wikibig.trunk.noparents.facets.Lucene41.nd1M/facets
 public class PrintTaxonomyStats {
 
+  /** Sole constructor. */
+  public PrintTaxonomyStats() {
+  }
+
+  /** Command-line tool. */
   public static void main(String[] args) throws IOException {
     boolean printTree = false;
     String path = null;
@@ -52,6 +57,7 @@ public class PrintTaxonomyStats {
     dir.close();
   }
 
+  /** Recursively prints stats for all ordinals. */
   public static void printStats(TaxonomyReader r, PrintStream out, boolean printTree) throws IOException {
     out.println(r.getSize() + " total categories.");
 

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/SearcherTaxonomyManager.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/SearcherTaxonomyManager.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/SearcherTaxonomyManager.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/SearcherTaxonomyManager.java Thu Jan  2 00:23:24 2014
@@ -43,7 +43,10 @@ public class SearcherTaxonomyManager ext
   /** Holds a matched pair of {@link IndexSearcher} and
    *  {@link TaxonomyReader} */
   public static class SearcherAndTaxonomy {
+    /** Point-in-time {@link IndexSearcher}. */
     public final IndexSearcher searcher;
+
+    /** Matching point-in-time {@link DirectoryTaxonomyReader}. */
     public final DirectoryTaxonomyReader taxonomyReader;
 
     /** Create a SearcherAndTaxonomy */

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/TaxonomyFacetSumValueSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/TaxonomyFacetSumValueSource.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/TaxonomyFacetSumValueSource.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/TaxonomyFacetSumValueSource.java Thu Jan  2 00:23:24 2014
@@ -112,6 +112,11 @@ public class TaxonomyFacetSumValueSource
    *  hit; use this to aggregate the sum of all hit scores
    *  for each facet label.  */
   public static class ScoreValueSource extends ValueSource {
+
+    /** Sole constructor. */
+    public ScoreValueSource() {
+    }
+
     @Override
     public FunctionValues getValues(@SuppressWarnings("rawtypes") Map context, AtomicReaderContext readerContext) throws IOException {
       final Scorer scorer = (Scorer) context.get("scorer");

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/TaxonomyFacets.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/TaxonomyFacets.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/TaxonomyFacets.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/TaxonomyFacets.java Thu Jan  2 00:23:24 2014
@@ -25,6 +25,7 @@ import java.util.List;
 
 import org.apache.lucene.facet.FacetResult;
 import org.apache.lucene.facet.Facets;
+import org.apache.lucene.facet.FacetsConfig.DimConfig; // javadocs
 import org.apache.lucene.facet.FacetsConfig;
 
 /** Base class for all taxonomy-based facets impls. */
@@ -43,12 +44,24 @@ public abstract class TaxonomyFacets ext
     }
   };
 
+  /** Index field name provided to the constructor. */
   protected final String indexFieldName;
+
+  /** {@code TaxonomyReader} provided to the constructor. */
   protected final TaxonomyReader taxoReader;
+
+  /** {@code FacetsConfig} provided to the constructor. */
   protected final FacetsConfig config;
+
+  /** Maps parent ordinal to its child, or -1 if the parent
+   *  is childless. */
   protected final int[] children;
+
+  /** Maps an ordinal to its sibling, or -1 if there is no
+   *  sibling. */
   protected final int[] siblings;
 
+  /** Sole constructor. */
   protected TaxonomyFacets(String indexFieldName, TaxonomyReader taxoReader, FacetsConfig config) throws IOException {
     this.indexFieldName = indexFieldName;
     this.taxoReader = taxoReader;
@@ -58,6 +71,9 @@ public abstract class TaxonomyFacets ext
     siblings = pta.siblings();
   }
 
+  /** Throws {@code IllegalArgumentException} if the
+   *  dimension is not recognized.  Otherwise, returns the
+   *  {@link DimConfig} for this dimension. */
   protected FacetsConfig.DimConfig verifyDim(String dim) {
     FacetsConfig.DimConfig dimConfig = config.getDimConfig(dim);
     if (!dimConfig.indexFieldName.equals(indexFieldName)) {

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/TaxonomyReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/TaxonomyReader.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/TaxonomyReader.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/TaxonomyReader.java Thu Jan  2 00:23:24 2014
@@ -89,6 +89,10 @@ public abstract class TaxonomyReader imp
     }
     
   }
+
+  /** Sole constructor. */
+  public TaxonomyReader() {
+  }
   
   /**
    * The root category (the category with the empty path) always has the ordinal
@@ -142,7 +146,7 @@ public abstract class TaxonomyReader imp
   protected abstract TaxonomyReader doOpenIfChanged() throws IOException;
   
   /**
-   * @throws AlreadyClosedException if this IndexReader is closed
+   * Throws {@link AlreadyClosedException} if this IndexReader is closed
    */
   protected final void ensureOpen() throws AlreadyClosedException {
     if (getRefCount() <= 0) {
@@ -217,6 +221,7 @@ public abstract class TaxonomyReader imp
    */
   public abstract int getOrdinal(FacetLabel categoryPath) throws IOException;
 
+  /** Returns ordinal for the dim + path. */
   public int getOrdinal(String dim, String[] path) throws IOException {
     String[] fullPath = new String[path.length+1];
     fullPath[0] = dim;

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyReader.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyReader.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyReader.java Thu Jan  2 00:23:24 2014
@@ -208,10 +208,14 @@ public class DirectoryTaxonomyReader ext
     }
   }
 
+  /** Open the {@link DirectoryReader} from this {@link
+   *  Directory}. */
   protected DirectoryReader openIndexReader(Directory directory) throws IOException {
     return DirectoryReader.open(directory);
   }
 
+  /** Open the {@link DirectoryReader} from this {@link
+   *  IndexWriter}. */
   protected DirectoryReader openIndexReader(IndexWriter writer) throws IOException {
     return DirectoryReader.open(writer, false);
   }
@@ -342,6 +346,9 @@ public class DirectoryTaxonomyReader ext
     }
   }
 
+  /** Returns ordinal -> label mapping, up to the provided
+   *  max ordinal or number of ordinals, whichever is
+   *  smaller. */
   public String toString(int max) {
     ensureOpen();
     StringBuilder sb = new StringBuilder();

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java Thu Jan  2 00:23:24 2014
@@ -326,6 +326,7 @@ public class DirectoryTaxonomyWriter imp
     return new Cl2oTaxonomyWriterCache(1024, 0.15f, 3);
   }
 
+  /** Create this with {@code OpenMode.CREATE_OR_APPEND}. */
   public DirectoryTaxonomyWriter(Directory d) throws IOException {
     this(d, OpenMode.CREATE_OR_APPEND);
   }
@@ -840,12 +841,16 @@ public class DirectoryTaxonomyWriter imp
      * and size-1.  
      */
     public void setSize(int size) throws IOException;
+
+    /** Record a mapping. */
     public void addMapping(int origOrdinal, int newOrdinal) throws IOException;
+
     /**
      * Call addDone() to say that all addMapping() have been done.
      * In some implementations this might free some resources. 
      */
     public void addDone() throws IOException;
+
     /**
      * Return the map from the taxonomy's original (consecutive) ordinals
      * to the new taxonomy's ordinals. If the map has to be read from disk
@@ -862,6 +867,11 @@ public class DirectoryTaxonomyWriter imp
    */
   public static final class MemoryOrdinalMap implements OrdinalMap {
     int[] map;
+
+    /** Sole constructor. */
+    public MemoryOrdinalMap() {
+    }
+
     @Override
     public void setSize(int taxonomySize) {
       map = new int[taxonomySize];
@@ -885,6 +895,7 @@ public class DirectoryTaxonomyWriter imp
     File tmpfile;
     DataOutputStream out;
 
+    /** Sole constructor. */
     public DiskOrdinalMap(File tmpfile) throws FileNotFoundException {
       this.tmpfile = tmpfile;
       out = new DataOutputStream(new BufferedOutputStream(

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/Cl2oTaxonomyWriterCache.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/Cl2oTaxonomyWriterCache.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/Cl2oTaxonomyWriterCache.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/Cl2oTaxonomyWriterCache.java Thu Jan  2 00:23:24 2014
@@ -39,6 +39,7 @@ public class Cl2oTaxonomyWriterCache imp
   
   private volatile CompactLabelToOrdinal cache;
 
+  /** Sole constructor. */
   public Cl2oTaxonomyWriterCache(int initialCapcity, float loadFactor, int numHashArrays) {
     this.cache = new CompactLabelToOrdinal(initialCapcity, loadFactor, numHashArrays);
     this.initialCapcity = initialCapcity;

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/CollisionMap.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/CollisionMap.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/CollisionMap.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/CollisionMap.java Thu Jan  2 00:23:24 2014
@@ -70,10 +70,12 @@ public class CollisionMap {
     this.threshold = (int) (this.capacity * this.loadFactor);
   }
 
+  /** How many mappings. */
   public int size() {
     return this.size;
   }
 
+  /** How many slots are allocated. */
   public int capacity() {
     return this.capacity;
   }
@@ -103,6 +105,9 @@ public class CollisionMap {
     this.threshold = (int) (this.capacity * this.loadFactor);
   }
 
+  /** Return the mapping, or {@link
+   *  LabelToOrdinal#INVALID_ORDINAL} if the label isn't
+   *  recognized. */
   public int get(FacetLabel label, int hash) {
     int bucketIndex = indexFor(hash, this.capacity);
     Entry e = this.entries[bucketIndex];
@@ -117,6 +122,7 @@ public class CollisionMap {
     return e.cid;
   }
 
+  /** Add another mapping. */
   public int addLabel(FacetLabel label, int hash, int cid) {
     int bucketIndex = indexFor(hash, this.capacity);
     for (Entry e = this.entries[bucketIndex]; e != null; e = e.next) {

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/CompactLabelToOrdinal.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/CompactLabelToOrdinal.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/CompactLabelToOrdinal.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/CompactLabelToOrdinal.java Thu Jan  2 00:23:24 2014
@@ -55,6 +55,7 @@ import org.apache.lucene.facet.taxonomy.
  */
 public class CompactLabelToOrdinal extends LabelToOrdinal {
 
+  /** Default maximum load factor. */
   public static final float DefaultLoadFactor = 0.15f;
 
   static final char TERMINATOR_CHAR = 0xffff;
@@ -68,6 +69,7 @@ public class CompactLabelToOrdinal exten
   private int threshold;
   private float loadFactor;
 
+  /** How many labels. */
   public int sizeOfMap() {
     return this.collisionMap.size();
   }
@@ -75,6 +77,7 @@ public class CompactLabelToOrdinal exten
   private CompactLabelToOrdinal() {
   }
 
+  /** Sole constructor. */
   public CompactLabelToOrdinal(int initialCapacity, float loadFactor,
                                 int numHashArrays) {
 

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/LabelToOrdinal.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/LabelToOrdinal.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/LabelToOrdinal.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/LabelToOrdinal.java Thu Jan  2 00:23:24 2014
@@ -26,9 +26,17 @@ import org.apache.lucene.facet.taxonomy.
  */
 public abstract class LabelToOrdinal {
 
+  /** How many ordinals we've seen. */
   protected int counter;
+
+  /** Returned by {@link #getOrdinal} when the label isn't
+   *  recognized. */
   public static final int INVALID_ORDINAL = -2;
 
+  /** Default constructor. */
+  public LabelToOrdinal() {
+  }
+
   /**
    * return the maximal Ordinal assigned so far
    */
@@ -52,7 +60,7 @@ public abstract class LabelToOrdinal {
   public abstract void addLabel(FacetLabel label, int ordinal);
 
   /**
-   * @return the ordinal assigned to the given label, 
+   * Returns the ordinal assigned to the given label, 
    * or {@link #INVALID_ORDINAL} if the label cannot be found in this table.
    */
   public abstract int getOrdinal(FacetLabel label);

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/LruTaxonomyWriterCache.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/LruTaxonomyWriterCache.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/LruTaxonomyWriterCache.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/LruTaxonomyWriterCache.java Thu Jan  2 00:23:24 2014
@@ -32,10 +32,19 @@ public class LruTaxonomyWriterCache impl
    * For guaranteed correctness - not relying on no-collisions in the hash
    * function, LRU_STRING should be used.
    */
-  public enum LRUType { LRU_HASHED, LRU_STRING }
+  public enum LRUType {
+    /** Use the label's hash as the key; this can lead to
+     *  silent conflicts! */
+    LRU_HASHED,
+
+    /** Use the label as the hash key; this is always
+     *  correct but will usually use more RAM. */
+    LRU_STRING
+  }
 
   private NameIntCacheLRU cache;
 
+  /** Creates this with {@link LRUType#LRU_HASHED} method. */
   public LruTaxonomyWriterCache(int cacheSize) {
     // TODO (Facet): choose between NameHashIntCacheLRU and NameIntCacheLRU.
     // For guaranteed correctness - not relying on no-collisions in the hash
@@ -46,6 +55,7 @@ public class LruTaxonomyWriterCache impl
     this(cacheSize, LRUType.LRU_HASHED);
   }
 
+  /** Creates this with the specified method. */
   public LruTaxonomyWriterCache(int cacheSize, LRUType lruType) {
     // TODO (Facet): choose between NameHashIntCacheLRU and NameIntCacheLRU.
     // For guaranteed correctness - not relying on no-collisions in the hash

Modified: lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/NameIntCacheLRU.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/NameIntCacheLRU.java?rev=1554710&r1=1554709&r2=1554710&view=diff
==============================================================================
--- lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/NameIntCacheLRU.java (original)
+++ lucene/dev/branches/lucene5339/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/NameIntCacheLRU.java Thu Jan  2 00:23:24 2014
@@ -42,10 +42,12 @@ class NameIntCacheLRU {
     createCache(maxCacheSize);
   }
 
+  /** Maximum number of cache entries before eviction. */
   public int getMaxSize() {
     return maxCacheSize;
   }
   
+  /** Number of entries currently in the cache. */
   public int getSize() {
     return cache.size();
   }



Mime
View raw message