Latency issues when using nested queries and inner hists

I have two questions while using elasticsearch.

using version : 7.1.1
index cluster: master node: 5, client node 6, data node 18, 4 shard, 10gb
search rate : about 5~600 tps
index mapping example:

{
	"mappings": {
		"properties": {
			"agencyId": {
				"type": "integer"
			},
			"products": {
				"type": "nested",
				"properties": {
					"name": {
						"type": "text"
					}
				}
			}
		}
	}
}

Question.

  1. As you can see from the mapping example above, nested query and innerhits are used together for search while inevitably using elasticsearch. I know both queries are not performing well, so I'm wondering what can be done to further improve performance in this situation. For example, specify innertHits source and size, or adjust the number of shards well.

  2. In the above situation, latency jumps about once every 10 to 20 seconds, but the average latency is at a stable level. The index is updated at about 50k per minute and I wonder if this can have an effect or if there are other factors.

Thank you and look forward to your reply.

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