0

I am searching my Elastic index from my Java backend using Elastic's high level REST client for JAVA. I notice that it takes 700 to 800 milliseconds to receive the response from Elastic.

I checked the actual query time in Elastic and it is only 7 milliseconds.

I have built filters and aggregations into my query and also am returning many fields. However, if I remove all filters and aggregations and limit the result set to a single document and only return a single field, the time it takes my Java code to receive the response from Elastic is still > 700ms. Why might this be? My server code is running in California. My Elastic index is served in North Virginia. Perhaps this explains the latency? What else could be the cause?

This is a multisearch containing two search queries.

GNG
  • 1,341
  • 2
  • 23
  • 50
  • can you run the query with `profile: true` and show us what comes back? – kpie Mar 19 '20 at 23:39
  • @GNG, can you show your code and ES query in JSON and how many docs are there in your index and is it consistent or happens during peak time? – Amit Mar 20 '20 at 04:28

0 Answers0