Prevent illegal max_query_terms
values in MLT query
#49927
Labels
>enhancement
good first issue
low hanging fruit
:Search/Search
Search-related issues that do not fall into other categories
v7.6.0
v8.0.0-alpha1
The
MoreLikeThisQueryBuilder
andMoreLikeThisQuery
can be created with illegalmax_query_terms
values (e.g. negativ or 0 values). This can lead to NPEs as demonstrated in #48007. We should check and reject those values in the relevant places (e.g. setters) in the builder and the query.The text was updated successfully, but these errors were encountered: