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

svn commit: r1440829 - in /lucene/dev/trunk/lucene: demo/src/java/org/apache/lucene/demo/facet/ demo/src/java/org/apache/lucene/demo/facet/adaptive/ demo/src/java/org/apache/lucene/demo/facet/association/ demo/src/java/org/apache/lucene/demo/facet/mult...

Author: rmuir
Date: Thu Jan 31 03:06:47 2013
New Revision: 1440829

URL: http://svn.apache.org/viewvc?rev=1440829&view=rev
Log:
add missing javadocs

Modified:
    lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/ExampleResult.java
    lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/ExampleUtils.java
    lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/adaptive/AdaptiveMain.java
    lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/adaptive/AdaptiveSearcher.java
    lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/association/CategoryAssociationsIndexer.java
    lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/association/CategoryAssociationsMain.java
    lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/association/CategoryAssociationsSearcher.java
    lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/association/CategoryAssociationsUtils.java
    lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/multiCL/MultiCLIndexer.java
    lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/multiCL/MultiCLMain.java
    lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/multiCL/MultiCLSearcher.java
    lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/simple/SimpleIndexer.java
    lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/simple/SimpleMain.java
    lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/simple/SimpleSearcher.java
    lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/simple/SimpleUtils.java
    lucene/dev/trunk/lucene/facet/src/java/org/apache/lucene/facet/util/TaxonomyMergeUtils.java

Modified: lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/ExampleResult.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/ExampleResult.java?rev=1440829&r1=1440828&r2=1440829&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/ExampleResult.java (original)
+++ lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/ExampleResult.java Thu Jan 31 03:06:47 2013
@@ -29,18 +29,21 @@ import org.apache.lucene.facet.search.re
  * @lucene.experimental
  */
 public class ExampleResult {
+  
+  /** Sole constructor. */
+  public ExampleResult() {}
 
   private List<FacetResult> facetResults;
 
   /**
-   * @return the facet results
+   * Returns the facet results
    */
   public List<FacetResult> getFacetResults() {
     return facetResults;
   }
 
   /**
-   * @param facetResults the facet results to set
+   * Sets the facet results
    */
   public void setFacetResults(List<FacetResult> facetResults) {
     this.facetResults = facetResults;

Modified: lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/ExampleUtils.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/ExampleUtils.java?rev=1440829&r1=1440828&r2=1440829&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/ExampleUtils.java (original)
+++ lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/ExampleUtils.java Thu Jan 31 03:06:47 2013
@@ -20,15 +20,28 @@ import org.apache.lucene.util.Version;
  */
 
 /**
+ * Simple utility functions for the faceting examples
  * @lucene.experimental
  */
 public class ExampleUtils {
+  
+  /** No instance */
+  private ExampleUtils() {}
 
+  /** 
+   * True if the system property <code>tests.verbose</code> has been set.
+   * If true, it causes {@link #log(Object)} to print messages to the console.
+   */
   public static final boolean VERBOSE = Boolean.getBoolean("tests.verbose");
 
   /** The Lucene {@link Version} used by the example code. */
   public static final Version EXAMPLE_VER = Version.LUCENE_40;
   
+  /**
+   * Logs the String representation of <code>msg</code> to the console,
+   * if {@link #VERBOSE} is true. Otherwise, does nothing.
+   * @see #VERBOSE
+   */
   public static void log(Object msg) {
     if (VERBOSE) {
       System.out.println(msg.toString());

Modified: lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/adaptive/AdaptiveMain.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/adaptive/AdaptiveMain.java?rev=1440829&r1=1440828&r2=1440829&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/adaptive/AdaptiveMain.java (original)
+++ lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/adaptive/AdaptiveMain.java Thu Jan 31 03:06:47 2013
@@ -36,6 +36,9 @@ import org.apache.lucene.facet.search.re
  * @lucene.experimental
  */
 public class AdaptiveMain {
+  
+  /** Sole constructor */
+  public AdaptiveMain() {}
 
   /**
    * Driver for the adaptive sample.
@@ -46,6 +49,7 @@ public class AdaptiveMain {
     ExampleUtils.log("DONE");
   }
 
+  /** Runs the adaptive sample and returns the facet results */
   public ExampleResult runSample() throws Exception {
 
     // create Directories for the search index and for the taxonomy index

Modified: lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/adaptive/AdaptiveSearcher.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/adaptive/AdaptiveSearcher.java?rev=1440829&r1=1440828&r2=1440829&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/adaptive/AdaptiveSearcher.java (original)
+++ lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/adaptive/AdaptiveSearcher.java Thu Jan 31 03:06:47 2013
@@ -46,6 +46,9 @@ import org.apache.lucene.store.Directory
  */
 public class AdaptiveSearcher {
   
+  /** No instance */
+  private AdaptiveSearcher() {}
+  
   /**
    * Search with facets through the {@link AdaptiveFacetsAccumulator} 
    * @param indexDir Directory of the search index.

Modified: lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/association/CategoryAssociationsIndexer.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/association/CategoryAssociationsIndexer.java?rev=1440829&r1=1440828&r2=1440829&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/association/CategoryAssociationsIndexer.java (original)
+++ lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/association/CategoryAssociationsIndexer.java Thu Jan 31 03:06:47 2013
@@ -40,6 +40,9 @@ import org.apache.lucene.store.Directory
  * @lucene.experimental
  */
 public class CategoryAssociationsIndexer {
+  
+  /** No instance. */
+  private CategoryAssociationsIndexer() {}
 
   /**
    * Create an index, and adds to it sample documents and categories.

Modified: lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/association/CategoryAssociationsMain.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/association/CategoryAssociationsMain.java?rev=1440829&r1=1440828&r2=1440829&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/association/CategoryAssociationsMain.java (original)
+++ lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/association/CategoryAssociationsMain.java Thu Jan 31 03:06:47 2013
@@ -33,6 +33,9 @@ import org.apache.lucene.facet.search.re
  */
 public class CategoryAssociationsMain {
 
+  /** Sole constructor. */
+  public CategoryAssociationsMain() {}
+
   /**
    * Driver for the simple sample.
    * @throws Exception on error (no detailed exception handling here for sample simplicity
@@ -43,6 +46,9 @@ public class CategoryAssociationsMain {
     ExampleUtils.log("DONE");
   }
 
+  /**
+   * Runs the example demonstrating sum of int-association.
+   */
   public ExampleResult runSumIntAssociationSample() throws Exception {
 
     // create Directories for the search index and for the taxonomy index
@@ -61,6 +67,9 @@ public class CategoryAssociationsMain {
     return res;
   }
   
+  /**
+   * Runs the example demonstrating sum of float-association.
+   */
   public ExampleResult runSumFloatAssociationSample() throws Exception {
     
     // create Directories for the search index and for the taxonomy index

Modified: lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/association/CategoryAssociationsSearcher.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/association/CategoryAssociationsSearcher.java?rev=1440829&r1=1440828&r2=1440829&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/association/CategoryAssociationsSearcher.java (original)
+++ lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/association/CategoryAssociationsSearcher.java Thu Jan 31 03:06:47 2013
@@ -38,6 +38,9 @@ import org.apache.lucene.facet.taxonomy.
  * @lucene.experimental
  */
 public class CategoryAssociationsSearcher {
+  
+  /** No instantiation */
+  private CategoryAssociationsSearcher() {}
 
   /** Search an index with a sum of int-association. */
   public static List<FacetResult> searchSumIntAssociation(Directory indexDir, Directory taxoDir) throws Exception {

Modified: lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/association/CategoryAssociationsUtils.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/association/CategoryAssociationsUtils.java?rev=1440829&r1=1440828&r2=1440829&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/association/CategoryAssociationsUtils.java (original)
+++ lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/association/CategoryAssociationsUtils.java Thu Jan 31 03:06:47 2013
@@ -23,9 +23,13 @@ import org.apache.lucene.facet.taxonomy.
  */
 
 /**
+ * Categories for the facet examples
  * @lucene.experimental
  */
 public class CategoryAssociationsUtils {
+  
+  /** No instance */
+  private CategoryAssociationsUtils() {}
 
   /**
    * Categories: categories[D][N] == category-path with association no. N for
@@ -45,6 +49,9 @@ public class CategoryAssociationsUtils {
     }
   };
 
+  /**
+   * Associations (occurrences/confidence levels) for {@link #categories}
+   */
   public static CategoryAssociation[][] associations = {
     // Doc #1 associations
     {

Modified: lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/multiCL/MultiCLIndexer.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/multiCL/MultiCLIndexer.java?rev=1440829&r1=1440828&r2=1440829&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/multiCL/MultiCLIndexer.java (original)
+++ lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/multiCL/MultiCLIndexer.java Thu Jan 31 03:06:47 2013
@@ -48,14 +48,17 @@ import org.apache.lucene.store.RAMDirect
  * @lucene.experimental
  */
 public class MultiCLIndexer {
+  
+  /** No instance */
+  private MultiCLIndexer() {}
 
-  // Number of documents to index
+  /** Number of documents to index */
   public static int NUM_DOCS = 100;
-  // Number of facets to add per document
+  /** Number of facets to add per document */
   public static int NUM_FACETS_PER_DOC = 10;
-  // Number of tokens in title
+  /** Number of tokens in title */
   public static int TITLE_LENGTH = 5;
-  // Number of tokens in text
+  /** Number of tokens in text */
   public static int TEXT_LENGTH = 100;
   
   // Lorum ipsum to use as content - this will be tokenized and used for document
@@ -73,7 +76,7 @@ public class MultiCLIndexer {
       + "nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure"
       + "reprehenderit qui in ea voluptate velit esse quam nihil molestiae "
       + "consequatur vel illum qui dolorem eum fugiat quo voluptas nulla pariatur";
-  // PerDimensionIndexingParams for multiple category lists
+  /** PerDimensionIndexingParams for multiple category lists */
   public static final PerDimensionIndexingParams MULTI_IPARAMS;
 
   // Initialize PerDimensionIndexingParams
@@ -199,6 +202,7 @@ public class MultiCLIndexer {
         + nFacetsAdded + " facets.");
   }
 
+  /** Driver for the example */
   public static void main(String[] args) throws Exception {
     index(new RAMDirectory(), new RAMDirectory());
   }

Modified: lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/multiCL/MultiCLMain.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/multiCL/MultiCLMain.java?rev=1440829&r1=1440828&r2=1440829&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/multiCL/MultiCLMain.java (original)
+++ lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/multiCL/MultiCLMain.java Thu Jan 31 03:06:47 2013
@@ -27,12 +27,17 @@ import org.apache.lucene.facet.search.re
  */
 
 /**
+ * Driver for the multi sample.
+ * 
  * @lucene.experimental
  */
 public class MultiCLMain {
+  
+  /** Sole constructor. */
+  public MultiCLMain() {}
 
   /**
-   * Driver for the multi sample.
+   * Executes the multi sample.
    * 
    * @throws Exception
    *             on error (no detailed exception handling here for sample
@@ -43,6 +48,7 @@ public class MultiCLMain {
     ExampleUtils.log("DONE");
   }
 
+  /** Runs the multi sample and returns the facet results */
   public ExampleResult runSample() throws Exception {
 
     // create Directories for the search index and for the taxonomy index

Modified: lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/multiCL/MultiCLSearcher.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/multiCL/MultiCLSearcher.java?rev=1440829&r1=1440828&r2=1440829&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/multiCL/MultiCLSearcher.java (original)
+++ lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/multiCL/MultiCLSearcher.java Thu Jan 31 03:06:47 2013
@@ -49,6 +49,9 @@ import org.apache.lucene.facet.taxonomy.
  * @lucene.experimental
  */
 public class MultiCLSearcher {
+  
+  /** No instance */
+  private MultiCLSearcher() {}
 
   /**
    * Search an index with facets.
@@ -78,6 +81,18 @@ public class MultiCLSearcher {
     return results;
   }
   
+  /**
+   * Search an index with facets.
+   * 
+   * @param indexReader
+   *            Reader over the search index.
+   * @param taxo
+   *            taxonomy reader.
+   * @throws Exception
+   *             on error (no detailed exception handling here for sample
+   *             simplicity
+   * @return facet results
+   */
   public static List<FacetResult> searchWithFacets(IndexReader indexReader,
       TaxonomyReader taxo, FacetIndexingParams iParams) throws Exception {
     // prepare searcher to search against

Modified: lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/simple/SimpleIndexer.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/simple/SimpleIndexer.java?rev=1440829&r1=1440828&r2=1440829&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/simple/SimpleIndexer.java (original)
+++ lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/simple/SimpleIndexer.java Thu Jan 31 03:06:47 2013
@@ -39,6 +39,9 @@ import org.apache.lucene.store.Directory
  * @lucene.experimental
  */
 public class SimpleIndexer {
+  
+  /** No instance */
+  private SimpleIndexer() {}
 
   /**
    * Create an index, and adds to it sample documents and facets.

Modified: lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/simple/SimpleMain.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/simple/SimpleMain.java?rev=1440829&r1=1440828&r2=1440829&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/simple/SimpleMain.java (original)
+++ lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/simple/SimpleMain.java Thu Jan 31 03:06:47 2013
@@ -36,6 +36,9 @@ import org.apache.lucene.facet.taxonomy.
  * @lucene.experimental
  */
 public class SimpleMain {
+  
+  /** Sole constructor */
+  public SimpleMain() {}
 
   /**
    * Driver for the simple sample.
@@ -47,6 +50,7 @@ public class SimpleMain {
     ExampleUtils.log("DONE");
   }
 
+  /** Runs the simple sample and returns the facet results */
   public ExampleResult runSimple() throws Exception {
     // create Directories for the search index and for the taxonomy index
     Directory indexDir = new RAMDirectory();
@@ -72,6 +76,7 @@ public class SimpleMain {
     return res;
   }
 
+  /** Runs the simple sample and returns drilldown results */
   public ExampleResult runDrillDown() throws Exception {
     // create Directories for the search index and for the taxonomy index
     Directory indexDir = new RAMDirectory();

Modified: lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/simple/SimpleSearcher.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/simple/SimpleSearcher.java?rev=1440829&r1=1440828&r2=1440829&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/simple/SimpleSearcher.java (original)
+++ lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/simple/SimpleSearcher.java Thu Jan 31 03:06:47 2013
@@ -47,6 +47,9 @@ import org.apache.lucene.search.TopScore
  */
 public class SimpleSearcher {
   
+  /** No instance */
+  private SimpleSearcher() {}
+  
   /**
    * Search an index with facets.
    * @param indexReader index reader.

Modified: lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/simple/SimpleUtils.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/simple/SimpleUtils.java?rev=1440829&r1=1440828&r2=1440829&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/simple/SimpleUtils.java (original)
+++ lucene/dev/trunk/lucene/demo/src/java/org/apache/lucene/demo/facet/simple/SimpleUtils.java Thu Jan 31 03:06:47 2013
@@ -28,6 +28,9 @@ import org.apache.lucene.facet.taxonomy.
  * @lucene.experimental
  */
 public class SimpleUtils {
+  
+  /** No instance */
+  private SimpleUtils() {}
 
   /** 
    * Documents text field.

Modified: lucene/dev/trunk/lucene/facet/src/java/org/apache/lucene/facet/util/TaxonomyMergeUtils.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/facet/src/java/org/apache/lucene/facet/util/TaxonomyMergeUtils.java?rev=1440829&r1=1440828&r2=1440829&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/facet/src/java/org/apache/lucene/facet/util/TaxonomyMergeUtils.java (original)
+++ lucene/dev/trunk/lucene/facet/src/java/org/apache/lucene/facet/util/TaxonomyMergeUtils.java Thu Jan 31 03:06:47 2013
@@ -36,6 +36,7 @@ import org.apache.lucene.util.Version;
  */
 
 /**
+ * Utility methods for merging index and taxonomy directories.
  * @lucene.experimental
  */
 public class TaxonomyMergeUtils {