Search is slow on single machine cluster

Hi Team,

ES configuration:

Heap : 30gb
Ram : 128gb
Primary shards : 15
replica : 1
index : 1
index size : 200GB
version : 6.2.2
single cluster machine, no node

I am performing search query on above index. I am giving date range on field adate which has format 'yyyyMMdd' . Also performing sorting on field 'atime' with format 'yyyy-MM-dd HH:mm:ss'

Here is my query:

curl -XPOST 'myhost:9200/index/_search?pretty' -H 'Content-type:application/json' -d '
{
    "query":{
        "bool":{
            "must":[
                {"range":{"adate":{"gte":20180523,"lte":20180823}}}
            ]
        }
    },
    "sort":{"atime":"desc"}
}                            
'

I am getting below output which is too slow.

{
  "took" : 85322,
  "timed_out" : false,
  "_shards" : {
    "total" : 15,
    "successful" : 15,
    "skipped" : 0,
    "failed" : 0
  }
}

Writing is continuous going on . When i stopped the writing i got good performance. But why my reading is slow while writing data?

You probably need to show your mapping(s), example document data, number of documents.

However, I think you can switch from must to filter, which might help a bit (cuts down on scoring, I think? I might be wrong)

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