Hi,
I've set up elasticsearch and it works as expected.
However, I need to log all the queries that get fetched. I set up the
configuration in the elasticsearch.yml as follows :
index.search.slowlog.level: TRACE
index.search.slowlog.threshold.query.trace: 0
and this in the logging.yml
additivity:
index.search.slowlog: true
The logging works, however, I get duplicate entries for each search query.
I'm not using any client library, I've written a small client myself to
check out elasticsearch.
Here is a sample from the slow log :
TRACE - [Zynger] [dI][1] took[63.3ms], took_millis[63],
search_type[QUERY_THEN_FETCH], total_shards[5],
source[{"from":0,"size":"25","explain":0,"sort":["_score"],"min_score":0.1,"fields":["Gr","Ic","Vert","Title"],"query":{"bool":{"should":[{"query_string":{"auto_generate_phrase_queries":0,"enable_position_increments":0,"fields":["Title.partial^2","DB","Typ","Lang","Are","keys"],"defaultOperator":"AND","query":"lamp"}}]}}}],
extra_source[],
TRACE - [Zynger] [dI][3] took[67.2ms], took_millis[67],
search_type[QUERY_THEN_FETCH], total_shards[5],
source[{"from":0,"size":"25","explain":0,"sort":["_score"],"min_score":0.1,"fields":["Gr","Ic","Vert","Title"],"query":{"bool":{"should":[{"query_string":{"auto_generate_phrase_queries":0,"enable_position_increments":0,"fields":["Title.partial^2","DB","Typ","Lang","Are","keys"],"defaultOperator":"AND","query":"lamp"}}]}}}],
extra_source[],
TRACE - [Zynger] [dI][2] took[3.8ms], took_millis[3],
search_type[QUERY_THEN_FETCH], total_shards[5],
source[{"from":0,"size":"25","explain":0,"sort":["_score"],"min_score":0.1,"fields":["Gr","Ic","Vert","Title"],"query":{"bool":{"should":[{"query_string":{"auto_generate_phrase_queries":0,"enable_position_increments":0,"fields":["Title.partial^2","DB","Typ","Lang","Are","keys"],"defaultOperator":"AND","query":"lamp"}}]}}}],
extra_source[],
Am I missing something?
Thanks
--