LUCENE-7776: change javadocs default mention from Classic to BM25

(Also kinda added missing javadoc for new method to fix 'ant precommit'.)
This commit is contained in:
Christine Poerschke 2017-04-11 19:36:44 +01:00
parent e30cc70fdd
commit 5c5254341e
2 changed files with 5 additions and 2 deletions

View File

@ -86,7 +86,7 @@ public class KNearestNeighborClassifier implements Classifier<BytesRef> {
* @param indexReader the reader on the index to be used for classification
* @param analyzer an {@link Analyzer} used to analyze unseen text
* @param similarity the {@link Similarity} to be used by the underlying {@link IndexSearcher} or {@code null}
* (defaults to {@link org.apache.lucene.search.similarities.ClassicSimilarity})
* (defaults to {@link org.apache.lucene.search.similarities.BM25Similarity})
* @param query a {@link Query} to eventually filter the docs used for training the classifier, or {@code null}
* if all the indexed docs should be used
* @param k the no. of docs to select in the MLT results to find the nearest neighbor
@ -127,6 +127,9 @@ public class KNearestNeighborClassifier implements Classifier<BytesRef> {
return classifyFromTopDocs(knnSearch(text));
}
/**
* TODO
*/
protected ClassificationResult<BytesRef> classifyFromTopDocs(TopDocs knnResults) throws IOException {
List<ClassificationResult<BytesRef>> assignedClasses = buildListFromTopDocs(knnResults);
ClassificationResult<BytesRef> assignedClass = null;

View File

@ -56,7 +56,7 @@ public class KNearestNeighborDocumentClassifier extends KNearestNeighborClassifi
*
* @param indexReader the reader on the index to be used for classification
* @param similarity the {@link Similarity} to be used by the underlying {@link IndexSearcher} or {@code null}
* (defaults to {@link org.apache.lucene.search.similarities.ClassicSimilarity})
* (defaults to {@link org.apache.lucene.search.similarities.BM25Similarity})
* @param query a {@link org.apache.lucene.search.Query} to eventually filter the docs used for training the classifier, or {@code null}
* if all the indexed docs should be used
* @param k the no. of docs to select in the MLT results to find the nearest neighbor