How can I use queryBuilders.wrapperQuery base64 encoded string

I have a json string to build a query, and I need to convert this to QueryBuilder. (ES Ver. 6.3.0)

I found that I can use wrapperQuery method, so I wrote this code:

    String str = cond.getFilter().toString();
    QueryBuilder filter = QueryBuilders.boolQuery().must(QueryBuilders.wrapperQuery(str));

And these are result of variables in debug mode:

And this method is working right, as the decription in the Docs(https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-wrapper-query.html)

The problem is, that this query just not works.

What is wrong and what should I do?

Any comments would be appreciated. Thanks.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.