From 30ebb2c64d77c42431fe1ed656286089ceb7ead3 Mon Sep 17 00:00:00 2001 From: Ryan Bogan Date: Wed, 24 Apr 2024 13:32:34 -0700 Subject: [PATCH 1/2] Ensure ignore_unmapped is set to correct value Signed-off-by: Ryan Bogan --- .../java/org/opensearch/knn/index/query/KNNQueryBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/opensearch/knn/index/query/KNNQueryBuilder.java b/src/main/java/org/opensearch/knn/index/query/KNNQueryBuilder.java index 37114f3cb..3a24c1012 100644 --- a/src/main/java/org/opensearch/knn/index/query/KNNQueryBuilder.java +++ b/src/main/java/org/opensearch/knn/index/query/KNNQueryBuilder.java @@ -267,7 +267,7 @@ public static KNNQueryBuilder fromXContent(XContentParser parser) throws IOExcep max_distance = (Float) NumberFieldMapper.NumberType.FLOAT.parse(parser.objectBytes(), false); } else if (MIN_SCORE_FIELD.match(currentFieldName, parser.getDeprecationHandler())) { min_score = (Float) NumberFieldMapper.NumberType.FLOAT.parse(parser.objectBytes(), false); - } else if (IGNORE_UNMAPPED_FIELD.getPreferredName().equals("ignore_unmapped")) { + } else if (IGNORE_UNMAPPED_FIELD.getPreferredName().equals(currentFieldName)) { if (isClusterOnOrAfterMinRequiredVersion("ignore_unmapped")) { ignoreUnmapped = parser.booleanValue(); } From 39e8167a7796040085f41dfe41dfc74baf73e5bf Mon Sep 17 00:00:00 2001 From: Ryan Bogan Date: Wed, 24 Apr 2024 13:34:47 -0700 Subject: [PATCH 2/2] Add changelog entry Signed-off-by: Ryan Bogan --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc0cf4238..05ba3be4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), * Serialize all models into cluster metadata [#1499](https://github.com/opensearch-project/k-NN/pull/1499) ### Bug Fixes * Add stored fields for knn_vector type [#1630](https://github.com/opensearch-project/k-NN/pull/1630) +* Ensure ignore_unmapped is set to correct value [#1655](https://github.com/opensearch-project/k-NN/pull/1655) ### Infrastructure * Add micro-benchmark module in k-NN plugin for benchmark streaming vectors to JNI layer functionality. [#1583](https://github.com/opensearch-project/k-NN/pull/1583) * Add arm64 check when SIMD is disabled [#1618](https://github.com/opensearch-project/k-NN/pull/1618)