Skip to content

Commit

Permalink
Fix spotless
Browse files Browse the repository at this point in the history
Signed-off-by: Junqiu Lei <[email protected]>
  • Loading branch information
junqiu-lei committed Apr 17, 2024
1 parent 8926872 commit fa84072
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
20 changes: 10 additions & 10 deletions src/main/java/org/opensearch/knn/index/query/RNNQueryFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ private static Query getFloatVectorSimilarityQuery(
final Query filterQuery
) {
return new FloatVectorSimilarityQuery(
fieldName,
floatVector,
DEFAULT_LUCENE_RADIAL_SEARCH_TRAVERSAL_SIMILARITY_RATIO * resultSimilarity,
resultSimilarity,
filterQuery
fieldName,
floatVector,
DEFAULT_LUCENE_RADIAL_SEARCH_TRAVERSAL_SIMILARITY_RATIO * resultSimilarity,
resultSimilarity,
filterQuery
);
}

Expand All @@ -139,11 +139,11 @@ private static Query getByteVectorSimilarityQuery(
final Query filterQuery
) {
return new ByteVectorSimilarityQuery(
fieldName,
byteVector,
DEFAULT_LUCENE_RADIAL_SEARCH_TRAVERSAL_SIMILARITY_RATIO * resultSimilarity,
resultSimilarity,
filterQuery
fieldName,
byteVector,
DEFAULT_LUCENE_RADIAL_SEARCH_TRAVERSAL_SIMILARITY_RATIO * resultSimilarity,
resultSimilarity,
filterQuery
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,9 @@ public void testDoToQuery_whenNormal_whenDoRadiusSearch_whenDistanceThreshold_th
float resultSimilarity = KNNEngine.LUCENE.distanceToRadialThreshold(MAX_DISTANCE, SpaceType.L2);

assertTrue(query.toString().contains("resultSimilarity=" + resultSimilarity));
assertTrue(query.toString().contains("traversalSimilarity=" + DEFAULT_LUCENE_RADIAL_SEARCH_TRAVERSAL_SIMILARITY_RATIO * resultSimilarity));
assertTrue(
query.toString().contains("traversalSimilarity=" + DEFAULT_LUCENE_RADIAL_SEARCH_TRAVERSAL_SIMILARITY_RATIO * resultSimilarity)
);
}

public void testDoToQuery_whenNormal_whenDoRadiusSearch_whenScoreThreshold_thenSucceed() {
Expand Down

0 comments on commit fa84072

Please sign in to comment.