Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosdelest committed Apr 16, 2024
1 parent 914ce1c commit db36d14
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ private static Mapper.Builder createEmbeddingsField(IndexVersion indexVersionCre
switch (similarity) {
case COSINE -> denseVectorMapperBuilder.similarity(DenseVectorFieldMapper.VectorSimilarity.COSINE);
case DOT_PRODUCT -> denseVectorMapperBuilder.similarity(DenseVectorFieldMapper.VectorSimilarity.DOT_PRODUCT);
case L2_NORM -> denseVectorMapperBuilder.similarity(DenseVectorFieldMapper.VectorSimilarity.L2_NORM);
default -> throw new IllegalArgumentException(
"Unknown similarity measure in model_settings [" + similarity.name() + "]"
);
Expand All @@ -382,10 +383,6 @@ private static boolean canMergeModelSettings(
if (previous == null) {
return true;
}
if (current == null) {
conflicts.addConflict("model_settings", "");
return false;
}
conflicts.addConflict("model_settings", "");
return false;
}
Expand Down

0 comments on commit db36d14

Please sign in to comment.