Skip to content

Commit e0095a8

Browse files
committed
Fixed the multiplier validation
1 parent 31e1585 commit e0095a8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Storages/MergeTree/MergeTreeIndexVectorSimilarity.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,9 @@ MergeTreeIndexConditionVectorSimilarity::MergeTreeIndexConditionVectorSimilarity
422422
{
423423
if (expansion_search == 0)
424424
throw Exception(ErrorCodes::INVALID_SETTING_VALUE, "Setting 'hnsw_candidate_list_size_for_search' must not be 0");
425-
if (!std::isfinite(postfilter_multiplier) || !std::isfinite(postfilter_multiplier * parameters->limit) || postfilter_multiplier < 0.0)
426-
throw Exception(ErrorCodes::INVALID_SETTING_VALUE, "Setting 'vector_search_postfilter_multiplier' must be bigger than 0.0");
425+
if (!std::isfinite(postfilter_multiplier) || postfilter_multiplier < 0.0 ||
426+
(parameters && !std::isfinite(postfilter_multiplier * parameters->limit)))
427+
throw Exception(ErrorCodes::INVALID_SETTING_VALUE, "Setting 'vector_search_postfilter_multiplier' must be bigger than 0.0");
427428
}
428429

429430
bool MergeTreeIndexConditionVectorSimilarity::mayBeTrueOnGranule(MergeTreeIndexGranulePtr) const

0 commit comments

Comments
 (0)