From 59bdb9bad1c4499473bf8a83e27e98d8b6f5fa77 Mon Sep 17 00:00:00 2001 From: sahilchaudhary Date: Mon, 19 Feb 2024 11:59:10 +0530 Subject: [PATCH] Adding the mustCondition for all subFilter --- .../main/java/org/sunbird/search/processor/SearchProcessor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/search-api/search-core/src/main/java/org/sunbird/search/processor/SearchProcessor.java b/search-api/search-core/src/main/java/org/sunbird/search/processor/SearchProcessor.java index f8f40268b..d51a749f3 100644 --- a/search-api/search-core/src/main/java/org/sunbird/search/processor/SearchProcessor.java +++ b/search-api/search-core/src/main/java/org/sunbird/search/processor/SearchProcessor.java @@ -913,7 +913,7 @@ private static QueryBuilder getPostFilterQuery(Map postFilter) { nestedBoolQuery.must(QueryBuilders.termQuery(filters.getKey(), value)); } } else if (filters.getValue() instanceof String) { - nestedBoolQuery.should(QueryBuilders.termQuery(filters.getKey(), ((String) filters.getValue()).toLowerCase())); + nestedBoolQuery.must(QueryBuilders.termQuery(filters.getKey(), ((String) filters.getValue()).toLowerCase())); } }