I have been testing the length of queries using the linux time command, ex.
time curl -s "IPADDRESS:9200/INDEX/_search?pretty" -d{ES_QUERY}
Some queries appear on the command line end to take anywhere from 1 to 10 seconds. However, when looking at the marvel stats, there has never been a search latency of over 1000ms, and they typically stay under 500ms, even when queries on my end appear to be taking a long time.
What might account for this discrepancy?? I'd at least expect some of the long queries to show up as spikes on the search latency chart.
Query latency is calculated on a per shard basis. This means that, while the overall search may be slow, it may be relatively fast at the per shard level.
Can you show the header of the response that you're looking at? Particularly:
Similarly, I have my es_slowlog settings set to report any query that takes over 1 ms. when I run these queries that appear to take a long time, I still never see the slowlogs reporting a time higher than 1000ms.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.