You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by to...@apache.org on 2015/10/20 09:54:15 UTC

svn commit: r1709529 - /lucene/dev/trunk/lucene/classification/src/java/org/apache/lucene/classification/KNearestNeighborClassifier.java

Author: tommaso
Date: Tue Oct 20 07:54:15 2015
New Revision: 1709529

URL: http://svn.apache.org/viewvc?rev=1709529&view=rev
Log:
LUCENE-6631 - added missing javadoc for kNN classifier

Modified:
    lucene/dev/trunk/lucene/classification/src/java/org/apache/lucene/classification/KNearestNeighborClassifier.java

Modified: lucene/dev/trunk/lucene/classification/src/java/org/apache/lucene/classification/KNearestNeighborClassifier.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/classification/src/java/org/apache/lucene/classification/KNearestNeighborClassifier.java?rev=1709529&r1=1709528&r2=1709529&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/classification/src/java/org/apache/lucene/classification/KNearestNeighborClassifier.java (original)
+++ lucene/dev/trunk/lucene/classification/src/java/org/apache/lucene/classification/KNearestNeighborClassifier.java Tue Oct 20 07:54:15 2015
@@ -48,11 +48,34 @@ import org.apache.lucene.util.BytesRef;
  */
 public class KNearestNeighborClassifier implements Classifier<BytesRef> {
 
+  /**
+   * a {@link MoreLikeThis} instance used to perform MLT queries
+   */
   protected final MoreLikeThis mlt;
+
+  /**
+   * the name of the fields used as the input text
+   */
   protected final String[] textFieldNames;
+
+  /**
+   * the name of the field used as the output text
+   */
   protected final String classFieldName;
+
+  /**
+   * an {@link IndexSearcher} used to perform queries
+   */
   protected final IndexSearcher indexSearcher;
+
+  /**
+   * the no. of docs to compare in order to find the nearest neighbor to the input text
+   */
   protected final int k;
+
+  /**
+   * a {@link Query} used to filter the documents that should be used from this classifier's underlying {@link LeafReader}
+   */
   protected final Query query;
 
   /**