Index API very slow at first time

Environment

  • Elastic Search 2.4.0 on Elastic Cloud
  • Cluster Size Mem:2GB Stor:48GB
  • Access from node.js client. "elasticsearch": "^11.0.1

Question

I try index this JSON param. but very slow at first time.
response time is 10000~13000ms on average.
is it too deep nested?
can you guess why? please tell me if I mistake.

{ 
	 "name": "test-name",
     "description": "test-description",
     "integrations": { 
      	"wechat":{ 
         	"Token": null
         },
        "facebook": { 
        	"Token": null
    	} 
	},
    "accountId": "8a4f260fc9c9449aa469bef9743a3a50",
    "appId": "641023dc27fe4743b6982fd1e0937968",
    "status": "active",
    "createdAt": "2017-05-10T10:09:00.548Z",
    "updatedAt": "2017-05-10T10:09:00.548Z",
    "options": [],
    "message": {
    	"title": null,
    	"text": null
    },
    "message2": {
    	"contents": [ 
    		{ 
    			"text": "text",
    			"contentType": "text" 
    		}
    	]
    },
    "apiKey": "60099855997d4898a5a1944d963ff992" 
 } 

thanks

There's no obvious reason why indexing this document would be so slow. Locally it takes a few milliseconds. Do you have any other mapping or index templates or anything?

You say this is slow the first time, so fast after that? Perhaps DNS lookup or something like that?

Is this document indexed into a new index so that it includes the time it takes to create it? If so, how many indices and shards do you have in the cluster?

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