Skip to content

Commit f5fbbb4

Browse files
author
elasticsearchmachine
committed
[CI] Auto commit changes from spotless
1 parent c7bcb82 commit f5fbbb4

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

server/src/main/java/org/elasticsearch/index/mapper/vectors/DenseVectorFieldMapper.java

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1819,7 +1819,13 @@ public Int4HnswIndexOptions(int m, int efConstruction, Float confidenceInterval,
18191819
this(m, efConstruction, confidenceInterval, rescoreVector, DEFAULT_HNSW_EARLY_TERMINATION);
18201820
}
18211821

1822-
public Int4HnswIndexOptions(int m, int efConstruction, Float confidenceInterval, RescoreVector rescoreVector, boolean earlyTermination) {
1822+
public Int4HnswIndexOptions(
1823+
int m,
1824+
int efConstruction,
1825+
Float confidenceInterval,
1826+
RescoreVector rescoreVector,
1827+
boolean earlyTermination
1828+
) {
18231829
super(VectorIndexType.INT4_HNSW, rescoreVector);
18241830
this.m = m;
18251831
this.efConstruction = efConstruction;
@@ -1877,7 +1883,7 @@ public String toString() {
18771883
+ confidenceInterval
18781884
+ ", rescore_vector="
18791885
+ (rescoreVector == null ? "none" : rescoreVector)
1880-
+ ", early_termination="
1886+
+ ", early_termination="
18811887
+ earlyTermination
18821888
+ "}";
18831889
}
@@ -1966,7 +1972,13 @@ public Int8HnswIndexOptions(int m, int efConstruction, Float confidenceInterval,
19661972
this(m, efConstruction, confidenceInterval, rescoreVector, DEFAULT_HNSW_EARLY_TERMINATION);
19671973
}
19681974

1969-
public Int8HnswIndexOptions(int m, int efConstruction, Float confidenceInterval, RescoreVector rescoreVector, boolean earlyTermination) {
1975+
public Int8HnswIndexOptions(
1976+
int m,
1977+
int efConstruction,
1978+
Float confidenceInterval,
1979+
RescoreVector rescoreVector,
1980+
boolean earlyTermination
1981+
) {
19701982
super(VectorIndexType.INT8_HNSW, rescoreVector);
19711983
this.m = m;
19721984
this.efConstruction = efConstruction;
@@ -2026,7 +2038,7 @@ public String toString() {
20262038
+ confidenceInterval
20272039
+ ", rescore_vector="
20282040
+ (rescoreVector == null ? "none" : rescoreVector)
2029-
+ ", early_termination="
2041+
+ ", early_termination="
20302042
+ earlyTermination
20312043
+ "}";
20322044
}
@@ -2104,7 +2116,7 @@ public boolean doEquals(DenseVectorIndexOptions o) {
21042116
if (this == o) return true;
21052117
if (o == null || getClass() != o.getClass()) return false;
21062118
HnswIndexOptions that = (HnswIndexOptions) o;
2107-
return m == that.m && efConstruction == that.efConstruction && earlyTermination == that.earlyTermination;
2119+
return m == that.m && efConstruction == that.efConstruction && earlyTermination == that.earlyTermination;
21082120
}
21092121

21102122
@Override
@@ -2114,8 +2126,7 @@ public int doHashCode() {
21142126

21152127
@Override
21162128
public String toString() {
2117-
return "{type=" + type + ", m=" + m + ", ef_construction=" + efConstruction + ", early_termination="
2118-
+ earlyTermination + "}";
2129+
return "{type=" + type + ", m=" + m + ", ef_construction=" + efConstruction + ", early_termination=" + earlyTermination + "}";
21192130
}
21202131
}
21212132

@@ -2149,7 +2160,10 @@ public boolean updatableTo(DenseVectorIndexOptions update) {
21492160
@Override
21502161
boolean doEquals(DenseVectorIndexOptions other) {
21512162
BBQHnswIndexOptions that = (BBQHnswIndexOptions) other;
2152-
return m == that.m && efConstruction == that.efConstruction && Objects.equals(rescoreVector, that.rescoreVector) && earlyTermination == that.earlyTermination;
2163+
return m == that.m
2164+
&& efConstruction == that.efConstruction
2165+
&& Objects.equals(rescoreVector, that.rescoreVector)
2166+
&& earlyTermination == that.earlyTermination;
21532167
}
21542168

21552169
@Override

server/src/test/java/org/elasticsearch/index/mapper/vectors/DenseVectorFieldTypeTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ public void testRescoreOversampleQueryOverrides() {
646646
null,
647647
randomFrom(DenseVectorFieldMapper.FilterHeuristic.values())
648648
);
649-
assertTrue(query instanceof ESKnnFloatVectorQuery || query instanceof PatienceKnnVectorQuery);
649+
assertTrue(query instanceof ESKnnFloatVectorQuery || query instanceof PatienceKnnVectorQuery);
650650

651651
// verify we can override a `0` to a positive number
652652
fieldType = new DenseVectorFieldType(

0 commit comments

Comments
 (0)