Summary Recently we upgraded to Spring Data Elasticsearch 4.x. Part of this major release meant that Jackson is no longer used to convert our domain objects to json (using MappingElasticsearchConverter instead) [1]. This means we are now forced to add a new id field to all our documents. Previously we had domain objects like this: Which resulted in documents like
Tag: spring-data-elasticsearch
How to enable query logging in Spring-data-elasticsearch
I use spring-data-elasticsearch framework to get query result from elasticsearch server, the java code like this: While how can I know the raw http query sent to elasticssearch server? How can I enable the logging, I tried add log4j, but it seems the spring-data-elasticsearch doesn’t log the query. Answer After digging through the spring data code i found this helpful