0

I have an application where I'm using springframework's elasticsearch: org.springframework.data:spring-data-elasticsearch:1.0.0.RELEASE For debugging, I want to log the queries fired to elasticsearch but I couldn't find any API which I could use to serialize a CriteriaQuery Is there any way to accomplish this? Or any setting to be enabled in elasticsearch before starting it so that it logs all queries (like mysql logging) ?

coder
  • 1,901
  • 5
  • 29
  • 44

1 Answers1

0

Probably the easiest option is to configure slow logging to log every query that takes longer than 1 ms? You can find the way to do it in the elasticsearch.yml file. More information here:

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules-slowlog.html

Jettro Coenradie
  • 4,735
  • 23
  • 31