Using SpringBoot data elasticsearch
Need to print the Elasticsearch JSON representation of the query
Creating a org.springframework.data.elasticsearch.core.query.CriteriaQuery that is passed to
org.springframework.data.elasticsearch.client.elc.ElasticsearchTemplate::search()
Can print the criteriaQuery.getCriteria().getCriteriaChain() and get some good information but need to get the JSON query that is created (I believe) by the REST client
Looking at various page e.g., it seems to be a tricky affair https://github.com/spring-projects/spring-data-elasticsearch/issues/1808
Tried log level like:
logging.level.org.springframework.data.elasticsearch.core=TRACE
But also no joy
What is the simplest/easiest way to get the JSON ?
Any help is much appreciated