JavaApi Json representation differs from http Json representation

Hi all,

I'm using a little BE proxy in nodeJs to redirect FE search request to ES the results I'm getting are like a direct call to http ES endpoint. The result looks like this:

where aggregations have names like "2" or, "3", as defined on the query.

However, now I need to change the BE proxy using Java API, and the Json representation of SearchResponse looks like this one

Where the same aggregation results are with # syntax.

Is there a way to get the original Json Object? Otherwise all the application clients I have needs huge refactoring that is out of scope.

Thanks a lot for you help!

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