Skip to content

Commit

Permalink
Removed option of QuerqyQueryConverter to return a string
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesDaniel committed Dec 27, 2022
1 parent cc6ba73 commit af20fdc
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,10 @@ private Map<String, Object> convertUserQuery(final ExpandedQuery expandedQuery)
if (query instanceof Map) {
return (Map<String, Object>) query;

} else if (query instanceof String){
return Map.of("bool", Map.of("must", (String) query));

} else {
throw new IllegalArgumentException("Converted user query must be of type Map or String");
throw new IllegalArgumentException(
"Something unexpected happened, the converted user query must be of type Map or String"
);
}
}

Expand Down

0 comments on commit af20fdc

Please sign in to comment.