Unused parameters detected when building – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.12-7.15

Briefly, this error occurs when there are parameters in the Elasticsearch query that are not being used. This could be due to a typo, incorrect parameter name, or unnecessary parameters. To resolve this issue, you should review your query and remove or correct any unused or incorrect parameters. Additionally, ensure that the parameters used are compatible with the Elasticsearch version you are using, as some parameters may have been deprecated or changed in newer versions.

This guide will help you check for common problems that cause the log ” Unused parameters {} detected when building [{}] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin.

Log Context

Log “Unused parameters {} detected when building [{}]” class name is FunctionRegistry.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 Check.isTrue(names.length > 0; "At least one name must be provided for the function");
 String primaryName = names[0];
 List aliases = Arrays.asList(names).subList(1; names.length);
 FunctionDefinition.Builder realBuilder = (uf; cfg; extras) -> {
 if (CollectionUtils.isEmpty(extras) == false) {
 throw new ParsingException(uf.source(); "Unused parameters {} detected when building [{}]";
 try {
 return builder.build(uf.source(); uf.children(); cfg);


How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?