Have an index of ~ 9M docs, of which ~ 20K are "programs". This IDs query (with 20 IDs) takes 600ms on a local server, running on MBP with SSD. If I halve number of IDs, query latency cuts in half too. Same query takes 2000ms on an EC2 instance. Seems like this should be executed in << 10ms locall, given that we're checking _uid and the entire type has only 20K entries...
Should I care about unassigned_shards (probably from deleted indices)?
GET /admin/programs/_search
{
"query": {
"filtered": {
"filter": {
"ids": {
"values": [
18536,
18537,
18538,
18539,
18552,
18553,
18554,
18555,
18556,
18557,
18558,
18559,
18560,
18561,
18562,
18563,
18564,
18565,
18652,
18653
]
}
}
}
}
}
GET /_cluster/health
{
"cluster_name": "ecr-elasticsearch-local",
"status": "yellow",
"timed_out": false,
"number_of_nodes": 1,
"number_of_data_nodes": 1,
"active_primary_shards": 75,
"active_shards": 75,
"relocating_shards": 0,
"initializing_shards": 0,
"unassigned_shards": 74
}