Spring data elasticsearch and @JsonRootName

Hi,

I use spring-boot-starter-data-elasticsearch dependency in my Java spring project to query ES 2.4.0

My json's look like this,

{
   "event":{
      "eventName":"Man U vs Arsenal",
      "eventDateTime":"Mon 24 Oct 12:00"
   }
}

To avoid having to declare an empty "event" POJO wrapper, I use @JsonRootName(value="event") to mark that there's a root element in my POJO and I have also specified this in my application.properties,
spring.jackson.deserialization.UNWRAP_ROOT_VALUE=true

The search is happening fine but the root element declaration does not happen and results in objects with just nulls.

Can you please help.

Thanks,
Arun

I think the best place to ask this is on the spring data elasticsearch project on GitHub on their forum if any.

Ok, thanks.

Arun