File tree Expand file tree Collapse file tree
server/src/main/java/org/elasticsearch/index/codec/vectors/cluster Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -592,9 +592,6 @@ tests:
592592- class : org.elasticsearch.xpack.esql.qa.single_node.EsqlSpecApproximationBucketIncludeEmptyBucketsIT
593593 method : test {csv-spec:bucket_include_empty_buckets.Large number of buckets doesn't OOM - stats}
594594 issue : https://github.com/elastic/elasticsearch/issues/155921
595- - class : org.elasticsearch.index.codec.vectors.cluster.FloatHierarchicalKMeansTests
596- method : testSoarAssignmentsValidAfterEmptyClusterRemoval
597- issue : https://github.com/elastic/elasticsearch/issues/155931
598595- class : org.elasticsearch.test.rest.ClientYamlTestSuiteIT
599596 method : test {yaml=search.highlight/70_number_of_fragments/number_of_fragments at the maximum should SUCCEED}
600597 issue : https://github.com/elastic/elasticsearch/issues/155969
Original file line number Diff line number Diff line change @@ -202,6 +202,10 @@ private static <V> int computeSoarAssignment(
202202 float [] distances ,
203203 CentroidOps <V > ops
204204 ) {
205+ if (centroidCount <= 0 ) {
206+ // no other centroid available to spill to (e.g. an empty neighborhood after empty-cluster removal)
207+ return NO_SOAR_ASSIGNMENT ;
208+ }
205209 V currentCentroid = centroids [currAssignment ];
206210 float vectorCentroidDist = ops .squareDistance (vector , currentCentroid );
207211 if (vectorCentroidDist <= SOAR_MIN_DISTANCE ) {
You can’t perform that action at this time.
0 commit comments