Slow query in python

(Artem Sh) #1


I start Elasticsearch in local machine.
Index "wbtm_cities"
Documents: 1.8k
Data: 66.3 MB
Total Shards: 1
Unassigned Shards: 0

I do query:
GET wbtm_cities/doc/_search
"query": {
"bool": {
"filter": [
"term": {
"domain": ""
"term": {
"is_big": "1"
"from": 0,
"size": 200,
"_source": {
"includes": [

Speed first query in kibana: 7-65 ms -,
In second time kibana return 1ms
But then I use Python requests speed low: 200-300ms

1800 document it no many to slow query

  1. Why first Kibana connection is slow?
  2. Why python requests is slow?

(Christian Dahlqvist) #2

Does the time it takes in Python include creating the client and setting up the connection, or is it just the query time?

(Artem Sh) #3

Python client setting up the connection not longer 1-5ms. Then I connect to this client it's not slow.

(Christian Dahlqvist) #4

OK, so you are not using the official Elasticsearch Python client?

(Artem Sh) #5

I use this library -
And I use straight query

the result is the same

(system) #6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.