mirror of https://github.com/apache/lucene.git
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:
parent
e30cc70fdd
commit
5c5254341e
|
@ -86,7 +86,7 @@ public class KNearestNeighborClassifier implements Classifier<BytesRef> {
|
||||||
* @param indexReader the reader on the index to be used for classification
|
* @param indexReader the reader on the index to be used for classification
|
||||||
* @param analyzer an {@link Analyzer} used to analyze unseen text
|
* @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}
|
* @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}
|
* @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
|
* 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
|
* @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));
|
return classifyFromTopDocs(knnSearch(text));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO
|
||||||
|
*/
|
||||||
protected ClassificationResult<BytesRef> classifyFromTopDocs(TopDocs knnResults) throws IOException {
|
protected ClassificationResult<BytesRef> classifyFromTopDocs(TopDocs knnResults) throws IOException {
|
||||||
List<ClassificationResult<BytesRef>> assignedClasses = buildListFromTopDocs(knnResults);
|
List<ClassificationResult<BytesRef>> assignedClasses = buildListFromTopDocs(knnResults);
|
||||||
ClassificationResult<BytesRef> assignedClass = null;
|
ClassificationResult<BytesRef> assignedClass = null;
|
||||||
|
|
|
@ -56,7 +56,7 @@ public class KNearestNeighborDocumentClassifier extends KNearestNeighborClassifi
|
||||||
*
|
*
|
||||||
* @param indexReader the reader on the index to be used for classification
|
* @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}
|
* @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}
|
* @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
|
* 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
|
* @param k the no. of docs to select in the MLT results to find the nearest neighbor
|
||||||
|
|
Loading…
Reference in New Issue