mirror of https://github.com/apache/lucene.git
adding a few toString methods for HNSW scoring classes (#13694)
This commit is contained in:
parent
385f56ba22
commit
d55b92bae0
|
@ -156,7 +156,12 @@ public class ProfileResults {
|
||||||
|
|
||||||
/** Process all the JFR files passed in args and print a merged summary. */
|
/** Process all the JFR files passed in args and print a merged summary. */
|
||||||
public static void printReport(
|
public static void printReport(
|
||||||
List<String> files, String mode, int stacksize, int count, boolean lineNumbers, boolean frameTypes)
|
List<String> files,
|
||||||
|
String mode,
|
||||||
|
int stacksize,
|
||||||
|
int count,
|
||||||
|
boolean lineNumbers,
|
||||||
|
boolean frameTypes)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
if (!"cpu".equals(mode) && !"heap".equals(mode)) {
|
if (!"cpu".equals(mode) && !"heap".equals(mode)) {
|
||||||
throw new IllegalArgumentException("tests.profile.mode must be one of (cpu,heap)");
|
throw new IllegalArgumentException("tests.profile.mode must be one of (cpu,heap)");
|
||||||
|
|
|
@ -116,6 +116,11 @@ public class DefaultFlatVectorScorer implements FlatVectorsScorer {
|
||||||
public RandomVectorScorerSupplier copy() throws IOException {
|
public RandomVectorScorerSupplier copy() throws IOException {
|
||||||
return new ByteScoringSupplier(vectors, similarityFunction);
|
return new ByteScoringSupplier(vectors, similarityFunction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "ByteScoringSupplier(similarityFunction=" + similarityFunction + ")";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** RandomVectorScorerSupplier for Float vector */
|
/** RandomVectorScorerSupplier for Float vector */
|
||||||
|
@ -148,6 +153,11 @@ public class DefaultFlatVectorScorer implements FlatVectorsScorer {
|
||||||
public RandomVectorScorerSupplier copy() throws IOException {
|
public RandomVectorScorerSupplier copy() throws IOException {
|
||||||
return new FloatScoringSupplier(vectors, similarityFunction);
|
return new FloatScoringSupplier(vectors, similarityFunction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "FloatScoringSupplier(similarityFunction=" + similarityFunction + ")";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** A {@link RandomVectorScorer} for float vectors. */
|
/** A {@link RandomVectorScorer} for float vectors. */
|
||||||
|
|
|
@ -170,5 +170,12 @@ public class ScalarQuantizedVectorScorer implements FlatVectorsScorer {
|
||||||
return new ScalarQuantizedRandomVectorScorerSupplier(
|
return new ScalarQuantizedRandomVectorScorerSupplier(
|
||||||
similarity, vectorSimilarityFunction, values.copy());
|
similarity, vectorSimilarityFunction, values.copy());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "ScalarQuantizedRandomVectorScorerSupplier(vectorSimilarityFunction="
|
||||||
|
+ vectorSimilarityFunction
|
||||||
|
+ ")";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -301,5 +301,12 @@ public class Lucene99ScalarQuantizedVectorScorer implements FlatVectorsScorer {
|
||||||
public ScalarQuantizedRandomVectorScorerSupplier copy() throws IOException {
|
public ScalarQuantizedRandomVectorScorerSupplier copy() throws IOException {
|
||||||
return new ScalarQuantizedRandomVectorScorerSupplier(values.copy(), vectorSimilarityFunction);
|
return new ScalarQuantizedRandomVectorScorerSupplier(values.copy(), vectorSimilarityFunction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "ScalarQuantizedRandomVectorScorerSupplier(vectorSimilarityFunction="
|
||||||
|
+ vectorSimilarityFunction
|
||||||
|
+ ")";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue