Java High Level Rest Client - typed_keys parameter

Using the High Level REST Client, I'm unable to find a way of setting the "typed_keys" parameter on a search post.

I am using the SearchRequest object and RestHighLevelClient.

There have been previous discussions on this. The high-level REST client needs typed_keys set to true, otherwise it cannot parse responses properly. This should be transparent unless you print out a given search response in json format using the toXContent method. In that case you do see the weird prefixes within aggregations and suggestions names. If you do so, I would ask why you need to do that: the high-level REST client is all about not having to deal with json. If you need the json, use the low-level REST client which does no parsing hence does not need the typed_keys parameter.

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